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

© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 27 April 2004