File tree 2 files changed +4
-7
lines changed
2 files changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -111,10 +111,6 @@ float float16to32(float16_s f16) {
111
111
return f32 .v ;
112
112
}
113
113
114
- //float float64to16(float16_s f16) {
115
- // half s;
116
- //}
117
-
118
114
#pragma pack(4)
119
115
typedef union {
120
116
u16 num ;
@@ -799,12 +795,12 @@ static REBCNT EncodedU32_Size(u32 value) {
799
795
case SYM_FLOAT :
800
796
f32 .v = (float )(IS_INTEGER (next ) ? VAL_INT64 (next ) : VAL_DECIMAL (next ));
801
797
memcpy (cp , (REBYTE * )& f32 , 4 );
802
- cp + = 4 ;
798
+ n = 4 ;
803
799
break ;
804
800
case SYM_DOUBLE :
805
801
dbl = (REBDEC )(IS_INTEGER (next ) ? VAL_INT64 (next ) : VAL_DECIMAL (next ));
806
802
memcpy (cp , (REBYTE * )& dbl , 8 );
807
- cp + = 8 ;
803
+ n = 8 ;
808
804
break ;
809
805
case SYM_FLOAT16 :
810
806
d32 = (REBDEC )(IS_INTEGER (next ) ? VAL_INT64 (next ) : VAL_DECIMAL (next ));
@@ -827,7 +823,7 @@ static REBCNT EncodedU32_Size(u32 value) {
827
823
ushort = (u16 )t1 ;
828
824
}
829
825
memcpy (cp , (REBYTE * )& ushort , 2 );
830
- cp + = 2 ;
826
+ n = 2 ;
831
827
break ;
832
828
833
829
case SYM_AT :
Original file line number Diff line number Diff line change @@ -337,6 +337,7 @@ is-protected-error?: func[code][
337
337
--test-- "BinCode - FLOAT16, FLOAT, DOUBLE (write/read NAN)"
338
338
b: binary/write #{} [float16 1. #NaN float 1. #NaN double 1. #NaN ]
339
339
--assert b/buffer = #{ 007E0000C07F000000000000F87F }
340
+ --assert tail? b/buffer-write
340
341
;@@ using MOLD as: 1.#nan <> 1.#nan
341
342
--assert "[1.#NaN 1.#NaN 1.#NaN]" = mold binary/read b [float16 float double]
342
343
You can’t perform that action at this time.
0 commit comments