POV-Ray : Newsgroups : povray.general : Numbers approaching infinity Server Time10 Aug 2022 02:21:07 EDT (-0400)
 Numbers approaching infinity (Message 1 to 3 of 3)
 From: Mike Horvath Subject: Numbers approaching infinity Date: 28 Mar 2021 20:09:43 Message: <60611ac7\$1@news.povray.org>
```
{
"@context": "https://schema.org",
"@type": "DiscussionForumPosting",
"@id": "#60611ac7%241%40news.povray.org",
"dateCreated": "2021-03-29T00:09:43+00:00",
"datePublished": "2021-03-29T00:09:43+00:00",
"author": {
"@type": "Person",
"name": "Mike Horvath"
}
}
tan(x) approaches infinity (i.e. undefined) as x approaches 90 degrees.

How do I detect when this happens and instead replace tan(x) with a very
very large number that is not undefined?

Thanks.

Mike
```
 From: Mike Horvath Subject: Re: Numbers approaching infinity Date: 28 Mar 2021 20:13:15 Message: <60611b9b\$1@news.povray.org>
```
{
"@context": "https://schema.org",
"@type": "DiscussionForumPosting",
"@id": "#60611b9b%241%40news.povray.org",
"dateCreated": "2021-03-29T00:13:15+00:00",
"datePublished": "2021-03-29T00:13:15+00:00",
"author": {
"@type": "Person",
"name": "Mike Horvath"
}
}
On 3/28/2021 8:09 PM, Mike Horvath wrote:
> tan(x) approaches infinity (i.e. undefined) as x approaches 90 degrees.
>
> How do I detect when this happens and instead replace tan(x) with a very
> very large number that is not undefined?
>
> Thanks.
>
>
> Mike

Or, approached differently, how do I express the largest angle that is
less than 90 degrees?

Thanks.

Mike
```
 From: Bald Eagle Subject: Re: Numbers approaching infinity Date: 29 Mar 2021 06:40:00 Message:
```
{
"@context": "https://schema.org",
"@type": "DiscussionForumPosting",
"dateCreated": "2021-03-29T10:40:00+00:00",
"datePublished": "2021-03-29T10:40:00+00:00",
"author": {
"@type": "Person",
"name": "Bald Eagle"
}
}
Mike Horvath <mik### [at] gmailcom> wrote:
> On 3/28/2021 8:09 PM, Mike Horvath wrote:
> > tan(x) approaches infinity (i.e. undefined) as x approaches 90 degrees.
> >
> > How do I detect when this happens and instead replace tan(x) with a very
> > very large number that is not undefined?
> >
> > Thanks.
> >
> >
> > Mike
>
>
> Or, approached differently, how do I express the largest angle that is
> less than 90 degrees?
>
> Thanks.
>
>
> Mike

tan is sin/cos   use select() to choose a different result when cos = 0 or some
(threshold-cos) is<= 0

select (threshold-cos(theta), alternate result , alternate result, tan result)
```