Rocksolid Light

Welcome to Rocksolid Light

mail  files  register  newsreader  groups  login

Message-ID:  

God is real, unless declared integer.


devel / comp.lang.apl / Nars floor of a big float

SubjectAuthor
* Nars floor of a big floatRosario19
+* Re: Nars floor of a big floatJames Cloos
|`- Re: Nars floor of a big floatRosario19
`- Re: Nars floor of a big floatBob Smith

1
Nars floor of a big float

<tl8etih5ldjfoufu2oig49ne05r2g60vak@4ax.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=442&group=comp.lang.apl#442

  copy link   Newsgroups: comp.lang.apl
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Ros@invalid.invalid (Rosario19)
Newsgroups: comp.lang.apl
Subject: Nars floor of a big float
Date: Thu, 22 Feb 2024 11:34:06 +0100
Organization: A noiseless patient Spider
Lines: 11
Message-ID: <tl8etih5ldjfoufu2oig49ne05r2g60vak@4ax.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Injection-Info: dont-email.me; posting-host="4953dbc86708bf637818345abccd93fe";
logging-data="4022934"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/x8AavJ3IOkExBMH+JecqclLPnNaLW6Og="
Cancel-Lock: sha1:1ooXacjQUCzgQ9GtIACnD3FbjCg=
X-Newsreader: Forte Free Agent 1.93/32.576 English (American)
 by: Rosario19 - Thu, 22 Feb 2024 10:34 UTC

In Nars is right that the floor of log10 of 9999999999999.9v with
fpc=128 result 13?

30??10 ? 9999999999999.9v
13.000000000000000000000000000000

but here result 12

(4) -> floor( log10 ( 9999999999999.9))
(4) 12.0

Re: Nars floor of a big float

<m3bk88y04t.fsf@nitrogen.jhcloos.org>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=443&group=comp.lang.apl#443

  copy link   Newsgroups: comp.lang.apl
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: cloos@jhcloos.com (James Cloos)
Newsgroups: comp.lang.apl
Subject: Re: Nars floor of a big float
Date: Thu, 22 Feb 2024 10:44:18 -0500
Organization: A noiseless patient Spider
Lines: 27
Message-ID: <m3bk88y04t.fsf@nitrogen.jhcloos.org>
References: <tl8etih5ldjfoufu2oig49ne05r2g60vak@4ax.com>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="df38a991f77b5824f15dce2279901c66";
logging-data="4153198"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+wTfYjz6sklbLa6o7wLbyE"
User-Agent: Gnus/5.13 (Gnus v5.13)
Cancel-Lock: sha1:hGf1qRSLjjB5QZtkEsvwmbFv9ec=
sha1:sEaLjRhNg6h0X/7Z4KCYvIamRyQ=
OpenPGP-Fingerprint: E9E9 F828 61A4 6EA9 0F2B 63E7 997A 9F17 ED7D AEA6
Copyright: Copyright 2024 James Cloos
Face: iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAgMAAABinRfyAAAACVBMVEX///8ZGXBQKKnCrDQ3
AAAAJElEQVQImWNgQAAXzwQg4SKASgAlXIEEiwsSIYBEcLaAtMEAADJnB+kKcKioAAAAAElFTkSu
QmCC
OpenPGP: 0x997A9F17ED7DAEA6; url=https://jhcloos.com/public_key/0x997A9F17ED7DAEA6.asc
 by: James Cloos - Thu, 22 Feb 2024 15:44 UTC

>>>>> "R" == Rosario19 <Ros@invalid.invalid> writes:

R> In Nars is right that the floor of log10 of 9999999999999.9v with
R> fpc=128 result 13?

R> 30??10 ? 9999999999999.9v
R> 13.000000000000000000000000000000

I don't know nars, you are probably being hit by floating point
precision issues.

with arbitrary precision, the log10 of 9999999999999.9 is:

+12.999999999999995657055180967460008764615648097801793308999084...

Using ieee 64bit floats, you are likely to get 12.999999999999995,
but with 32bit floats you'll get 13.0.

Even with 64bit floats, rounding issues along the way could lead to a
result of 13 rather than 12.99999999...

Hense the difference in floor()'s output.

-JimC
--
James Cloos <cloos@jhcloos.com>
OpenPGP: https://jhcloos.com/0x997A9F17ED7DAEA6.asc

