Roland Mainz
2013-08-12 18:15:21 UTC
[Removing ast-users at lists.research.att.com]
src/cmd/ksh93/data/math.tab could return all three variants (for {
|float|, |double|, |long double| }) and |fun| in |arith_exec()| would
be a pointer to an array of these three variants. That would make the
support for |float| and |double| generic and remove all the
|if()|/|switch()| mess from the "hot" codepath...
That is IMO the only solution which covers *all* corner cases, i.e. if|float|, |double|, |long double| }) and |fun| in |arith_exec()| would
be a pointer to an array of these three variants. That would make the
support for |float| and |double| generic and remove all the
|if()|/|switch()| mess from the "hot" codepath...
an overflow/underflow or creation of subnormal numbers in a math
function happens. Smaller datatypes mean you'll hit the limits earlier
than for larger datatypes and not all float/double functions behave
like doing the same operation with a long double datatype and then
cast the result to the requested datatype.
does posix fprintf(3) have a way to print (float) values?
I looked a few times and didn't find any
that the |float| value is promoted to |double| when put in a varargs
list ?
----
Bye,
Roland
--
__ . . __
(o.\ \/ /.o) roland.mainz at nrubsig.org
\__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer
/O /==\ O\ TEL +49 641 3992797
(;O/ \/ \O;)
__ . . __
(o.\ \/ /.o) roland.mainz at nrubsig.org
\__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer
/O /==\ O\ TEL +49 641 3992797
(;O/ \/ \O;)