From: "Nasser M. Abbasi" <nma@12000.org>
Subject: Re: Any good package for mathematical function in Ada?
Date: Mon, 1 Jun 2020 06:52:17 -0500
Date: 2020-06-01T06:52:17-05:00 [thread overview]
Message-ID: <rb2q5f$1b1g$1@gioia.aioe.org> (raw)
In-Reply-To: rb2p52$qvl$1@gioia.aioe.org
On 6/1/2020 6:34 AM, Dmitry A. Kazakov wrote:
89122152724401671806000989156340
>>
>> Want 1,000 digits? 2,000 digits? all can be done.
>
> In how many microseconds?
>
In my PC, intel i-7-8086K CPU, 4 GHZ, it takes 6.2*10^-7 second
for 20,000 digits (I put ";" to prevent the 20,000 digits from
being printed on screen)
In[20]:= RepeatedTiming[N[BesselJ[0,1],20000];]
Out[20]= {6.2*10^-7,Null}
"RepeatedTiming[expr] evaluates expr repeatedly and returns a list of
the average time in seconds used, together with the result obtained.
"
>> I think these systems both link to GMP "GNU Multiple Precision
>> Arithmetic Library"
>> for this. "There are no practical limits to the precision "
>> https://en.wikipedia.org/wiki/GNU_Multiple_Precision_Arithmetic_Library
>
> There is no best numerical library as requirements greatly vary. One
> would probably never want to use multiple precision arithmetic in
> production code. Less improbable, but still, in laboratory computations
> when other factors control precision.
>
> As for GMP specifically, I think that arbitrary precision numeric types
> must be an integral part of Ada. Unfortunately, this would introduce
> same mess Unbounded_String did. So, for now, I would not push for them
> until the language type system mature to accommodate them smoothly.
>
Best,
--Nasser
next prev parent reply other threads:[~2020-06-01 11:52 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-31 10:46 Any good package for mathematical function in Ada? reinert
2020-05-31 11:26 ` Dmitry A. Kazakov
2020-06-01 8:17 ` reinert
2020-05-31 23:25 ` Jerry
2020-06-01 8:24 ` reinert
2020-06-01 10:19 ` Dmitry A. Kazakov
2020-06-01 10:48 ` Nasser M. Abbasi
2020-06-01 11:34 ` Dmitry A. Kazakov
2020-06-01 11:52 ` Nasser M. Abbasi [this message]
2020-06-01 13:37 ` Dmitry A. Kazakov
2020-06-02 1:48 ` Jerry
2020-06-05 22:49 ` Randy Brukardt
2020-06-05 22:54 ` Paul Rubin
2020-06-06 7:06 ` Dmitry A. Kazakov
2020-06-06 13:58 ` AdaMagica
2020-06-01 10:43 ` Dmitry A. Kazakov
2020-06-02 1:51 ` Jerry
2020-06-03 15:07 ` reinert
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox