DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Floating point operations

Square root

IEEE requires the square root of a negative non-zero number to raise invalid operation, whereas UNIX® operating system compatibility requires square root to return 0.0 with errno set to EDOM. When you use the -Xt option to the cc command, the sqrt routine in the C compilation system returns 0.0 for negative non-zero inputs. Otherwise, the -Xt option operation conforms to IEEE requirements. When you use the -Xa or -Xc option, the square root of a negative non-zero number raises invalid operation and returns a NaN, in strict conformance with the IEEE standard.


Next topic: Compares and unordered condition
Previous topic: Conversion of floating point formats to integer

© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 02 June 2005