bug#74031: [PATCH] srfi-64: Accept complex numbers in test-approximate.

2024-10-26 Thread Tomas Volf
Hello, lloda writes: >> On 26 Oct 2024, at 19:22, Ludovic Courtès wrote: >> >> Hi, >> >> (Cc: lloda.) >> >> Tomas Volf <~@wolfsden.cz> skribis: >> >>> The specification mandates reals, but the reference implementation >>> supports complex numbers. So as implementation extension, support th

bug#74031: [PATCH] srfi-64: Accept complex numbers in test-approximate.

2024-10-26 Thread lloda
> On 26 Oct 2024, at 19:22, Ludovic Courtès wrote: > > Hi, > > (Cc: lloda.) > > Tomas Volf <~@wolfsden.cz> skribis: > >> The specification mandates reals, but the reference implementation >> supports complex numbers. So as implementation extension, support them >> as well. >> >> * module/s

bug#74031: [PATCH] srfi-64: Accept complex numbers in test-approximate.

2024-10-26 Thread lloda
Like I wrote in a separate message, I think test-approximate should check the https://en.wikipedia.org/wiki/Euclidean_distance : (<= (magnitude (- expected value)) epsilon) For real numbers, it means the same as the current test. It would also work for other types for which the user has defin

bug#74031: [PATCH] srfi-64: Accept complex numbers in test-approximate.

2024-10-26 Thread Ludovic Courtès
Hi, (Cc: lloda.) Tomas Volf <~@wolfsden.cz> skribis: > The specification mandates reals, but the reference implementation > supports complex numbers. So as implementation extension, support them > as well. > > * module/srfi/srfi-64.scm (within-epsilon): Support complex arguments. > --- > Propos

bug#74031: [PATCH] srfi-64: Accept complex numbers in test-approximate.

2024-10-26 Thread Tomas Volf
The specification mandates reals, but the reference implementation supports complex numbers. So as implementation extension, support them as well. * module/srfi/srfi-64.scm (within-epsilon): Support complex arguments. --- Proposal for how to extend test-approximate to handle complex arguments. Ho