Hi!
----
Is there a reason why ksh93 does not display the negative sign for the
value zero ? For example if I have use the C99 function "copysign"
(copies absolute value of operant a and sign of operant b) I get this
for { a=5, b=-0 }:
-- snip --
$ ksh93 -c 'float x; (( x=copysign(5, -0) )) ; printf "%f\n"
x'
-5.000000
-- snip --
Now if I swap operands a and b I get this result:
-- snip --
$ ksh93 -c 'float x; (( x=copysign(0, -5) )) ; printf "%f\n"
x'
0.000000
-- snip --
AFAIK this result should be "-0.000000" ... or not ?
BTW: Parsing of "-0" doesn't seem to work either, e.g.
-- snip --
$ ksh93 -c 'float x a=-1 b=-0; (( x=copysign(a, b) )) ; printf "%f\n"
x'
1.000000
-- snip --
... while AFAIK it should be "-1.000000" since the 2nd operand of
"copysign" defines the sign of the result.
----
Bye,
Roland
--
__ . . __
(o.\ \/ /.o) [EMAIL PROTECTED]
\__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer
/O /==\ O\ TEL +49 641 3992797
(;O/ \/ \O;)
_______________________________________________
ast-users mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-users