POV-Ray : Newsgroups : povray.bugreports : Erroneous edge case trigonometric function values : Re: Erroneous edge case trigonometric function values Server Time
19 Oct 2025 03:21:40 EDT (-0400)
  Re: Erroneous edge case trigonometric function values  
From: Cousin Ricky
Date: 16 Oct 2025 01:16:52
Message: <68f07fc4$1@news.povray.org>
On 2025-10-15 22:22 (-4), Bald Eagle wrote:
> 
> It appears that at 90 degrees (pi/2), tan and sec do not equal Inf.
> so
> #declare csc = function (N) {select (sin(N), 1/sin(N), Inf, 1/sin(N))}
> failed.
> I had to test against 1E10.

This isn't so much a bug as a floating point limitation.  Pi/2 has no
exact representation in binary, so you never get exactly 90 degrees.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.