Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

No amount of genius can overcome a preoccupation with detail.


devel / comp.lang.c / Re: Radians Or Degrees?

SubjectAuthor
* Radians Or Degrees?Lawrence D'Oliveiro
+* Re: Radians Or Degrees?James Kuyper
|`* Re: Radians Or Degrees?Michael S
| `* Re: Radians Or Degrees?Lawrence D'Oliveiro
|  `* Re: Radians Or Degrees?Steven G. Kargl
|   `* Re: Radians Or Degrees?Lawrence D'Oliveiro
|    `* Re: Radians Or Degrees?Steven G. Kargl
|     `* Re: Radians Or Degrees?Lawrence D'Oliveiro
|      +* Re: Radians Or Degrees?Michael S
|      |+- Re: Radians Or Degrees?Lawrence D'Oliveiro
|      |+* Re: Radians Or Degrees?MitchAlsup1
|      ||`* Re: Radians Or Degrees?Steven G. Kargl
|      || +* Re: Radians Or Degrees?Chris M. Thomasson
|      || |`* Re: Radians Or Degrees?Chris M. Thomasson
|      || | `* Re: Radians Or Degrees?MitchAlsup1
|      || |  `* Re: Radians Or Degrees?Chris M. Thomasson
|      || |   `* Re: Radians Or Degrees?Lawrence D'Oliveiro
|      || |    `* Re: Radians Or Degrees?Chris M. Thomasson
|      || |     `* Re: Radians Or Degrees?Lawrence D'Oliveiro
|      || |      `* Re: Radians Or Degrees?Chris M. Thomasson
|      || |       +- Re: Radians Or Degrees?Lawrence D'Oliveiro
|      || |       `- Re: Radians Or Degrees?Chris M. Thomasson
|      || +* Re: Radians Or Degrees?MitchAlsup1
|      || |`* Re: Radians Or Degrees?Terje Mathisen
|      || | `* Re: Radians Or Degrees?Michael S
|      || |  +* Re: Radians Or Degrees?MitchAlsup1
|      || |  |+* Re: Radians Or Degrees?MitchAlsup1
|      || |  ||`- Re: Radians Or Degrees?Terje Mathisen
|      || |  |+* Re: Radians Or Degrees?Lawrence D'Oliveiro
|      || |  ||+- Re: Radians Or Degrees?Chris M. Thomasson
|      || |  ||`* Re: Radians Or Degrees?MitchAlsup1
|      || |  || `* Re: Radians Or Degrees?Chris M. Thomasson
|      || |  ||  `- Re: Radians Or Degrees?Chris M. Thomasson
|      || |  |`- Re: Radians Or Degrees?Michael S
|      || |  +* Re: Radians Or Degrees?Terje Mathisen
|      || |  |+* Re: Radians Or Degrees?Michael S
|      || |  ||`* Re: Radians Or Degrees?MitchAlsup1
|      || |  || `- Re: Radians Or Degrees?Terje Mathisen
|      || |  |`* Re: Radians Or Degrees?Chris M. Thomasson
|      || |  | +* Re: Radians Or Degrees?Chris M. Thomasson
|      || |  | |`- Re: Radians Or Degrees?Chris M. Thomasson
|      || |  | +* Re: Radians Or Degrees?Keith Thompson
|      || |  | |+* Re: Radians Or Degrees?Chris M. Thomasson
|      || |  | ||`* Re: Radians Or Degrees?Chris M. Thomasson
|      || |  | || `* Re: Radians Or Degrees?Keith Thompson
|      || |  | ||  `* Re: Radians Or Degrees?Chris M. Thomasson
|      || |  | ||   `- Re: Radians Or Degrees?Chris M. Thomasson
|      || |  | |`* Re: Radians Or Degrees?MitchAlsup1
|      || |  | | `* Re: Radians Or Degrees?Michael S
|      || |  | |  `* Re: Radians Or Degrees?MitchAlsup1
|      || |  | |   +- Re: Radians Or Degrees?Scott Lurndal
|      || |  | |   +- Re: Radians Or Degrees?Michael S
|      || |  | |   `* Re: Radians Or Degrees?Keith Thompson
|      || |  | |    +* Re: Radians Or Degrees?bart
|      || |  | |    |`* Re: Radians Or Degrees?Keith Thompson
|      || |  | |    | `* Re: Radians Or Degrees?bart
|      || |  | |    |  `* Re: Radians Or Degrees?Keith Thompson
|      || |  | |    |   `- Re: Radians Or Degrees?David Brown
|      || |  | |    `* Re: Radians Or Degrees?Michael S
|      || |  | |     +- Re: Radians Or Degrees?Michael S
|      || |  | |     `* Re: Radians Or Degrees?bart
|      || |  | |      `- Re: Radians Or Degrees?Michael S
|      || |  | `- Re: Radians Or Degrees?Chris M. Thomasson
|      || |  `* Re: Radians Or Degrees?Stefan Monnier
|      || |   `* Re: Radians Or Degrees?MitchAlsup1
|      || |    `* Re: Radians Or Degrees?Stefan Monnier
|      || |     +* Re: Radians Or Degrees?Michael S
|      || |     |+* Re: Radians Or Degrees?Stefan Monnier
|      || |     ||`* Re: Radians Or Degrees?MitchAlsup1
|      || |     || `* Re: Radians Or Degrees?Terje Mathisen
|      || |     ||  `* Re: Radians Or Degrees?Michael S
|      || |     ||   +- Re: Radians Or Degrees?MitchAlsup1
|      || |     ||   `- Re: Radians Or Degrees?Terje Mathisen
|      || |     |+* Re: Radians Or Degrees?Steven G. Kargl
|      || |     ||`- Re: Radians Or Degrees?MitchAlsup1
|      || |     |`* Re: Radians Or Degrees?MitchAlsup1
|      || |     | `- Re: Radians Or Degrees?Michael S
|      || |     +* Re: Radians Or Degrees?MitchAlsup1
|      || |     |`- Re: Radians Or Degrees?Stefan Monnier
|      || |     `- Re: Radians Or Degrees?Terje Mathisen
|      || `* Re: Radians Or Degrees?Michael S
|      ||  `* Re: Radians Or Degrees?MitchAlsup1
|      ||   `* Re: Radians Or Degrees?Steven G. Kargl
|      ||    +* Re: Radians Or Degrees?MitchAlsup1
|      ||    |+* Re: Radians Or Degrees?Lawrence D'Oliveiro
|      ||    ||`* Re: Radians Or Degrees?Steven G. Kargl
|      ||    || +* Re: Radians Or Degrees?Lawrence D'Oliveiro
|      ||    || |`* Re: Radians Or Degrees?Steven G. Kargl
|      ||    || | `- Re: Radians Or Degrees?Kaz Kylheku
|      ||    || `* Re: Radians Or Degrees?Lawrence D'Oliveiro
|      ||    ||  `* Re: Radians Or Degrees?Steven G. Kargl
|      ||    ||   `- Re: Radians Or Degrees?MitchAlsup1
|      ||    |`- Re: Radians Or Degrees?Steven G. Kargl
|      ||    +* Re: Radians Or Degrees?Lawrence D'Oliveiro
|      ||    |+* Re: Radians Or Degrees?Ben Bacarisse
|      ||    ||`* Re: Radians Or Degrees?Lawrence D'Oliveiro
|      ||    || `* Re: Radians Or Degrees?Ben Bacarisse
|      ||    ||  +* Re: Radians Or Degrees?Lawrence D'Oliveiro
|      ||    ||  |`* Re: Radians Or Degrees?Ben Bacarisse
|      ||    ||  | +* Re: Radians Or Degrees?Kaz Kylheku
|      ||    ||  | |`* Re: Radians Or Degrees?Ben Bacarisse
|      ||    ||  | `* Re: Radians Or Degrees?Lawrence D'Oliveiro
|      ||    ||  `- Re: Radians Or Degrees?Tim Rentsch
|      ||    |+- Re: Radians Or Degrees?Kaz Kylheku
|      ||    |`* Re: Radians Or Degrees?James Kuyper
|      ||    `* Re: Radians Or Degrees?Terje Mathisen
|      |`- Re: Radians Or Degrees?Terje Mathisen
|      `* Re: Radians Or Degrees?Steven G. Kargl
+* Re: Radians Or Degrees?fir
+* Re: Radians Or Degrees?Malcolm McLean
+- Re: Radians Or Degrees?David Brown
`* Re: Radians Or Degrees?Blue-Maned_Hawk

Pages:1234567
GGs [was Radians Or Degrees?]

<ura88p$ikrn$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=35136&group=comp.lang.c#35136

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: richard.nospam@gmail.invalid (Richard Harnden)
Newsgroups: comp.lang.c
Subject: GGs [was Radians Or Degrees?]
Date: Fri, 23 Feb 2024 13:57:42 +0000
Organization: A noiseless patient Spider
Lines: 38
Message-ID: <ura88p$ikrn$1@dont-email.me>
References: <ur5trn$3d64t$1@dont-email.me> <ur605r$3fe50$1@i2pn2.org>
<ur69i3$3ftgj$2@dont-email.me> <87plwobmjm.fsf@bsb.me.uk>
Reply-To: richard.harnden@invalid.com
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 23 Feb 2024 13:57:45 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="73791579f2da41f1f2e2df27df24fb96";
logging-data="611191"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18F7oTsHmCnqw7fZRJf8Yej7POe5EO/YBI="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:jAIpUoR8TC2XzqEE8X1P8+DzXCM=
In-Reply-To: <87plwobmjm.fsf@bsb.me.uk>
Content-Language: en-GB
 by: Richard Harnden - Fri, 23 Feb 2024 13:57 UTC

On 22/02/2024 14:28, Ben Bacarisse wrote:
> Lawrence D'Oliveiro <ldo@nz.invalid> writes:
>
>> On Thu, 22 Feb 2024 00:15:47 +0100, fir wrote:
>>
>>> if someone knows the reason why "6.28" radians are expected to better
>>> than "1.0" 'circkles' in both mathemathics and assembly tell me - as i
>>> dont know the reason
>>
>> It’s because trig calculations are most naturally done in radians. E.g.
>> the approximation
>>
>> sin x ≅ tan x ≅ x as x → 0
>>
>> works only if x is in radians.
>
> No, that applies to lots of angle measures. Radians are the natural
> angle measure because we want sin' x = cos x and cos' x = -sin x. sin
> and cos are the unique solution to that pair of differential equations
> (with initial conditions sin 0 = 0 and cos 0 = 1).
>
>> Also the Euler identity
>>
>> ix
>> e = cos x + i sin x
>>
>> only holds if x is in radians. And so on and so on.
>
> Yes, and there's another nod to the calculus here because just as sin an
> cos are (with a minus sign) derivatives of each other, e^x is the
> derivative of itself.
>

And that has the dubious honour of being that last article to make it
onto google-groups.

Congratulations, I guess.

Re: GGs [was Radians Or Degrees?]

<uraqte$mu6m$2@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=35137&group=comp.lang.c#35137

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: chris.m.thomasson.1@gmail.com (Chris M. Thomasson)
Newsgroups: comp.lang.c
Subject: Re: GGs [was Radians Or Degrees?]
Date: Fri, 23 Feb 2024 11:15:58 -0800
Organization: A noiseless patient Spider
Lines: 45
Message-ID: <uraqte$mu6m$2@dont-email.me>
References: <ur5trn$3d64t$1@dont-email.me> <ur605r$3fe50$1@i2pn2.org>
<ur69i3$3ftgj$2@dont-email.me> <87plwobmjm.fsf@bsb.me.uk>
<ura88p$ikrn$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 23 Feb 2024 19:15:58 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="59f8a5d379a676625decc575bcbd250b";
logging-data="751830"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+r72EDa98CghMalx5QfxIz6nh4eZQz+4o="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:CPXNjpOfjw2Slzp5ZygH/G8B5EY=
Content-Language: en-US
In-Reply-To: <ura88p$ikrn$1@dont-email.me>
 by: Chris M. Thomasson - Fri, 23 Feb 2024 19:15 UTC

On 2/23/2024 5:57 AM, Richard Harnden wrote:
> On 22/02/2024 14:28, Ben Bacarisse wrote:
>> Lawrence D'Oliveiro <ldo@nz.invalid> writes:
>>
>>> On Thu, 22 Feb 2024 00:15:47 +0100, fir wrote:
>>>
>>>> if someone knows the reason why "6.28" radians are expected to better
>>>> than "1.0" 'circkles' in both mathemathics and assembly tell me - as i
>>>> dont know the reason
>>>
>>> It’s because trig calculations are most naturally done in radians. E.g.
>>> the approximation
>>>
>>>      sin x ≅ tan x ≅ x as x → 0
>>>
>>> works only if x is in radians.
>>
>> No, that applies to lots of angle measures.  Radians are the natural
>> angle measure because we want sin' x = cos x and cos' x = -sin x.  sin
>> and cos are the unique solution to that pair of differential equations
>> (with initial conditions sin 0 = 0 and cos 0 = 1).
>>
>>> Also the Euler identity
>>>
>>>       ix
>>>      e   = cos x + i sin x
>>>
>>> only holds if x is in radians. And so on and so on.
>>
>> Yes, and there's another nod to the calculus here because just as sin an
>> cos are (with a minus sign) derivatives of each other, e^x is the
>> derivative of itself.
>>
>
> And that has the dubious honour of being that last article to make it
> onto google-groups.

No shit? wow.

>
> Congratulations, I guess.
>

:^D

Re: GGs [was Radians Or Degrees?]

<urargo$mufk$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=35138&group=comp.lang.c#35138

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: richard.nospam@gmail.invalid (Richard Harnden)
Newsgroups: comp.lang.c
Subject: Re: GGs [was Radians Or Degrees?]
Date: Fri, 23 Feb 2024 19:26:16 +0000
Organization: A noiseless patient Spider
Lines: 43
Message-ID: <urargo$mufk$1@dont-email.me>
References: <ur5trn$3d64t$1@dont-email.me> <ur605r$3fe50$1@i2pn2.org>
<ur69i3$3ftgj$2@dont-email.me> <87plwobmjm.fsf@bsb.me.uk>
<ura88p$ikrn$1@dont-email.me> <uraqte$mu6m$2@dont-email.me>
Reply-To: nospam.harnden@invalid.com
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 23 Feb 2024 19:26:17 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="2d793422bb8d7e18426dfe942e5311b2";
logging-data="752116"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/R7ePFsO21e7ixgDaAZzvQ98FN7HnkL0s="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:ZiyVcWrnwk6QIGo184m4iE2Pjhk=
In-Reply-To: <uraqte$mu6m$2@dont-email.me>
Content-Language: en-GB
 by: Richard Harnden - Fri, 23 Feb 2024 19:26 UTC

On 23/02/2024 19:15, Chris M. Thomasson wrote:
> On 2/23/2024 5:57 AM, Richard Harnden wrote:
>> On 22/02/2024 14:28, Ben Bacarisse wrote:
>>> Lawrence D'Oliveiro <ldo@nz.invalid> writes:
>>>
>>>> On Thu, 22 Feb 2024 00:15:47 +0100, fir wrote:
>>>>
>>>>> if someone knows the reason why "6.28" radians are expected to better
>>>>> than "1.0" 'circkles' in both mathemathics and assembly tell me - as i
>>>>> dont know the reason
>>>>
>>>> It’s because trig calculations are most naturally done in radians. E.g.
>>>> the approximation
>>>>
>>>>      sin x ≅ tan x ≅ x as x → 0
>>>>
>>>> works only if x is in radians.
>>>
>>> No, that applies to lots of angle measures.  Radians are the natural
>>> angle measure because we want sin' x = cos x and cos' x = -sin x.  sin
>>> and cos are the unique solution to that pair of differential equations
>>> (with initial conditions sin 0 = 0 and cos 0 = 1).
>>>
>>>> Also the Euler identity
>>>>
>>>>       ix
>>>>      e   = cos x + i sin x
>>>>
>>>> only holds if x is in radians. And so on and so on.
>>>
>>> Yes, and there's another nod to the calculus here because just as sin an
>>> cos are (with a minus sign) derivatives of each other, e^x is the
>>> derivative of itself.
>>>
>>
>> And that has the dubious honour of being that last article to make it
>> onto google-groups.
>
> No shit? wow.

For clc, I mean.

Re: Radians Or Degrees?

<59454a79216ece74ac3fee0e00473357@www.novabbs.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=35139&group=comp.lang.c#35139

  copy link   Newsgroups: comp.lang.c comp.arch
Path: i2pn2.org!.POSTED!not-for-mail
From: mitchalsup@aol.com (MitchAlsup1)
Newsgroups: comp.lang.c,comp.arch
Subject: Re: Radians Or Degrees?
Date: Fri, 23 Feb 2024 20:02:00 +0000
Organization: Rocksolid Light
Message-ID: <59454a79216ece74ac3fee0e00473357@www.novabbs.org>
References: <ur5trn$3d64t$1@dont-email.me> <ur5v05$3ccut$1@dont-email.me> <20240222015920.00000260@yahoo.com> <ur69j9$3ftgj$3@dont-email.me> <ur86eg$1aip$1@dont-email.me> <ur88e4$1rr1$5@dont-email.me> <ur8a2p$2446$1@dont-email.me> <ur8ctk$2vbd$2@dont-email.me> <20240222233838.0000572f@yahoo.com> <3b2e86cdb0ee8785b4405ab10871c5ca@www.novabbs.org> <ur8nud$4n1r$1@dont-email.me> <20240223143250.000012a8@yahoo.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: i2pn2.org;
logging-data="3878864"; mail-complaints-to="usenet@i2pn2.org";
posting-account="PGd4t4cXnWwgUWG9VtTiCsm47oOWbHLcTr4rYoM0Edo";
User-Agent: Rocksolid Light
X-Spam-Checker-Version: SpamAssassin 4.0.0
X-Rslight-Site: $2y$10$qmYgHqMOdaz/SJ1Lf01OiewFUXdP0RphfUcTBGnzWCmRuv6oXANV.
X-Rslight-Posting-User: ac58ceb75ea22753186dae54d967fed894c3dce8
 by: MitchAlsup1 - Fri, 23 Feb 2024 20:02 UTC

Michael S wrote:

> On Fri, 23 Feb 2024 00:13:02 -0000 (UTC)
> "Steven G. Kargl" <sgk@REMOVEtroutmask.apl.washington.edu> wrote:

>> On Thu, 22 Feb 2024 22:57:20 +0000, MitchAlsup1 wrote:
>>
>> >
>> > I have a patent on doing argument reduction for sin(x) in 4
>> > cycles...that is as good as Payne-Haneok argument reduction over
>> > -infinity..+infinity
>>
>> By a strange coincidence, I have the Payn-Hanek paper on the
>> top of stack of papers on my desk. Still need to internalize
>> the details.
>>

> Payne-Hanek is a right answer to a wrong question.

If someone looking for fast sin(x) you are correct, for a person looking
for the best possible (correctly rounded) result, you are not. In any
event I have driven that monstrosity down from 50-odd cycles to 4--
making it at least palatable.

> In science/engineering floating-point number x represents a range
> [x-ULP:x+ULP] with hopefully much higher probability of being in range
> [x-ULP/2:x+ULP/2]. However in this reduced range probability is flat,
> an "exact" x is no worse and no better than any other point within this
> range.
> Which means that when we look for y=sin(x) then for
> scientific/engineering purposes any answer in range*
> [sin(x-ULP/2):sin(x+ULP/2)] is as "right" as any other answer. The
> right answer to the question "What is a sin() of IEEE-754 binary64
> number 1e17?" is "Anything in range [-1:1]". The wise and useful answer
> to the same question is "You're holding it wrong".

There are verification tests that know the exact value of both x and sin(x).
For these uses you argument is not valid--however I am willing to grant
that outside of verification, and in actual use, your argument holds as
well ad the noise in the data provides.

> * in paragraph Sin(x) designates result calculated with infinite
> precision.

Re: Radians Or Degrees?

<uraus6$nn9u$2@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=35140&group=comp.lang.c#35140

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ldo@nz.invalid (Lawrence D'Oliveiro)
Newsgroups: comp.lang.c
Subject: Re: Radians Or Degrees?
Date: Fri, 23 Feb 2024 20:23:34 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 31
Message-ID: <uraus6$nn9u$2@dont-email.me>
References: <ur5trn$3d64t$1@dont-email.me>
<pan$d0f42$eeb000fb$9b95dafc$a5a80129@invalid.invalid>
<ur76he$3qbhl$2@dont-email.me> <ur87th$1rr1$2@dont-email.me>
<ur8ajp$2itt$1@dont-email.me> <ur8chu$2vbd$1@dont-email.me>
<ur9l8f$egmh$1@dont-email.me> <ura10f$h2pm$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 23 Feb 2024 20:23:34 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="1c30df426ba638bd6ae2f81f1dfd3d68";
logging-data="777534"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/FdNzhfVwq5ncKI5vN3WjE"
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:0/fHF01mozu9FZaJ4BYhI9khwJc=
 by: Lawrence D'Oliv - Fri, 23 Feb 2024 20:23 UTC

On Fri, 23 Feb 2024 12:53:49 +0100, Janis Papanagnou wrote:

> On 22/02/2024 21:58, Lawrence D'Oliveiro wrote:
>
>> On Thu, 22 Feb 2024 21:25:28 +0100, Janis Papanagnou wrote:
>>
>>> Not the range of the unique divisors alone might be relevant but also
>>> the number of duplicate divisors. As integer 30 is not dividable by 4
>>> (which is a very common partition!), for example, but 360 is...
>>
>> Doesn’t matter, because a fraction with a divisor that is any power of
>> 2 is exactly representable in base-30.
>
> I don't understand what you mean by "exactly representable", where the
> analogon of the numeric e.g. "7.5" is concerned.

E.g. using “a” .. “t” to represent the digits with (decimal) values 10 ..
29 in base-30:

1 / 2 = 0.f
1 / 2² = 0.7f
1 / 2³ = 0.3mf
1 / 3 = 0.a
1 / 3² = 0.3a
1 / 3³ = 0.13a
1 / 5 = 0.6
1 / 6 = 0.5

All those fractions are exact.

(And all worked out in my head, for better or for worse.)

Re: Radians Or Degrees?

<urav5o$nqvp$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=35141&group=comp.lang.c#35141

  copy link   Newsgroups: comp.lang.c comp.arch
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: chris.m.thomasson.1@gmail.com (Chris M. Thomasson)
Newsgroups: comp.lang.c,comp.arch
Subject: Re: Radians Or Degrees?
Date: Fri, 23 Feb 2024 12:28:40 -0800
Organization: A noiseless patient Spider
Lines: 31
Message-ID: <urav5o$nqvp$1@dont-email.me>
References: <ur5trn$3d64t$1@dont-email.me> <ur5v05$3ccut$1@dont-email.me>
<20240222015920.00000260@yahoo.com> <ur69j9$3ftgj$3@dont-email.me>
<ur86eg$1aip$1@dont-email.me> <ur88e4$1rr1$5@dont-email.me>
<ur8a2p$2446$1@dont-email.me> <ur8ctk$2vbd$2@dont-email.me>
<20240222233838.0000572f@yahoo.com>
<3b2e86cdb0ee8785b4405ab10871c5ca@www.novabbs.org>
<ur8nud$4n1r$1@dont-email.me> <ur8q2k$5nfr$1@dont-email.me>
<ur8qlp$5nfr$2@dont-email.me>
<a2a5c98883cafb6ab19668403b2dfb15@www.novabbs.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 23 Feb 2024 20:28:40 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="59f8a5d379a676625decc575bcbd250b";
logging-data="781305"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+2BzkDaIf61zdePDoL4OrEkVsWagDCc+8="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:4ORVZuwLiTvT2Sk/OCwMeLrvcA0=
Content-Language: en-US
In-Reply-To: <a2a5c98883cafb6ab19668403b2dfb15@www.novabbs.org>
 by: Chris M. Thomasson - Fri, 23 Feb 2024 20:28 UTC

On 2/22/2024 6:42 PM, MitchAlsup1 wrote:
> Chris M. Thomasson wrote:
>
>> On 2/22/2024 4:49 PM, Chris M. Thomasson wrote:
>> [...]> Use some form of arbitrary precision if you want to get to:
>>>
>>> A 10^4141 zoom mset zoom!? It must took many hours to render... ;^)
>>>
>>> https://youtu.be/Xjy_HSUujaw
>
>> A 10^275 zoom:
>
>> https://youtu.be/0jGaio87u3A
>
> Argument reduction zoom::
>
> COS( 6381956970095103×2^797) = -4.68716592425462761112×10-19
>
> You can argue all you want about whether this has any significance, but
> it happens to be the value closest to that radian argument when performed
> with infinite precision.

Well, I use a lot of trig wrt my work. One example is getting at the
roots of complex numbers, polar form to rectangular form, ect... So
zooming in "deep" on say, something like my MultiJulia IFS work is going
to require arbitrary precision trig...

https://paulbourke.net/fractals/multijulia

Btw, my friend Paul took the time to create this nice write up and all
of the renders of my MultiJulia IFS experiment.

Re: Radians Or Degrees?

<uravp3$nl44$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=35142&group=comp.lang.c#35142

  copy link   Newsgroups: comp.lang.c comp.arch
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: sgk@REMOVEtroutmask.apl.washington.edu (Steven G. Kargl)
Newsgroups: comp.lang.c,comp.arch
Subject: Re: Radians Or Degrees?
Date: Fri, 23 Feb 2024 20:38:59 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 73
Message-ID: <uravp3$nl44$1@dont-email.me>
References: <ur5trn$3d64t$1@dont-email.me> <ur5v05$3ccut$1@dont-email.me>
<20240222015920.00000260@yahoo.com> <ur69j9$3ftgj$3@dont-email.me>
<ur86eg$1aip$1@dont-email.me> <ur88e4$1rr1$5@dont-email.me>
<ur8a2p$2446$1@dont-email.me> <ur8ctk$2vbd$2@dont-email.me>
<20240222233838.0000572f@yahoo.com>
<3b2e86cdb0ee8785b4405ab10871c5ca@www.novabbs.org>
<ur8nud$4n1r$1@dont-email.me> <20240223143250.000012a8@yahoo.com>
<59454a79216ece74ac3fee0e00473357@www.novabbs.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 23 Feb 2024 20:38:59 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="f058e4aa9102f5c2d724a15a297c9af0";
logging-data="775300"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18gtUhlJi/69DChgU7HkXib"
User-Agent: Pan/0.145 (Duplicitous mercenary valetism; d7e168a
git.gnome.org/pan2)
Cancel-Lock: sha1:sWo2dsB2f4VUbPgFzNaRDJWej1g=
 by: Steven G. Kargl - Fri, 23 Feb 2024 20:38 UTC

On Fri, 23 Feb 2024 20:02:00 +0000, MitchAlsup1 wrote:

> Michael S wrote:
>
>> On Fri, 23 Feb 2024 00:13:02 -0000 (UTC)
>> "Steven G. Kargl" <sgk@REMOVEtroutmask.apl.washington.edu> wrote:
>
>>> On Thu, 22 Feb 2024 22:57:20 +0000, MitchAlsup1 wrote:
>>>
>>>
>>> > I have a patent on doing argument reduction for sin(x) in 4
>>> > cycles...that is as good as Payne-Haneok argument reduction over
>>> > -infinity..+infinity
>>>
>>> By a strange coincidence, I have the Payn-Hanek paper on the top of
>>> stack of papers on my desk. Still need to internalize the details.
>>>
>>>
>> Payne-Hanek is a right answer to a wrong question.
>
> If someone looking for fast sin(x) you are correct, for a person looking
> for the best possible (correctly rounded) result, you are not. In any
> event I have driven that monstrosity down from 50-odd cycles to 4--
> making it at least palatable.
>
>> In science/engineering floating-point number x represents a range
>> [x-ULP:x+ULP] with hopefully much higher probability of being in range
>> [x-ULP/2:x+ULP/2]. However in this reduced range probability is flat,
>> an "exact" x is no worse and no better than any other point within this
>> range.
>> Which means that when we look for y=sin(x) then for
>> scientific/engineering purposes any answer in range*
>> [sin(x-ULP/2):sin(x+ULP/2)] is as "right" as any other answer. The
>> right answer to the question "What is a sin() of IEEE-754 binary64
>> number 1e17?" is "Anything in range [-1:1]". The wise and useful answer
>> to the same question is "You're holding it wrong".
>
> There are verification tests that know the exact value of both x and
> sin(x).
> For these uses you argument is not valid--however I am willing to grant
> that outside of verification, and in actual use, your argument holds as
> well ad the noise in the data provides.

Fortunately, for 32-bit single precision floating point, one can
exhaustively test single-argument functions. For the SW implementation
on FreeBSD, exhaustive testing shows

% tlibm sinpi -fPED -x 0 -X 0x1p23 -s 0
Interval tested for sinpif: [0,8.38861e+06]
1000000 calls, 0.015453 secs, 0.01545 usecs/call
ulp <= 0.5: 99.842% 1253631604 | 99.842% 1253631604
0.5 < ulp < 0.6: 0.158% 1989420 | 100.000% 1255621024
Max ulp: 0.583666 at 6.07950642e-05

% tlibm sin -fPED -x 0 -X 0x1p23 -s 0
Interval tested for sinf: [0,8.38861e+06]
1000000 calls, 0.019520 secs, 0.01952 usecs/call
ulp <= 0.5: 99.995% 1249842491 | 99.995% 1249842491
0.5 < ulp < 0.6: 0.005% 60102 | 100.000% 1249902593
Max ulp: 0.500900 at 3.68277281e+05

The speed test is for 1M values evenly distributed over
the interval. The difference in speed for sinpi vs sin
is due to the argument reduction.

Note 1: libm built with clang/llvm with only -O2 on a
AMD Phenom II X2 560 Processor (3300.14-MHz K8-class CPU).

Note 2: subnormal values for x are test not included in
the count as subnormal are tested with a different approach.

--
steve

Re: Radians Or Degrees?

<9862882e1badcd541491098b47c61802@www.novabbs.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=35143&group=comp.lang.c#35143

  copy link   Newsgroups: comp.lang.c comp.arch
Path: i2pn2.org!.POSTED!not-for-mail
From: mitchalsup@aol.com (MitchAlsup1)
Newsgroups: comp.lang.c,comp.arch
Subject: Re: Radians Or Degrees?
Date: Fri, 23 Feb 2024 22:29:17 +0000
Organization: Rocksolid Light
Message-ID: <9862882e1badcd541491098b47c61802@www.novabbs.org>
References: <ur5trn$3d64t$1@dont-email.me> <ur5v05$3ccut$1@dont-email.me> <20240222015920.00000260@yahoo.com> <ur69j9$3ftgj$3@dont-email.me> <ur86eg$1aip$1@dont-email.me> <ur88e4$1rr1$5@dont-email.me> <ur8a2p$2446$1@dont-email.me> <ur8ctk$2vbd$2@dont-email.me> <20240222233838.0000572f@yahoo.com> <3b2e86cdb0ee8785b4405ab10871c5ca@www.novabbs.org> <ur8nud$4n1r$1@dont-email.me> <20240223143250.000012a8@yahoo.com> <59454a79216ece74ac3fee0e00473357@www.novabbs.org> <uravp3$nl44$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: i2pn2.org;
logging-data="3890314"; mail-complaints-to="usenet@i2pn2.org";
posting-account="PGd4t4cXnWwgUWG9VtTiCsm47oOWbHLcTr4rYoM0Edo";
User-Agent: Rocksolid Light
X-Rslight-Posting-User: ac58ceb75ea22753186dae54d967fed894c3dce8
X-Spam-Checker-Version: SpamAssassin 4.0.0
X-Rslight-Site: $2y$10$y.axh0rn5Cgm52Z05PDUreii95iosbQzGwE1HunBiKYZXJXCnjpKK
 by: MitchAlsup1 - Fri, 23 Feb 2024 22:29 UTC

Steven G. Kargl wrote:

> On Fri, 23 Feb 2024 20:02:00 +0000, MitchAlsup1 wrote:

>> Michael S wrote:
>>
>>> On Fri, 23 Feb 2024 00:13:02 -0000 (UTC)
>>> "Steven G. Kargl" <sgk@REMOVEtroutmask.apl.washington.edu> wrote:
>>
>>>> On Thu, 22 Feb 2024 22:57:20 +0000, MitchAlsup1 wrote:
>>>>
>>>>
>>>> > I have a patent on doing argument reduction for sin(x) in 4
>>>> > cycles...that is as good as Payne-Haneok argument reduction over
>>>> > -infinity..+infinity
>>>>
>>>> By a strange coincidence, I have the Payn-Hanek paper on the top of
>>>> stack of papers on my desk. Still need to internalize the details.
>>>>
>>>>
>>> Payne-Hanek is a right answer to a wrong question.
>>
>> If someone looking for fast sin(x) you are correct, for a person looking
>> for the best possible (correctly rounded) result, you are not. In any
>> event I have driven that monstrosity down from 50-odd cycles to 4--
>> making it at least palatable.
>>
>>> In science/engineering floating-point number x represents a range
>>> [x-ULP:x+ULP] with hopefully much higher probability of being in range
>>> [x-ULP/2:x+ULP/2]. However in this reduced range probability is flat,
>>> an "exact" x is no worse and no better than any other point within this
>>> range.
>>> Which means that when we look for y=sin(x) then for
>>> scientific/engineering purposes any answer in range*
>>> [sin(x-ULP/2):sin(x+ULP/2)] is as "right" as any other answer. The
>>> right answer to the question "What is a sin() of IEEE-754 binary64
>>> number 1e17?" is "Anything in range [-1:1]". The wise and useful answer
>>> to the same question is "You're holding it wrong".
>>
>> There are verification tests that know the exact value of both x and
>> sin(x).
>> For these uses you argument is not valid--however I am willing to grant
>> that outside of verification, and in actual use, your argument holds as
>> well ad the noise in the data provides.

> Fortunately, for 32-bit single precision floating point, one can

All of the numerics I have spoken about are DP (64-bit) values.

> exhaustively test single-argument functions. For the SW implementation
> on FreeBSD, exhaustive testing shows

> % tlibm sinpi -fPED -x 0 -X 0x1p23 -s 0
> Interval tested for sinpif: [0,8.38861e+06]
> 1000000 calls, 0.015453 secs, 0.01545 usecs/call
> ulp <= 0.5: 99.842% 1253631604 | 99.842% 1253631604
> 0.5 < ulp < 0.6: 0.158% 1989420 | 100.000% 1255621024
> Max ulp: 0.583666 at 6.07950642e-05

> % tlibm sin -fPED -x 0 -X 0x1p23 -s 0
> Interval tested for sinf: [0,8.38861e+06]
> 1000000 calls, 0.019520 secs, 0.01952 usecs/call
> ulp <= 0.5: 99.995% 1249842491 | 99.995% 1249842491
> 0.5 < ulp < 0.6: 0.005% 60102 | 100.000% 1249902593
> Max ulp: 0.500900 at 3.68277281e+05

I find it interesting that sinpi() has worse numeric error than sin().

I also find it interesting that the highest error is in the easy part
of polynomial evaluation without argument reduction whereas sin() has
its worst result in a region where significant argument reduction has
transpired.

{{Seems like another case of faster poor answers top slower correct
answers.}}

> The speed test is for 1M values evenly distributed over
> the interval. The difference in speed for sinpi vs sin
> is due to the argument reduction.

But result precision suffers nonetheless.

> Note 1: libm built with clang/llvm with only -O2 on a
> AMD Phenom II X2 560 Processor (3300.14-MHz K8-class CPU).

> Note 2: subnormal values for x are test not included in
> the count as subnormal are tested with a different approach.

Re: Radians Or Degrees?

<urb6qn$phho$2@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=35144&group=comp.lang.c#35144

  copy link   Newsgroups: comp.lang.c comp.arch
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ldo@nz.invalid (Lawrence D'Oliveiro)
Newsgroups: comp.lang.c,comp.arch
Subject: Re: Radians Or Degrees?
Date: Fri, 23 Feb 2024 22:39:19 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 7
Message-ID: <urb6qn$phho$2@dont-email.me>
References: <ur5trn$3d64t$1@dont-email.me> <ur5v05$3ccut$1@dont-email.me>
<20240222015920.00000260@yahoo.com> <ur69j9$3ftgj$3@dont-email.me>
<ur86eg$1aip$1@dont-email.me> <ur88e4$1rr1$5@dont-email.me>
<ur8a2p$2446$1@dont-email.me> <ur8ctk$2vbd$2@dont-email.me>
<20240222233838.0000572f@yahoo.com>
<3b2e86cdb0ee8785b4405ab10871c5ca@www.novabbs.org>
<ur8nud$4n1r$1@dont-email.me> <20240223143250.000012a8@yahoo.com>
<59454a79216ece74ac3fee0e00473357@www.novabbs.org>
<uravp3$nl44$1@dont-email.me>
<9862882e1badcd541491098b47c61802@www.novabbs.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 23 Feb 2024 22:39:19 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="1c30df426ba638bd6ae2f81f1dfd3d68";
logging-data="837176"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+HJAxRijh2ojTR0nE8ekVr"
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:w5E2q+SKWv+X+EqEuUHjQtqO5vg=
 by: Lawrence D'Oliv - Fri, 23 Feb 2024 22:39 UTC

On Fri, 23 Feb 2024 22:29:17 +0000, MitchAlsup1 wrote:

> I find it interesting that sinpi() has worse numeric error than sin().

Another argument for sticking with the simpler solution? One set of
radian-specific functions plus conversion factors, instead of a separate
set of unit-specific functions for every unit?

Re: Radians Or Degrees?

<urb6rt$phho$3@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=35145&group=comp.lang.c#35145

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ldo@nz.invalid (Lawrence D'Oliveiro)
Newsgroups: comp.lang.c
Subject: Re: Radians Or Degrees?
Date: Fri, 23 Feb 2024 22:39:57 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 6
Message-ID: <urb6rt$phho$3@dont-email.me>
References: <ur5trn$3d64t$1@dont-email.me> <ur5v05$3ccut$1@dont-email.me>
<20240222015920.00000260@yahoo.com> <ur69j9$3ftgj$3@dont-email.me>
<ur86eg$1aip$1@dont-email.me> <ur88e4$1rr1$5@dont-email.me>
<ur8a2p$2446$1@dont-email.me> <ur8ctk$2vbd$2@dont-email.me>
<20240222233838.0000572f@yahoo.com>
<3b2e86cdb0ee8785b4405ab10871c5ca@www.novabbs.org>
<ur8nud$4n1r$1@dont-email.me> <20240223143250.000012a8@yahoo.com>
<59454a79216ece74ac3fee0e00473357@www.novabbs.org>
<uravp3$nl44$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 23 Feb 2024 22:39:57 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="1c30df426ba638bd6ae2f81f1dfd3d68";
logging-data="837176"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/+Wa5b9yjKFbAo1Y0coqO6"
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:6CQlzLq21hXuZ5VGH+BYbtE9UJo=
 by: Lawrence D'Oliv - Fri, 23 Feb 2024 22:39 UTC

On Fri, 23 Feb 2024 20:38:59 -0000 (UTC), Steven G. Kargl wrote:

> Note 2: subnormal values ...

Why did they bring in the term “subnormal”, anyway? What was wrong with
“denormalized”?

Re: Radians Or Degrees?

<urb704$phho$4@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=35146&group=comp.lang.c#35146

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ldo@nz.invalid (Lawrence D'Oliveiro)
Newsgroups: comp.lang.c
Subject: Re: Radians Or Degrees?
Date: Fri, 23 Feb 2024 22:42:12 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 9
Message-ID: <urb704$phho$4@dont-email.me>
References: <ur5trn$3d64t$1@dont-email.me> <ur5v05$3ccut$1@dont-email.me>
<20240222015920.00000260@yahoo.com> <ur69j9$3ftgj$3@dont-email.me>
<ur86eg$1aip$1@dont-email.me> <ur88e4$1rr1$5@dont-email.me>
<ur8a2p$2446$1@dont-email.me> <ur8ctk$2vbd$2@dont-email.me>
<20240222233838.0000572f@yahoo.com>
<3b2e86cdb0ee8785b4405ab10871c5ca@www.novabbs.org>
<ur8nud$4n1r$1@dont-email.me> <ur8q2k$5nfr$1@dont-email.me>
<ur8qlp$5nfr$2@dont-email.me>
<a2a5c98883cafb6ab19668403b2dfb15@www.novabbs.org>
<urav5o$nqvp$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 23 Feb 2024 22:42:12 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="1c30df426ba638bd6ae2f81f1dfd3d68";
logging-data="837176"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18bo5iMOoq4tPi6K2NF4/I4"
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:MrfvQ8NXGE0/EszPabBJAD7Snco=
 by: Lawrence D'Oliv - Fri, 23 Feb 2024 22:42 UTC

On Fri, 23 Feb 2024 12:28:40 -0800, Chris M. Thomasson wrote:

> So zooming in "deep" on say, something like my MultiJulia IFS work is
> going to require arbitrary precision trig...

In which case, all these arguments from people saying that particular non-
radian angle units are going to squeeze out just that little bit more in
significant figures from IEEE754 single or double precision are really
just irrelevant, aren’t they?

Re: Radians Or Degrees?

<urb97g$pkrs$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=35147&group=comp.lang.c#35147

  copy link   Newsgroups: comp.lang.c comp.arch
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: sgk@REMOVEtroutmask.apl.washington.edu (Steven G. Kargl)
Newsgroups: comp.lang.c,comp.arch
Subject: Re: Radians Or Degrees?
Date: Fri, 23 Feb 2024 23:20:17 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 123
Message-ID: <urb97g$pkrs$1@dont-email.me>
References: <ur5trn$3d64t$1@dont-email.me> <ur5v05$3ccut$1@dont-email.me>
<20240222015920.00000260@yahoo.com> <ur69j9$3ftgj$3@dont-email.me>
<ur86eg$1aip$1@dont-email.me> <ur88e4$1rr1$5@dont-email.me>
<ur8a2p$2446$1@dont-email.me> <ur8ctk$2vbd$2@dont-email.me>
<20240222233838.0000572f@yahoo.com>
<3b2e86cdb0ee8785b4405ab10871c5ca@www.novabbs.org>
<ur8nud$4n1r$1@dont-email.me> <20240223143250.000012a8@yahoo.com>
<59454a79216ece74ac3fee0e00473357@www.novabbs.org>
<uravp3$nl44$1@dont-email.me>
<9862882e1badcd541491098b47c61802@www.novabbs.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 23 Feb 2024 23:20:17 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="6719a06acd7653ce47d0597a0ad9615d";
logging-data="840572"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19fMK5BVCvQnzfSBtCceYG1"
User-Agent: Pan/0.145 (Duplicitous mercenary valetism; d7e168a
git.gnome.org/pan2)
Cancel-Lock: sha1:Oi1SylmxsCtRWGb+o4njhtA4NRk=
 by: Steven G. Kargl - Fri, 23 Feb 2024 23:20 UTC

On Fri, 23 Feb 2024 22:29:17 +0000, MitchAlsup1 wrote:

> Steven G. Kargl wrote:
>
>> On Fri, 23 Feb 2024 20:02:00 +0000, MitchAlsup1 wrote:
>
>>> Michael S wrote:
>>>
>>>> On Fri, 23 Feb 2024 00:13:02 -0000 (UTC)
>>>> "Steven G. Kargl" <sgk@REMOVEtroutmask.apl.washington.edu> wrote:
>>>
>>>>> On Thu, 22 Feb 2024 22:57:20 +0000, MitchAlsup1 wrote:
>>>>>
>>>>>
>>>>> > I have a patent on doing argument reduction for sin(x) in 4
>>>>> > cycles...that is as good as Payne-Haneok argument reduction over
>>>>> > -infinity..+infinity
>>>>>
>>>>> By a strange coincidence, I have the Payn-Hanek paper on the top of
>>>>> stack of papers on my desk. Still need to internalize the details.
>>>>>
>>>>>
>>>> Payne-Hanek is a right answer to a wrong question.
>>>
>>> If someone looking for fast sin(x) you are correct, for a person
>>> looking for the best possible (correctly rounded) result, you are not.
>>> In any event I have driven that monstrosity down from 50-odd cycles to
>>> 4-- making it at least palatable.
>>>
>>>> In science/engineering floating-point number x represents a range
>>>> [x-ULP:x+ULP] with hopefully much higher probability of being in
>>>> range [x-ULP/2:x+ULP/2]. However in this reduced range probability is
>>>> flat, an "exact" x is no worse and no better than any other point
>>>> within this range.
>>>> Which means that when we look for y=sin(x) then for
>>>> scientific/engineering purposes any answer in range*
>>>> [sin(x-ULP/2):sin(x+ULP/2)] is as "right" as any other answer. The
>>>> right answer to the question "What is a sin() of IEEE-754 binary64
>>>> number 1e17?" is "Anything in range [-1:1]". The wise and useful
>>>> answer to the same question is "You're holding it wrong".
>>>
>>> There are verification tests that know the exact value of both x and
>>> sin(x).
>>> For these uses you argument is not valid--however I am willing to
>>> grant that outside of verification, and in actual use, your argument
>>> holds as well ad the noise in the data provides.
>
>> Fortunately, for 32-bit single precision floating point, one can
>
> All of the numerics I have spoken about are DP (64-bit) values.

Sure, but it isn't possible to exhaustively DP on current hardware
(available to me). Simple testing can give one a warm fuzzy feeling.
With 10M values in the range [0,0x1p53], the SW sinpi seems to be better
than the SW sin.

% tlibm sin -d -x 0 -X 0x1p53 -N 10 -s 0
Interval tested for sin: [0,9.0072e+15]
10000000 calls, 2.594275 secs, 0.25943 usecs/call
count: 10000000
xm = 3.4119949728897955e+15, /* 0x43283e61, 0xf8ab4587 */
libm = 7.2135591711063873e-01, /* 0x3fe71559, 0x0118855e */
mpfr = 7.2135591711063862e-01, /* 0x3fe71559, 0x0118855d */
ULP = 0.77814

% tlibm sinpi -d -x 0 -X 0x1p53 -N 10 -s 0
Interval tested for sinpi: [0,9.0072e+15]
10000000 calls, 0.184541 secs, 0.01845 usecs/call
count: 10000000
xm = 1.5384297865527400e+12, /* 0x42766318, 0xf99b8bd7 */
libm = 7.2898962872051931e-01, /* 0x3fe753e2, 0x0ecf4a3e */
mpfr = 7.2898962872051942e-01, /* 0x3fe753e2, 0x0ecf4a3f */
ULP = 0.69476

Note, the timing difference is again dominated by argument reduction.

Also note, that each of the above tests took ~180 cpu seconds. At
the moment, tlibm will not use multiple cores or cpus on other nodes.

>> exhaustively test single-argument functions. For the SW implementation
>> on FreeBSD, exhaustive testing shows
>
>> % tlibm sinpi -fPED -x 0 -X 0x1p23 -s 0 Interval tested for sinpif:
>> [0,8.38861e+06]
>> 1000000 calls, 0.015453 secs, 0.01545 usecs/call
>> ulp <= 0.5: 99.842% 1253631604 | 99.842% 1253631604
>> 0.5 < ulp < 0.6: 0.158% 1989420 | 100.000% 1255621024 Max ulp:
>> 0.583666 at 6.07950642e-05
>
>> % tlibm sin -fPED -x 0 -X 0x1p23 -s 0 Interval tested for sinf:
>> [0,8.38861e+06]
>> 1000000 calls, 0.019520 secs, 0.01952 usecs/call
>> ulp <= 0.5: 99.995% 1249842491 | 99.995% 1249842491
>> 0.5 < ulp < 0.6: 0.005% 60102 | 100.000% 1249902593 Max ulp:
>> 0.500900 at 3.68277281e+05
>
> I find it interesting that sinpi() has worse numeric error than sin().
>
> I also find it interesting that the highest error is in the easy part of
> polynomial evaluation without argument reduction whereas sin() has its
> worst result in a region where significant argument reduction has
> transpired.
>
> {{Seems like another case of faster poor answers top slower correct
> answers.}}

For my purposes, a max ulp 0.538 is good enough. The time needed
to reduce this to 0.5009 is better spent on other unimplemented
libm functions in Freebsd's libm or implemented functions with
much worse ULP

>> The speed test is for 1M values evenly distributed over the interval.
>> The difference in speed for sinpi vs sin is due to the argument
>> reduction.
>
> But result precision suffers nonetheless.

Argument reduction itself isn't the culprit. Go read the FreeBSD source
code. What is done once one has the reduced argument is the issue. I
suspect that any patch you come up with would be gladly accepted.

--
steve

Re: Radians Or Degrees?

<878r3abwkv.fsf@bsb.me.uk>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=35148&group=comp.lang.c#35148

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ben.usenet@bsb.me.uk (Ben Bacarisse)
Newsgroups: comp.lang.c
Subject: Re: Radians Or Degrees?
Date: Fri, 23 Feb 2024 23:16:32 +0000
Organization: A noiseless patient Spider
Lines: 15
Message-ID: <878r3abwkv.fsf@bsb.me.uk>
References: <ur5trn$3d64t$1@dont-email.me> <ur5v05$3ccut$1@dont-email.me>
<20240222015920.00000260@yahoo.com> <ur69j9$3ftgj$3@dont-email.me>
<ur86eg$1aip$1@dont-email.me> <ur88e4$1rr1$5@dont-email.me>
<ur8a2p$2446$1@dont-email.me> <ur8ctk$2vbd$2@dont-email.me>
<20240222233838.0000572f@yahoo.com>
<3b2e86cdb0ee8785b4405ab10871c5ca@www.novabbs.org>
<ur8nud$4n1r$1@dont-email.me> <20240223143250.000012a8@yahoo.com>
<59454a79216ece74ac3fee0e00473357@www.novabbs.org>
<uravp3$nl44$1@dont-email.me> <urb6rt$phho$3@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Info: dont-email.me; posting-host="491046b537c28ce04da3d68d43057e23";
logging-data="848771"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+XuB9OPYFYPns96bQw9lV9J4zwUrVpTw4="
User-Agent: Gnus/5.13 (Gnus v5.13)
Cancel-Lock: sha1:Q9m4T4ztk3+VihU8BDJG31akYlo=
sha1:dyXxv/+I6YLvrJgY09XaAFX1lrM=
X-BSB-Auth: 1.041c1546e36ac40b5595.20240223231632GMT.878r3abwkv.fsf@bsb.me.uk
 by: Ben Bacarisse - Fri, 23 Feb 2024 23:16 UTC

Lawrence D'Oliveiro <ldo@nz.invalid> writes:

> On Fri, 23 Feb 2024 20:38:59 -0000 (UTC), Steven G. Kargl wrote:
>
>> Note 2: subnormal values ...
>
> Why did they bring in the term “subnormal”, anyway? What was wrong with
> “denormalized”?

Greater clarity maybe? After all, the two terms do mean different
things. In IEEE FP only subnormals can exist, but it surely helps to be
able to talk about the difference.

--
Ben.

Re: Radians Or Degrees?

<20240223152025.14@kylheku.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=35149&group=comp.lang.c#35149

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: 433-929-6894@kylheku.com (Kaz Kylheku)
Newsgroups: comp.lang.c
Subject: Re: Radians Or Degrees?
Date: Fri, 23 Feb 2024 23:30:41 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 43
Message-ID: <20240223152025.14@kylheku.com>
References: <ur5trn$3d64t$1@dont-email.me> <ur5v05$3ccut$1@dont-email.me>
<20240222015920.00000260@yahoo.com> <ur69j9$3ftgj$3@dont-email.me>
<ur86eg$1aip$1@dont-email.me> <ur88e4$1rr1$5@dont-email.me>
<ur8a2p$2446$1@dont-email.me> <ur8ctk$2vbd$2@dont-email.me>
<20240222233838.0000572f@yahoo.com>
<3b2e86cdb0ee8785b4405ab10871c5ca@www.novabbs.org>
<ur8nud$4n1r$1@dont-email.me> <20240223143250.000012a8@yahoo.com>
<59454a79216ece74ac3fee0e00473357@www.novabbs.org>
<uravp3$nl44$1@dont-email.me> <urb6rt$phho$3@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 23 Feb 2024 23:30:41 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="34619b51a16732ed137354a6ec65eead";
logging-data="858937"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19oSj5B3eltQ6XsTvuH1asMvFv7uc1Du2g="
User-Agent: slrn/pre1.0.4-9 (Linux)
Cancel-Lock: sha1:hFIeXo8lY9xSCs/xYEKFI+tXQ5Y=
 by: Kaz Kylheku - Fri, 23 Feb 2024 23:30 UTC

On 2024-02-23, Lawrence D'Oliveiro <ldo@nz.invalid> wrote:
> On Fri, 23 Feb 2024 20:38:59 -0000 (UTC), Steven G. Kargl wrote:
>
>> Note 2: subnormal values ...
>
> Why did they bring in the term “subnormal”, anyway? What was wrong with
> “denormalized”?

subnormals are subset of denormals. In IEEE 754, the only denormals
are subnormals. This is because values that are outside of the subnormal
range have the implicit 1 in the mantissa.

Suppose you have a binary floating-point representation in which the 1
in the mantissa must be explicit, e.g.

101
1.10100101 x 10

Then you can have denormals regardless of the exponent value.

E.g. the above normal number can also be expressed this way:

110 <-- incremented
0.110100101 x 10

^
|
mantissa shifted right, bringing in a zero on the left

This denormal isn't subnormal, though; the subnormals are those
denormals which have a magnitude smaller than the smallest normal
magnitude. Those are the helpful/necessary ones which fill the gap
between zero and the smallest normals.

IEEE numbers don't have a zero on the left; the highest bit of the
mantissa is not represented and is assumed to be 1. As a special hack,
this implicit 1 assumption is lifted for the subnormals. This behavior
is turned on when the exponent value is the smallest possible one.

--
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
Mastodon: @Kazinator@mstdn.ca

Re: Radians Or Degrees?

<urbaki$qb3j$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=35150&group=comp.lang.c#35150

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ldo@nz.invalid (Lawrence D'Oliveiro)
Newsgroups: comp.lang.c
Subject: Re: Radians Or Degrees?
Date: Fri, 23 Feb 2024 23:44:18 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 18
Message-ID: <urbaki$qb3j$1@dont-email.me>
References: <ur5trn$3d64t$1@dont-email.me> <ur5v05$3ccut$1@dont-email.me>
<20240222015920.00000260@yahoo.com> <ur69j9$3ftgj$3@dont-email.me>
<ur86eg$1aip$1@dont-email.me> <ur88e4$1rr1$5@dont-email.me>
<ur8a2p$2446$1@dont-email.me> <ur8ctk$2vbd$2@dont-email.me>
<20240222233838.0000572f@yahoo.com>
<3b2e86cdb0ee8785b4405ab10871c5ca@www.novabbs.org>
<ur8nud$4n1r$1@dont-email.me> <20240223143250.000012a8@yahoo.com>
<59454a79216ece74ac3fee0e00473357@www.novabbs.org>
<uravp3$nl44$1@dont-email.me> <urb6rt$phho$3@dont-email.me>
<878r3abwkv.fsf@bsb.me.uk>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 23 Feb 2024 23:44:18 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="90cd705a0b104282cd54d6df08a2cdc8";
logging-data="863347"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/6CN83XA/wEIvA6cvQWHf9"
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:4K/14dfbanUDxTtl/FIjdNWEhm0=
 by: Lawrence D'Oliv - Fri, 23 Feb 2024 23:44 UTC

On Fri, 23 Feb 2024 23:16:32 +0000, Ben Bacarisse wrote:

> Lawrence D'Oliveiro <ldo@nz.invalid> writes:
>
>> On Fri, 23 Feb 2024 20:38:59 -0000 (UTC), Steven G. Kargl wrote:
>>
>>> Note 2: subnormal values ...
>>
>> Why did they bring in the term “subnormal”, anyway? What was wrong with
>> “denormalized”?
>
> Greater clarity maybe? After all, the two terms do mean different
> things. In IEEE FP only subnormals can exist, but it surely helps to be
> able to talk about the difference.

I thought they were the same thing: extra numbers inserted in the gap
between the normalized number closest to zero on each side, to allow for
gradual underflow.

Re: Radians Or Degrees?

<8734tibr1t.fsf@bsb.me.uk>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=35151&group=comp.lang.c#35151

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ben.usenet@bsb.me.uk (Ben Bacarisse)
Newsgroups: comp.lang.c
Subject: Re: Radians Or Degrees?
Date: Sat, 24 Feb 2024 01:15:58 +0000
Organization: A noiseless patient Spider
Lines: 28
Message-ID: <8734tibr1t.fsf@bsb.me.uk>
References: <ur5trn$3d64t$1@dont-email.me> <ur5v05$3ccut$1@dont-email.me>
<20240222015920.00000260@yahoo.com> <ur69j9$3ftgj$3@dont-email.me>
<ur86eg$1aip$1@dont-email.me> <ur88e4$1rr1$5@dont-email.me>
<ur8a2p$2446$1@dont-email.me> <ur8ctk$2vbd$2@dont-email.me>
<20240222233838.0000572f@yahoo.com>
<3b2e86cdb0ee8785b4405ab10871c5ca@www.novabbs.org>
<ur8nud$4n1r$1@dont-email.me> <20240223143250.000012a8@yahoo.com>
<59454a79216ece74ac3fee0e00473357@www.novabbs.org>
<uravp3$nl44$1@dont-email.me> <urb6rt$phho$3@dont-email.me>
<878r3abwkv.fsf@bsb.me.uk> <urbaki$qb3j$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Info: dont-email.me; posting-host="491046b537c28ce04da3d68d43057e23";
logging-data="895056"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+J2qyAxscBKiclTAu14eZ3YVLsww44/RE="
User-Agent: Gnus/5.13 (Gnus v5.13)
Cancel-Lock: sha1:aodZ3WUcdvH8CxVrw6gzjTcerro=
sha1:NepmjH14Buk3irOGsr/SFaYUbnQ=
X-BSB-Auth: 1.f32ce2b1b00487fb2335.20240224011558GMT.8734tibr1t.fsf@bsb.me.uk
 by: Ben Bacarisse - Sat, 24 Feb 2024 01:15 UTC

Lawrence D'Oliveiro <ldo@nz.invalid> writes:

> On Fri, 23 Feb 2024 23:16:32 +0000, Ben Bacarisse wrote:
>
>> Lawrence D'Oliveiro <ldo@nz.invalid> writes:
>>
>>> On Fri, 23 Feb 2024 20:38:59 -0000 (UTC), Steven G. Kargl wrote:
>>>
>>>> Note 2: subnormal values ...
>>>
>>> Why did they bring in the term “subnormal”, anyway? What was wrong with
>>> “denormalized”?
>>
>> Greater clarity maybe? After all, the two terms do mean different
>> things. In IEEE FP only subnormals can exist, but it surely helps to be
>> able to talk about the difference.
>
> I thought they were the same thing: extra numbers inserted in the gap
> between the normalized number closest to zero on each side, to allow for
> gradual underflow.

Those are subnormal. They are smaller (in magnitude) than the smallest
normal. Denormals are simply representations with leading zeros. IEEE
FP's implicit leading 1 means these (denormals that are not subnormal)
can't exist in that representation.

--
Ben.

Re: Radians Or Degrees?

<urbg72$rbo3$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=35152&group=comp.lang.c#35152

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ldo@nz.invalid (Lawrence D'Oliveiro)
Newsgroups: comp.lang.c
Subject: Re: Radians Or Degrees?
Date: Sat, 24 Feb 2024 01:19:30 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 16
Message-ID: <urbg72$rbo3$1@dont-email.me>
References: <ur5trn$3d64t$1@dont-email.me> <ur5v05$3ccut$1@dont-email.me>
<20240222015920.00000260@yahoo.com> <ur69j9$3ftgj$3@dont-email.me>
<ur86eg$1aip$1@dont-email.me> <ur88e4$1rr1$5@dont-email.me>
<ur8a2p$2446$1@dont-email.me> <ur8ctk$2vbd$2@dont-email.me>
<20240222233838.0000572f@yahoo.com>
<3b2e86cdb0ee8785b4405ab10871c5ca@www.novabbs.org>
<ur8nud$4n1r$1@dont-email.me> <20240223143250.000012a8@yahoo.com>
<59454a79216ece74ac3fee0e00473357@www.novabbs.org>
<uravp3$nl44$1@dont-email.me> <urb6rt$phho$3@dont-email.me>
<878r3abwkv.fsf@bsb.me.uk> <urbaki$qb3j$1@dont-email.me>
<8734tibr1t.fsf@bsb.me.uk>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 24 Feb 2024 01:19:30 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="90cd705a0b104282cd54d6df08a2cdc8";
logging-data="896771"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/EoaCSk/lnxxZ0xWGxyePA"
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:qnmdSD0sik+jH0yO1r8R0lIQbIA=
 by: Lawrence D'Oliv - Sat, 24 Feb 2024 01:19 UTC

On Sat, 24 Feb 2024 01:15:58 +0000, Ben Bacarisse wrote:

> Lawrence D'Oliveiro <ldo@nz.invalid> writes:
>
>> I thought they were the same thing: extra numbers inserted in the gap
>> between the normalized number closest to zero on each side, to allow
>> for gradual underflow.
>
> Those are subnormal. They are smaller (in magnitude) than the smallest
> normal. Denormals are simply representations with leading zeros. IEEE
> FP's implicit leading 1 means these (denormals that are not subnormal)
> can't exist in that representation.

So in IEEE754, they are the same thing. Which is what I thought. So you
don’t really need two terms for them. Particularly when one of them has
certain undesirable ... connotations.

Re: Radians Or Degrees?

<87wmquaby7.fsf@bsb.me.uk>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=35153&group=comp.lang.c#35153

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ben.usenet@bsb.me.uk (Ben Bacarisse)
Newsgroups: comp.lang.c
Subject: Re: Radians Or Degrees?
Date: Sat, 24 Feb 2024 01:27:28 +0000
Organization: A noiseless patient Spider
Lines: 22
Message-ID: <87wmquaby7.fsf@bsb.me.uk>
References: <ur5trn$3d64t$1@dont-email.me> <ur5v05$3ccut$1@dont-email.me>
<20240222015920.00000260@yahoo.com> <ur69j9$3ftgj$3@dont-email.me>
<ur86eg$1aip$1@dont-email.me> <ur88e4$1rr1$5@dont-email.me>
<ur8a2p$2446$1@dont-email.me> <ur8ctk$2vbd$2@dont-email.me>
<20240222233838.0000572f@yahoo.com>
<3b2e86cdb0ee8785b4405ab10871c5ca@www.novabbs.org>
<ur8nud$4n1r$1@dont-email.me> <20240223143250.000012a8@yahoo.com>
<59454a79216ece74ac3fee0e00473357@www.novabbs.org>
<uravp3$nl44$1@dont-email.me> <urb6rt$phho$3@dont-email.me>
<878r3abwkv.fsf@bsb.me.uk> <urbaki$qb3j$1@dont-email.me>
<8734tibr1t.fsf@bsb.me.uk> <urbg72$rbo3$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="491046b537c28ce04da3d68d43057e23";
logging-data="895056"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/mqGIRM0WeoRa5twQoAdg2pPma1yCjzHw="
User-Agent: Gnus/5.13 (Gnus v5.13)
Cancel-Lock: sha1:t4tlXRW56XTm7nGUUSTXlyeXpsA=
sha1:CLoxrnE/Ekq9gnGvYXp3i6OZM/E=
X-BSB-Auth: 1.64ec694af64a9d0cf3c4.20240224012728GMT.87wmquaby7.fsf@bsb.me.uk
 by: Ben Bacarisse - Sat, 24 Feb 2024 01:27 UTC

Lawrence D'Oliveiro <ldo@nz.invalid> writes:

> On Sat, 24 Feb 2024 01:15:58 +0000, Ben Bacarisse wrote:
>
>> Lawrence D'Oliveiro <ldo@nz.invalid> writes:
>>
>>> I thought they were the same thing: extra numbers inserted in the gap
>>> between the normalized number closest to zero on each side, to allow
>>> for gradual underflow.
>>
>> Those are subnormal. They are smaller (in magnitude) than the smallest
>> normal. Denormals are simply representations with leading zeros. IEEE
>> FP's implicit leading 1 means these (denormals that are not subnormal)
>> can't exist in that representation.
>
> So in IEEE754, they are the same thing.

No. I am pretty sure you understand what's been said so you must be
arguing for the sake of it.

--
Ben.

Re: Radians Or Degrees?

<20240223174153.703@kylheku.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=35154&group=comp.lang.c#35154

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: 433-929-6894@kylheku.com (Kaz Kylheku)
Newsgroups: comp.lang.c
Subject: Re: Radians Or Degrees?
Date: Sat, 24 Feb 2024 01:42:34 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 28
Message-ID: <20240223174153.703@kylheku.com>
References: <ur5trn$3d64t$1@dont-email.me> <ur5v05$3ccut$1@dont-email.me>
<20240222015920.00000260@yahoo.com> <ur69j9$3ftgj$3@dont-email.me>
<ur86eg$1aip$1@dont-email.me> <ur88e4$1rr1$5@dont-email.me>
<ur8a2p$2446$1@dont-email.me> <ur8ctk$2vbd$2@dont-email.me>
<20240222233838.0000572f@yahoo.com>
<3b2e86cdb0ee8785b4405ab10871c5ca@www.novabbs.org>
<ur8nud$4n1r$1@dont-email.me> <20240223143250.000012a8@yahoo.com>
<59454a79216ece74ac3fee0e00473357@www.novabbs.org>
<uravp3$nl44$1@dont-email.me> <urb6rt$phho$3@dont-email.me>
<878r3abwkv.fsf@bsb.me.uk> <urbaki$qb3j$1@dont-email.me>
<8734tibr1t.fsf@bsb.me.uk> <urbg72$rbo3$1@dont-email.me>
<87wmquaby7.fsf@bsb.me.uk>
Injection-Date: Sat, 24 Feb 2024 01:42:34 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="34619b51a16732ed137354a6ec65eead";
logging-data="905445"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+ISiTYz/bA6u4ELFnM3bXn3ipX3Q+f0gw="
User-Agent: slrn/pre1.0.4-9 (Linux)
Cancel-Lock: sha1:xNRP6bNRk4xxf/Sy0k1JMOgUCY4=
 by: Kaz Kylheku - Sat, 24 Feb 2024 01:42 UTC

On 2024-02-24, Ben Bacarisse <ben.usenet@bsb.me.uk> wrote:
> Lawrence D'Oliveiro <ldo@nz.invalid> writes:
>
>> On Sat, 24 Feb 2024 01:15:58 +0000, Ben Bacarisse wrote:
>>
>>> Lawrence D'Oliveiro <ldo@nz.invalid> writes:
>>>
>>>> I thought they were the same thing: extra numbers inserted in the gap
>>>> between the normalized number closest to zero on each side, to allow
>>>> for gradual underflow.
>>>
>>> Those are subnormal. They are smaller (in magnitude) than the smallest
>>> normal. Denormals are simply representations with leading zeros. IEEE
>>> FP's implicit leading 1 means these (denormals that are not subnormal)
>>> can't exist in that representation.
>>
>> So in IEEE754, they are the same thing.
>
> No. I am pretty sure you understand what's been said so you must be
> arguing for the sake of it.

I have only bicycles in my garage, so in my garage, "bicycles" and
"vehicles" are the same thing, not just the same set.

--
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
Mastodon: @Kazinator@mstdn.ca

Re: Radians Or Degrees?

<urbjs5$s1dq$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=35155&group=comp.lang.c#35155

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ldo@nz.invalid (Lawrence D'Oliveiro)
Newsgroups: comp.lang.c
Subject: Re: Radians Or Degrees?
Date: Sat, 24 Feb 2024 02:21:57 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 24
Message-ID: <urbjs5$s1dq$1@dont-email.me>
References: <ur5trn$3d64t$1@dont-email.me> <ur5v05$3ccut$1@dont-email.me>
<20240222015920.00000260@yahoo.com> <ur69j9$3ftgj$3@dont-email.me>
<ur86eg$1aip$1@dont-email.me> <ur88e4$1rr1$5@dont-email.me>
<ur8a2p$2446$1@dont-email.me> <ur8ctk$2vbd$2@dont-email.me>
<20240222233838.0000572f@yahoo.com>
<3b2e86cdb0ee8785b4405ab10871c5ca@www.novabbs.org>
<ur8nud$4n1r$1@dont-email.me> <20240223143250.000012a8@yahoo.com>
<59454a79216ece74ac3fee0e00473357@www.novabbs.org>
<uravp3$nl44$1@dont-email.me> <urb6rt$phho$3@dont-email.me>
<878r3abwkv.fsf@bsb.me.uk> <urbaki$qb3j$1@dont-email.me>
<8734tibr1t.fsf@bsb.me.uk> <urbg72$rbo3$1@dont-email.me>
<87wmquaby7.fsf@bsb.me.uk>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 24 Feb 2024 02:21:57 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="90cd705a0b104282cd54d6df08a2cdc8";
logging-data="918970"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18ph3LYoUaJKn6NnWjU6Tlj"
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:xVJS0fTjRRLh5ZRQOeJ1/0wbqo0=
 by: Lawrence D'Oliv - Sat, 24 Feb 2024 02:21 UTC

On Sat, 24 Feb 2024 01:27:28 +0000, Ben Bacarisse wrote:

> Lawrence D'Oliveiro <ldo@nz.invalid> writes:
>
>> On Sat, 24 Feb 2024 01:15:58 +0000, Ben Bacarisse wrote:
>>
>>> Lawrence D'Oliveiro <ldo@nz.invalid> writes:
>>>
>>>> I thought they were the same thing: extra numbers inserted in the gap
>>>> between the normalized number closest to zero on each side, to allow
>>>> for gradual underflow.
>>>
>>> Those are subnormal. They are smaller (in magnitude) than the
>>> smallest normal. Denormals are simply representations with leading
>>> zeros. IEEE FP's implicit leading 1 means these (denormals that are
>>> not subnormal) can't exist in that representation.
>>
>> So in IEEE754, they are the same thing.
>
> No. I am pretty sure you understand what's been said so you must be
> arguing for the sake of it.

So, give me an example, in IEEE754, of something that is one but not the
other.

Re: Radians Or Degrees?

<86edd2wp8y.fsf@linuxsc.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=35156&group=comp.lang.c#35156

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: tr.17687@z991.linuxsc.com (Tim Rentsch)
Newsgroups: comp.lang.c
Subject: Re: Radians Or Degrees?
Date: Fri, 23 Feb 2024 18:49:17 -0800
Organization: A noiseless patient Spider
Lines: 41
Message-ID: <86edd2wp8y.fsf@linuxsc.com>
References: <ur5trn$3d64t$1@dont-email.me> <ur5v05$3ccut$1@dont-email.me> <20240222015920.00000260@yahoo.com> <ur69j9$3ftgj$3@dont-email.me> <ur86eg$1aip$1@dont-email.me> <ur88e4$1rr1$5@dont-email.me> <ur8a2p$2446$1@dont-email.me> <ur8ctk$2vbd$2@dont-email.me> <20240222233838.0000572f@yahoo.com> <3b2e86cdb0ee8785b4405ab10871c5ca@www.novabbs.org> <ur8nud$4n1r$1@dont-email.me> <20240223143250.000012a8@yahoo.com> <59454a79216ece74ac3fee0e00473357@www.novabbs.org> <uravp3$nl44$1@dont-email.me> <urb6rt$phho$3@dont-email.me> <878r3abwkv.fsf@bsb.me.uk> <urbaki$qb3j$1@dont-email.me> <8734tibr1t.fsf@bsb.me.uk>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: dont-email.me; posting-host="1cdea6df135853ae187447ca49a96387";
logging-data="928381"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18rfvvsiOH3ZeqPp9U0AOKr8zQgnSqEPiM="
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock: sha1:8cjKETy+04kfo/ISJUv6z36zOUw=
sha1:bJSHTlEXRW1TzMY2o8Cr8jC1pp0=
 by: Tim Rentsch - Sat, 24 Feb 2024 02:49 UTC

Ben Bacarisse <ben.usenet@bsb.me.uk> writes:

> Lawrence D'Oliveiro <ldo@nz.invalid> writes:
>
>> On Fri, 23 Feb 2024 23:16:32 +0000, Ben Bacarisse wrote:
>>
>>> Lawrence D'Oliveiro <ldo@nz.invalid> writes:
>>>
>>>> On Fri, 23 Feb 2024 20:38:59 -0000 (UTC), Steven G. Kargl wrote:
>>>>
>>>>> Note 2: subnormal values ...
>>>>
>>>> Why did they bring in the term "subnormal", anyway? What was wrong with
>>>> "denormalized"?
>>>
>>> Greater clarity maybe? After all, the two terms do mean different
>>> things. In IEEE FP only subnormals can exist, but it surely helps to be
>>> able to talk about the difference.
>>
>> I thought they were the same thing: extra numbers inserted in the gap
>> between the normalized number closest to zero on each side, to allow for
>> gradual underflow.
>
> Those are subnormal. They are smaller (in magnitude) than the smallest
> normal. Denormals are simply representations with leading zeros. IEEE
> FP's implicit leading 1 means these (denormals that are not subnormal)
> can't exist in that representation.

There is some terminology confusion here. Depending on what
source is consulted, the term "denormal" has different meanings.
On Wikipedia, for example, "denormal numbers" redirects to
"subnormal number". Apparently the IEEE floating point standard
uses the term differently. Other sources are not consistent.

Note that the ISO C standard uses and defines the terms "subnormal
floating-point numbers" and "unnormalized floating-point numbers",
as disjoint sets, distinct from normalized floating-point numbers
(which the ISO C standard also defines). I expect it would help
the conversation to use these three terms (normalized, subnormal,
and unnormalized) and no others, since "denormal" or "denormalized"
seems to mean different things depending on which source is used.

Re: Radians Or Degrees?

<urblfp$s39b$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=35157&group=comp.lang.c#35157

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: sgk@REMOVEtroutmask.apl.washington.edu (Steven G. Kargl)
Newsgroups: comp.lang.c
Subject: Re: Radians Or Degrees?
Date: Sat, 24 Feb 2024 02:49:29 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 36
Message-ID: <urblfp$s39b$1@dont-email.me>
References: <ur5trn$3d64t$1@dont-email.me> <ur5v05$3ccut$1@dont-email.me>
<20240222015920.00000260@yahoo.com> <ur69j9$3ftgj$3@dont-email.me>
<ur86eg$1aip$1@dont-email.me> <ur88e4$1rr1$5@dont-email.me>
<ur8a2p$2446$1@dont-email.me> <ur8ctk$2vbd$2@dont-email.me>
<20240222233838.0000572f@yahoo.com>
<3b2e86cdb0ee8785b4405ab10871c5ca@www.novabbs.org>
<ur8nud$4n1r$1@dont-email.me> <20240223143250.000012a8@yahoo.com>
<59454a79216ece74ac3fee0e00473357@www.novabbs.org>
<uravp3$nl44$1@dont-email.me> <urb6rt$phho$3@dont-email.me>
<878r3abwkv.fsf@bsb.me.uk> <urbaki$qb3j$1@dont-email.me>
<8734tibr1t.fsf@bsb.me.uk> <urbg72$rbo3$1@dont-email.me>
<87wmquaby7.fsf@bsb.me.uk> <urbjs5$s1dq$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 24 Feb 2024 02:49:29 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="6719a06acd7653ce47d0597a0ad9615d";
logging-data="920875"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19WN1SI20y4NCUwODLVrbFF"
User-Agent: Pan/0.145 (Duplicitous mercenary valetism; d7e168a
git.gnome.org/pan2)
Cancel-Lock: sha1:gHWIwsvzLpmm+Y5RzcjoPm4i0k8=
 by: Steven G. Kargl - Sat, 24 Feb 2024 02:49 UTC

On Sat, 24 Feb 2024 02:21:57 +0000, Lawrence D'Oliveiro wrote:

> On Sat, 24 Feb 2024 01:27:28 +0000, Ben Bacarisse wrote:
>
>> Lawrence D'Oliveiro <ldo@nz.invalid> writes:
>>
>>> On Sat, 24 Feb 2024 01:15:58 +0000, Ben Bacarisse wrote:
>>>
>>>> Lawrence D'Oliveiro <ldo@nz.invalid> writes:
>>>>
>>>>> I thought they were the same thing: extra numbers inserted in the
>>>>> gap between the normalized number closest to zero on each side, to
>>>>> allow for gradual underflow.
>>>>
>>>> Those are subnormal. They are smaller (in magnitude) than the
>>>> smallest normal. Denormals are simply representations with leading
>>>> zeros. IEEE FP's implicit leading 1 means these (denormals that are
>>>> not subnormal) can't exist in that representation.
>>>
>>> So in IEEE754, they are the same thing.
>>
>> No. I am pretty sure you understand what's been said so you must be
>> arguing for the sake of it.
>
> So, give me an example, in IEEE754, of something that is one but not the
> other.

Well, that's a conundrum. One cannot give you an example as IEEE 754
does not describe unnormal numbers.

See https://en.wikipedia.org/wiki/Subnormal_number

PS: Yes, I know that page does not tell you what unnormal means.

--
steve

Re: Radians Or Degrees?

<urbmhe$1071k$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=35158&group=comp.lang.c#35158

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ldo@nz.invalid (Lawrence D'Oliveiro)
Newsgroups: comp.lang.c
Subject: Re: Radians Or Degrees?
Date: Sat, 24 Feb 2024 03:07:26 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 13
Message-ID: <urbmhe$1071k$1@dont-email.me>
References: <ur5trn$3d64t$1@dont-email.me> <ur5v05$3ccut$1@dont-email.me>
<20240222015920.00000260@yahoo.com> <ur69j9$3ftgj$3@dont-email.me>
<ur86eg$1aip$1@dont-email.me> <ur88e4$1rr1$5@dont-email.me>
<ur8a2p$2446$1@dont-email.me> <ur8ctk$2vbd$2@dont-email.me>
<20240222233838.0000572f@yahoo.com>
<3b2e86cdb0ee8785b4405ab10871c5ca@www.novabbs.org>
<ur8nud$4n1r$1@dont-email.me> <20240223143250.000012a8@yahoo.com>
<59454a79216ece74ac3fee0e00473357@www.novabbs.org>
<uravp3$nl44$1@dont-email.me> <urb6rt$phho$3@dont-email.me>
<878r3abwkv.fsf@bsb.me.uk> <urbaki$qb3j$1@dont-email.me>
<8734tibr1t.fsf@bsb.me.uk> <urbg72$rbo3$1@dont-email.me>
<87wmquaby7.fsf@bsb.me.uk> <urbjs5$s1dq$1@dont-email.me>
<urblfp$s39b$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 24 Feb 2024 03:07:26 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="90cd705a0b104282cd54d6df08a2cdc8";
logging-data="1055796"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/AL/DPeD8Gk1MCoiRMDAwP"
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:1Q61TK+2FUn7e14oUeRBuK1JDak=
 by: Lawrence D'Oliv - Sat, 24 Feb 2024 03:07 UTC

On Sat, 24 Feb 2024 02:49:29 -0000 (UTC), Steven G. Kargl wrote:

> On Sat, 24 Feb 2024 02:21:57 +0000, Lawrence D'Oliveiro wrote:
>
>> So, give me an example, in IEEE754, of something that is one but not
>> the other.
>
> Well, that's a conundrum. One cannot give you an example as IEEE 754
> does not describe unnormal numbers.

No, it’s not a conundrum. It’s just a confirmation of my point that, in
IEEE754, you don’t need two words because there is only the single
concept.

Re: Radians Or Degrees?

<20240223191159.17@kylheku.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=35159&group=comp.lang.c#35159

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: 433-929-6894@kylheku.com (Kaz Kylheku)
Newsgroups: comp.lang.c
Subject: Re: Radians Or Degrees?
Date: Sat, 24 Feb 2024 03:12:33 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 20
Message-ID: <20240223191159.17@kylheku.com>
References: <ur5trn$3d64t$1@dont-email.me> <ur5v05$3ccut$1@dont-email.me>
<20240222015920.00000260@yahoo.com> <ur69j9$3ftgj$3@dont-email.me>
<ur86eg$1aip$1@dont-email.me> <ur88e4$1rr1$5@dont-email.me>
<ur8a2p$2446$1@dont-email.me> <ur8ctk$2vbd$2@dont-email.me>
<20240222233838.0000572f@yahoo.com>
<3b2e86cdb0ee8785b4405ab10871c5ca@www.novabbs.org>
<ur8nud$4n1r$1@dont-email.me> <20240223143250.000012a8@yahoo.com>
<59454a79216ece74ac3fee0e00473357@www.novabbs.org>
<uravp3$nl44$1@dont-email.me> <urb6rt$phho$3@dont-email.me>
<878r3abwkv.fsf@bsb.me.uk> <urbaki$qb3j$1@dont-email.me>
<8734tibr1t.fsf@bsb.me.uk> <urbg72$rbo3$1@dont-email.me>
<87wmquaby7.fsf@bsb.me.uk> <urbjs5$s1dq$1@dont-email.me>
<urblfp$s39b$1@dont-email.me> <urbmhe$1071k$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 24 Feb 2024 03:12:33 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="34619b51a16732ed137354a6ec65eead";
logging-data="1057813"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18Fl82dgsuB/DqEbee0w/Ggg8T2C4WAkCw="
User-Agent: slrn/pre1.0.4-9 (Linux)
Cancel-Lock: sha1:KoY8wF885adfXhDHOKQBNvdaLhQ=
 by: Kaz Kylheku - Sat, 24 Feb 2024 03:12 UTC

On 2024-02-24, Lawrence D'Oliveiro <ldo@nz.invalid> wrote:
> On Sat, 24 Feb 2024 02:49:29 -0000 (UTC), Steven G. Kargl wrote:
>
>> On Sat, 24 Feb 2024 02:21:57 +0000, Lawrence D'Oliveiro wrote:
>>
>>> So, give me an example, in IEEE754, of something that is one but not
>>> the other.
>>
>> Well, that's a conundrum. One cannot give you an example as IEEE 754
>> does not describe unnormal numbers.
>
> No, it’s not a conundrum.

Well, it's a subnundrum, which in your case is the same thing
as a denundrum.

--
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
Mastodon: @Kazinator@mstdn.ca

Re: Radians Or Degrees?

<urbpps$10mal$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=35160&group=comp.lang.c#35160

  copy link   Newsgroups: comp.lang.c comp.arch
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: sgk@REMOVEtroutmask.apl.washington.edu (Steven G. Kargl)
Newsgroups: comp.lang.c,comp.arch
Subject: Re: Radians Or Degrees?
Date: Sat, 24 Feb 2024 04:03:08 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 39
Message-ID: <urbpps$10mal$1@dont-email.me>
References: <ur5trn$3d64t$1@dont-email.me> <ur5v05$3ccut$1@dont-email.me>
<20240222015920.00000260@yahoo.com> <ur69j9$3ftgj$3@dont-email.me>
<ur86eg$1aip$1@dont-email.me> <ur88e4$1rr1$5@dont-email.me>
<ur8a2p$2446$1@dont-email.me> <ur8ctk$2vbd$2@dont-email.me>
<20240222233838.0000572f@yahoo.com>
<3b2e86cdb0ee8785b4405ab10871c5ca@www.novabbs.org>
<ur8nud$4n1r$1@dont-email.me> <20240223143250.000012a8@yahoo.com>
<59454a79216ece74ac3fee0e00473357@www.novabbs.org>
<uravp3$nl44$1@dont-email.me>
<9862882e1badcd541491098b47c61802@www.novabbs.org>
<urb6qn$phho$2@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 24 Feb 2024 04:03:08 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="6719a06acd7653ce47d0597a0ad9615d";
logging-data="1071445"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+yRy7H3BFX3AXewCl5iYs5"
User-Agent: Pan/0.145 (Duplicitous mercenary valetism; d7e168a
git.gnome.org/pan2)
Cancel-Lock: sha1:GdkCBh/VZ3GQpg+wm79oKubfWys=
 by: Steven G. Kargl - Sat, 24 Feb 2024 04:03 UTC

On Fri, 23 Feb 2024 22:39:19 +0000, Lawrence D'Oliveiro wrote:

> On Fri, 23 Feb 2024 22:29:17 +0000, MitchAlsup1 wrote:
>
>> I find it interesting that sinpi() has worse numeric error than sin().
>
> Another argument for sticking with the simpler solution? One set of
> radian-specific functions plus conversion factors, instead of a separate
> set of unit-specific functions for every unit?

Here's a counter argument for your simple conversion
factors. Changing FreeBSD's libm to return sinf(M_PI*x)
for sinpif(x), one observes

%./tlibm sinpi -f -x 0 -X 0x1p22 -PED
Interval tested for sinpif: [0,4.1943e+06]
ulp <= 0.5: 83.174% 1037372501 | 83.174% 1037372501
0.5 < ulp < 0.6: 0.937% 11690904 | 84.111% 1049063405
0.6 < ulp < 0.7: 0.689% 8587516 | 84.800% 1057650921
0.7 < ulp < 0.8: 0.497% 6200902 | 85.297% 1063851823
0.8 < ulp < 0.9: 0.323% 4023726 | 85.620% 1067875549
0.9 < ulp < 1.0: 0.157% 1952256 | 85.776% 1069827805
1.0 < ulp < 1.5: 0.347% 4332879 | 86.124% 1074160684
1.5 < ulp < 2.0: 0.247% 3083647 | 86.371% 1077244331
2.0 < ulp < 3.0: 0.360% 4491936 | 86.731% 1081736267
3.0 < ulp < 0.0: 13.269% 165496149 | 100.000% 1247232416
Max ulp: 8388278.500000 at 5.65300049e+03

% ./tlibm sinpi -f -a 5.65300049e+03
x = 5.65300049e+03f, /* 0x45b0a801 */
libm = -2.51050433e-03f, /* 0xbb248746 */
mpfr = -1.53398013e-03f, /* 0xbac90fd5 */
ULP = 8388278.50000

I can assure one of the libm and mpfr values, when x = 5653.00049,
is quite wrong.

--
steve


devel / comp.lang.c / Re: Radians Or Degrees?

Pages:1234567
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor