Skip to main content
Stack Overflow
  1. About
  2. For Teams

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

Draft saved
Draft discarded
Cancel
2
  • 3
    What is your concern and why are you bothering with x * x == 0 instead of just x == 0? For x such that x * x == 0, I would expect sin(q) and sinh(q) to return q because the actual value of sin q and sinh q is so close to q that q is the closest representable value. Then both sin (q) / q and sinh (q) / q produce 1, as does 1 - x / 6 (because x is so small that 1 is the closest representable value to 1 − x/6). So what are you gaining with x * x == 0 instead of just x == 0? Commented May 10, 2025 at 14:41
  • @EricPostpischil My concern was that when |x| is small, then there is "not enough" information in the sub-normal mantissa to yield results in the error margin. Commented May 15, 2025 at 11:05

AltStyle によって変換されたページ (->オリジナル) /