Re: Nars floor of a big float

<ohfftitgh4i9rf9919uj8jsvp8nte5blt4@4ax.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=444&group=comp.lang.apl#444

  copy link   Newsgroups: comp.lang.apl
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Ros@invalid.invalid (Rosario19)
Newsgroups: comp.lang.apl
Subject: Re: Nars floor of a big float
Date: Thu, 22 Feb 2024 22:41:34 +0100
Organization: A noiseless patient Spider
Lines: 30
Message-ID: <ohfftitgh4i9rf9919uj8jsvp8nte5blt4@4ax.com>
References: <tl8etih5ldjfoufu2oig49ne05r2g60vak@4ax.com> <m3bk88y04t.fsf@nitrogen.jhcloos.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Injection-Info: dont-email.me; posting-host="4953dbc86708bf637818345abccd93fe";
logging-data="117250"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18N7Ejqp1PbgKKV81aiJ4zyWle4eWjArsI="
Cancel-Lock: sha1:Je1T3a0XWExtF8M4wUic9q4Nnrs=
X-Newsreader: Forte Free Agent 1.93/32.576 English (American)
 by: Rosario19 - Thu, 22 Feb 2024 21:41 UTC

On Thu, 22 Feb 2024 10:44:18 -0500, James Cloos wrote:

>>>>>> "R" == Rosario19 <Ros@invalid.invalid> writes:
>
>R> In Nars is right that the floor of log10 of 9999999999999.9v with
>R> fpc=128 result 13?
>
>R> 30??10 ? 9999999999999.9v
>R> 13.000000000000000000000000000000
>
>I don't know nars, you are probably being hit by floating point
>precision issues.
>
>with arbitrary precision, the log10 of 9999999999999.9 is:
>
> +12.999999999999995657055180967460008764615648097801793308999084...
>
>Using ieee 64bit floats, you are likely to get 12.999999999999995,
>but with 32bit floats you'll get 13.0.
>
>Even with 64bit floats, rounding issues along the way could lead to a
>result of 13 rather than 12.99999999...
>
>Hense the difference in floor()'s output.
>
>-JimC

ok pheraps you are right for 64 and 32 bit numbers, but
9999999999999.9v with fpc of 128 it should mean it is one float of 128
bits

Re: Nars floor of a big float

<65d7e9bf$0$708$14726298@news.sunsite.dk>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=445&group=comp.lang.apl#445

  copy link   Newsgroups: comp.lang.apl
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!dotsrc.org!filter.dotsrc.org!news.dotsrc.org!not-for-mail
Date: Thu, 22 Feb 2024 19:41:28 -0500
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: Nars floor of a big float
Newsgroups: comp.lang.apl
References: <tl8etih5ldjfoufu2oig49ne05r2g60vak@4ax.com>
Content-Language: en-US
From: bsmith@sudleydeplacespam.com (Bob Smith)
In-Reply-To: <tl8etih5ldjfoufu2oig49ne05r2g60vak@4ax.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Lines: 30
Message-ID: <65d7e9bf$0$708$14726298@news.sunsite.dk>
Organization: SunSITE.dk - Supporting Open source
NNTP-Posting-Host: f5a2d613.news.sunsite.dk
X-Trace: 1708648895 news.sunsite.dk 708 bsmith@sudleyplace.com/73.132.87.70:51018
X-Complaints-To: staff@sunsite.dk
 by: Bob Smith - Fri, 23 Feb 2024 00:41 UTC

On 2/22/2024 5:34 AM, Rosario19 wrote:
> In Nars is right that the floor of log10 of 9999999999999.9v with
> fpc=128 result 13?
>
> 30??10 ? 9999999999999.9v
> 13.000000000000000000000000000000
>
> but here result 12
>
> (4) -> floor( log10 ( 9999999999999.9))
> (4) 12.0
>

The answer depends upon your setting for ⎕CT. If you are using the
default value of 3E¯15, then yes the floor of that multi-precision
number is 13. That's because the algorithm first looks for an integer
within Comparison Tolerance of the number. If it finds one, then that's
the answer, as in

a←10 ⍟ 9999999999999.9v
a+a×⎕CT
13.0000000000000347

--
_________________________________________
Bob Smith -- bsmith@sudleydeplacespam.com
http://www.sudleyplace.com - http://www.nars2000.org

To reply to me directly, delete "despam".

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor