; math_data.asm ; ; Constants and other data used by ; the math library: include math.inc .const ; math_nan is a special constant that functions return ; if the input value is out of range (resulting in a ; zero division or an attempt to compute the square ; root of a negative number). In IEEE 753 floating- ; point form (which x86-64 uses), a NaN is a value ; with all the exponent bits set and a non-zero ; mantissa. This code just sets all the bits in ; the number to 1 (which the C stdlib prints as ; "-nan"). math_nan qword 0ffffffffffffffffh math_nan10 tbyte 0ffffffffffffffffffffh ; math_if is a special constant that functions return ; if the input value is +inf. Inf is a value with ; all the exponent bits set and all the mantissa ; bits zero. math_minf qword 0fff0000000000000h math_minf10 tbyte 0ffffc000000000000000h math_inf qword 07ff0000000000000h math_inf10 tbyte 07fff8000000000000000h end