Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Zwinkau
libfirm
Commits
a2fb8de6
Commit
a2fb8de6
authored
Jul 18, 2007
by
Michael Beck
Browse files
fixed fc_val_from_str() do NOT produce values with more significant bits than requested in the mode
[r15236]
parent
bd8f05b0
Changes
1
Hide whitespace changes
Inline
Side-by-side
ir/tv/fltcalc.c
View file @
a2fb8de6
...
...
@@ -1077,19 +1077,21 @@ done:
return result;
#else
/* XXX excuse of an implementation to make things work */
LLDBL
val
;
char
*
tmp
=
alloca
(
calc_buffer_size
);
(
void
)
len
;
#ifdef HAVE_LONG_DOUBLE
val
=
strtold
(
str
,
NULL
);
DEBUGPRINTF
((
"val_from_str(%s)
\n
"
,
str
));
fc_val_from_float
(
val
,
15
,
64
,
tmp
);
#else
val
=
strtod
(
str
,
NULL
);
#endif
DEBUGPRINTF
((
"val_from_str(%s)
\n
"
,
str
));
return
fc_val_from_float
(
val
,
exp_size
,
mant_size
,
result
);
fc_val_from_float
(
val
,
11
,
52
,
tmp
);
#endif
/* HAVE_LONG_DOUBLE */
return
fc_cast
(
tmp
,
exp_size
,
mant_size
,
result
);
#endif
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment