From bug-request at octave dot org Thu Dec 16 21:35:50 2004 Subject: Re: signbit on linux/gcc 3.2+b From: "John W. Eaton" To: Orion Poplawski Cc: bug at octave dot org Date: Thu, 16 Dec 2004 22:36:55 -0500 On 16-Dec-2004, Orion Poplawski wrote: | Does the following work on the sun? | | #include | #include | int | main (void) | { | std::cerr << signbit (-1.0) << std::endl; | | return 0; | } I don't see evidence of a signbit function or macro on the Sun systems that I have access to. They do have copysign, so | #define lo_ieee_signbit(x) (x < 0 || copysign (1.0, x) < 0) should be an option. | Just for fun, see | http://osl.iu.edu/~tveldhui/papers/techniques/techniques01.html I think some of these points are a bit pessimistic these days (the report is more than 4 years old now). I don't think current compilers are so bad. jwe ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------