notes:ieee_754-1985

This shows you the differences between two versions of the page.

Both sides previous revision Previous revision Next revision | Previous revision | ||

notes:ieee_754-1985 [2013/02/24 00:11] andy [Normalised Values] |
notes:ieee_754-1985 [2013/02/24 00:18] andy [NaN] |
||
---|---|---|---|

Line 90: | Line 90: | ||

^ Significand | Zero | | ^ Significand | Zero | | ||

- | A value of exactly zero is represented by a exponent and significand of zero. The sign bit may be set or unset and IEEE 754 has the concept of both a positive and negative zero. For standard comparisons, however, these will both compare equal with zero, so the comparison **-0.0 < 0.0** yields **false**. | + | A value of exactly zero is represented by a exponent and significand of zero. The sign bit may be set or unset and IEEE 754 has the concept of both a positive and negative zero. For standard comparisons, however, these will both compare equal with zero, so the comparison $-0.0 < 0.0$ yields **false**. |

To determine the sign of a floating point value including zero, the ''[[man>copysign|copysign()]]'' function can be used with a non-zero value, or the ''[[man>signbit|signbit()]]'' macro can be used more directly on some platforms (not available on WinCE, for example). | To determine the sign of a floating point value including zero, the ''[[man>copysign|copysign()]]'' function can be used with a non-zero value, or the ''[[man>signbit|signbit()]]'' macro can be used more directly on some platforms (not available on WinCE, for example). | ||

Line 118: | Line 118: | ||

* Operations which are provided an existing NaN value as an argument. | * Operations which are provided an existing NaN value as an argument. | ||

* Operations whose results are mathematically indeterminate - some examples are listed below: | * Operations whose results are mathematically indeterminate - some examples are listed below: | ||

- | * **0.0 / 0.0** and **±∞ / ±∞** | + | * $0.0 / 0.0$ and $\pm\infty / \pm\infty$ |

- | * **0.0 x ±∞** | + | * $0.0 \times \pm\infty$ |

- | * **∞ -- ∞** and equivalents | + | * $\infty - \infty$ and equivalents |

* Operations which yield complex results - some examples are listed below: | * Operations which yield complex results - some examples are listed below: | ||

- | * **√--n** | + | * $\sqrt{-n}$ |

- | * **log(--n)** | + | * $\log{-n}$ |

- | * **sin⁻¹(x)** or **cos⁻¹(x)** where **x < --1** or **x > 1** | + | * $\sin^{-1}{x}$ or $\cos^{-1}{x}$ where $x < -1$ or $x > 1$ |

===== Limits ===== | ===== Limits ===== |

notes/ieee_754-1985.txt · Last modified: 2013/02/24 00:18 by andy