comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Any good package for mathematical function in Ada?
Date: Mon, 1 Jun 2020 13:34:59 +0200
Date: 2020-06-01T13:34:59+02:00	[thread overview]
Message-ID: <rb2p52$qvl$1@gioia.aioe.org> (raw)
In-Reply-To: rb2mek$1fn9$1@gioia.aioe.org

On 01/06/2020 12:48, Nasser M. Abbasi wrote:
> On 6/1/2020 5:19 AM, Dmitry A. Kazakov wrote:
> 
>> The test produces:
>>
>> J0(1)= 7.65197686557967E-01
> 
> That is good. In Mathematica
> 
> N[BesselJ[0, 1], 100]
> 
> 0.76519768655796655144971752610266322090927428975532524186154754911927\
> 89122152724401671806000989156340
> 
> In Maple
> 
> Digits:=100;
>                           Digits := 100
> evalf(BesselJ(0,1))
> 0.76519768655796655144971752610266322090927428975532524186154754911927\
> 89122152724401671806000989156340
> 
> Want 1,000 digits? 2,000 digits? all can be done.

In how many microseconds?

> 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.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de

  reply	other threads:[~2020-06-01 11:34 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 [this message]
2020-06-01 11:52           ` Nasser M. Abbasi
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