replace x86.T with native.T

This commit is contained in:
Michael Sippel 2025-03-20 16:28:16 +01:00
parent e29a5a3475
commit f67f8c0118
Signed by: senvas
GPG key ID: F96CF119C34B64A6
12 changed files with 91 additions and 91 deletions

View file

@ -3,7 +3,7 @@
```
morph_real_as_decimalstr_to_float ()
~ <PosInt 10 BigEndian> ~ <Seq~<ValueTerminated 0> <Digit 10>~Char~Ascii~x86.UInt8>
~ <PosInt 10 BigEndian> ~ <Seq~<ValueTerminated 0> <Digit 10>~Char~Ascii~native.UInt8>
--> ~ native.Float
```
sscanf(src, "%f", dst);
@ -11,7 +11,7 @@ morph_real_as_decimalstr_to_float ()
```
morph_real_as_decimalstr_to_double ()
~ <PosInt 10 BigEndian> ~ <Seq~<ValueTerminated 0> <Digit 10>~Char~Ascii~x86.UInt8>
~ <PosInt 10 BigEndian> ~ <Seq~<ValueTerminated 0> <Digit 10>~Char~Ascii~native.UInt8>
--> ~ native.Double
```
sscanf(src, "%lf", dst);
@ -20,7 +20,7 @@ morph_real_as_decimalstr_to_double ()
morph_real_as_float_to_decimalstr ()
~ native.Float
--> ~ <PosInt 10 BigEndian> ~ <Seq~<ValueTerminated 0> <Digit 10>~Char~Ascii~x86.UInt8>
--> ~ <PosInt 10 BigEndian> ~ <Seq~<ValueTerminated 0> <Digit 10>~Char~Ascii~native.UInt8>
```
sprintf(dst, "%f", *src);
return 0;
@ -28,7 +28,7 @@ morph_real_as_float_to_decimalstr ()
morph_real_as_double_to_decimalstr ()
~ native.Double
--> ~ <PosInt 10 BigEndian> ~ <Seq~<ValueTerminated 0> <Digit 10>~Char~Ascii~x86.UInt8>
--> ~ <PosInt 10 BigEndian> ~ <Seq~<ValueTerminated 0> <Digit 10>~Char~Ascii~native.UInt8>
```
sprintf(dst, "%f", *src);
return 0;
@ -53,7 +53,7 @@ morph_real_as_double_to_float ()
```
morph_real_as_u64_to_float ()
~ ~ x86.UInt64
~ ~ native.UInt64
--> ~ native.Float
```
fprintf(stderr, "Warning: morphin UInt64 -> Float. Precision loss!");
@ -62,7 +62,7 @@ morph_real_as_u64_to_float ()
```
morph_real_as_u64_to_double ()
~ ~ x86.UInt64
~ ~ native.UInt64
--> ~ native.Double
```
fprintf(stderr, "Warning: morphin UInt64 -> Double. Precision loss!");
@ -71,7 +71,7 @@ morph_real_as_u64_to_double ()
```
morph_real_as_quantized_linear_to_float (Begin: , End: , Steps: )
~ <QuantizedLinear Begin End Steps> ~ ~ x86.UInt64
~ <QuantizedLinear Begin End Steps> ~ ~ native.UInt64
--> ~ native.Float
```
*dst = (float)Begin + ( *src * ((float)End - (float)Begin) ) / (float)Steps;
@ -80,7 +80,7 @@ morph_real_as_quantized_linear_to_float (Begin: , End: , Steps: )
morph_real_as_float_to_quantized_linear (Begin: , End: , Steps: )
~ native.Float
--> ~ <QuantizedLinear Begin End Steps> ~ ~ x86.UInt64
--> ~ <QuantizedLinear Begin End Steps> ~ ~ native.UInt64
```
*dst = ((*src - (float)Begin) * (float)Steps) / ((float)End - (float)Begin);
return 0;
@ -89,7 +89,7 @@ morph_real_as_float_to_quantized_linear (Begin: , End: , Steps: )
morph_real_as_quantized_linear_to_double (Begin: , End: , Steps: )
~ <QuantizedLinear Begin End Steps> ~ ~ x86.UInt64
~ <QuantizedLinear Begin End Steps> ~ ~ native.UInt64
--> ~ native.Double
```
*dst = (double)Begin + ( *src * ((double)End - (double)Begin) ) / (double)Steps;
@ -98,7 +98,7 @@ morph_real_as_quantized_linear_to_double (Begin: , End: , Steps: )
morph_real_as_double_to_quantized_linear (Begin: , End: , Steps: )
~ native.Double
--> ~ <QuantizedLinear Begin End Steps> ~ ~ x86.UInt64
--> ~ <QuantizedLinear Begin End Steps> ~ ~ native.UInt64
```
*dst = ((*src - (double)Begin) * (double)Steps) / ((double)End - (double)Begin);
return 0;