Skip to content

Commit 517afa6

Browse files
committed
rtutils: use jl_strtof_c to convert strings to float
indirect conversion (string->double->float) will lose precision
1 parent 9df7b0e commit 517afa6

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

src/rtutils.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -518,11 +518,7 @@ JL_DLLEXPORT jl_nullable_float32_t jl_try_substrtof(char *str, size_t offset, si
518518
bstr = newstr;
519519
pend = bstr+len;
520520
}
521-
#if defined(_OS_WINDOWS_) && !defined(_COMPILER_GCC_)
522-
float out = (float)jl_strtod_c(bstr, &p);
523-
#else
524521
float out = jl_strtof_c(bstr, &p);
525-
#endif
526522

527523
if (errno==ERANGE && (out==0 || out==HUGE_VALF || out==-HUGE_VALF)) {
528524
hasvalue = 0;

0 commit comments

Comments
 (0)