[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: hypotenuse
From: |
Eli Zaretskii |
Subject: |
Re: hypotenuse |
Date: |
Sun, 21 Jul 2024 19:12:13 +0300 |
> From: Max Nikulin <manikulin@gmail.com>
> Date: Sun, 21 Jul 2024 22:54:53 +0700
>
> On 21/07/2024 22:12, Christopher Dimech wrote:
> >>>> (defun hypotenuse (c1 c2)
> >>>> (sqrt (+ (* c1 c1) (* c2 c2))) )
> >
> > I have a solution to the problem in fortran, but not in elisp. I could
> > include it. Its implementation required serious concentration.
>
> Underflow/overflow issues may be solved with a few lines of code and it
> does matter if it is fortran, elisp, or another language (besides
> pathological ones). The problem is to avoid error above 1 ULP.
Right, overflow and underflow are just the tip of a very large
iceberg.
> In 2021 hypot implementation in glibc was replaced by a more precise one:
> https://sourceware.org/git/?p=glibc.git;a=commit;h=6c848d70383e1dbe932ef41723ac0abfdeec7ca8
Which is exactly why I said we should use the existing implementation
in the standard library.
- Re: Adding a generic mathematical library, (continued)
- Re: Adding a generic mathematical library, Emanuel Berg, 2024/07/21
- Re: Adding a generic mathematical library, Emanuel Berg, 2024/07/21
- Re: Adding a generic mathematical library, Emanuel Berg, 2024/07/21
- hypotenuse (was: Re: Adding a generic mathematical library), Emanuel Berg, 2024/07/21
- Re: hypotenuse (was: Re: Adding a generic mathematical library), Eli Zaretskii, 2024/07/21
- Re: hypotenuse (was: Re: Adding a generic mathematical library), Eli Zaretskii, 2024/07/21
- hypotenuse (was: Re: Adding a generic mathematical library), Christopher Dimech, 2024/07/21
- Re: hypotenuse (was: Re: Adding a generic mathematical library), Eli Zaretskii, 2024/07/21
- hypotenuse (was: Re: Adding a generic mathematical library), Christopher Dimech, 2024/07/21
- Re: hypotenuse, Max Nikulin, 2024/07/21
- Re: hypotenuse,
Eli Zaretskii <=
- hypotenuse, Christopher Dimech, 2024/07/21
- Re: hypotenuse (was: Re: Adding a generic mathematical library), Emanuel Berg, 2024/07/21
- Re: hypotenuse (was: Re: Adding a generic mathematical library), Emanuel Berg, 2024/07/21
- Re: hypotenuse (was: Re: Adding a generic mathematical library), tomas, 2024/07/21
- Re: Adding a generic mathematical library, Michael Heerdegen, 2024/07/17
- Re: Adding a generic mathematical library, Philip Kaludercic, 2024/07/17
- Re: Adding a generic mathematical library, Michael Heerdegen, 2024/07/17
- Re: Adding a generic mathematical library, Emanuel Berg, 2024/07/18
- Re: Adding a generic mathematical library, Christopher Dimech, 2024/07/18
- Re: Adding a generic mathematical library, Emanuel Berg, 2024/07/18