[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #62332] [MinGW] acos(z), asin(z) and atan(z) ,
From: |
Markus Mützel |
Subject: |
[Octave-bug-tracker] [bug #62332] [MinGW] acos(z), asin(z) and atan(z) , ( z = x + yi ) return wrong result for imaginary part lower than 1e-12 |
Date: |
Mon, 8 Aug 2022 14:28:27 -0400 (EDT) |
Update of bug #62332 (project octave):
Status: In Progress => Ready For Test
_______________________________________________________
Follow-up Comment #8:
I updated the patch in MXE Octave to improve the accuracy of catanh for small
real part (and to fix a thinko in the patch for casinh):
https://hg.octave.org/mxe-octave/rev/dc5ad8056086
With it, I see the following for the example from comment #0 on Windows:
>> for ij=1:20, x = complex(1/sqrt(2), 10^(-3*ij)); printf('%.16e%+.16ei ->
%.16e%+.16ei\n', real(x), imag(x), real(acos(x)),imag(acos(x))); end
7.0710678118654746e-01+1.0000000000000002e-03i ->
7.8539916339344829e-01-1.4142116767647246e-03i
7.0710678118654746e-01+1.0000000000000006e-06i ->
7.8539816339844837e-01-1.4142135623447793e-06i
7.0710678118654746e-01+1.0000000000000009e-09i ->
7.8539816339744850e-01-1.4142135623730963e-09i
7.0710678118654746e-01+1.0000000000000014e-12i ->
7.8539816339744839e-01-1.4142135623730968e-12i
7.0710678118654746e-01+1.0000000000000017e-15i ->
7.8539816339744839e-01-1.4142135623730974e-15i
7.0710678118654746e-01+1.0000000000000018e-18i ->
7.8539816339744828e-01-1.4142135623730976e-18i
7.0710678118654746e-01+1.0000000000000024e-21i ->
7.8539816339744828e-01-1.4142135623730982e-21i
7.0710678118654746e-01+1.0000000000000025e-24i ->
7.8539816339744828e-01-1.4142135623730985e-24i
7.0710678118654746e-01+1.0000000000000027e-27i ->
7.8539816339744828e-01-1.4142135623730988e-27i
7.0710678118654746e-01+1.0000000000000031e-30i ->
7.8539816339744828e-01-1.4142135623730993e-30i
7.0710678118654746e-01+1.0000000000000035e-33i ->
7.8539816339744828e-01-1.4142135623730999e-33i
7.0710678118654746e-01+1.0000000000000040e-36i ->
7.8539816339744828e-01-1.4142135623731006e-36i
7.0710678118654746e-01+1.0000000000000042e-39i ->
7.8539816339744828e-01-1.4142135623731009e-39i
7.0710678118654746e-01+1.0000000000000045e-42i ->
7.8539816339744828e-01-1.4142135623731013e-42i
7.0710678118654746e-01+1.0000000000000050e-45i ->
7.8539816339744828e-01-1.4142135623731019e-45i
7.0710678118654746e-01+1.0000000000000051e-48i ->
7.8539816339744828e-01-1.4142135623731023e-48i
7.0710678118654746e-01+1.0000000000000053e-51i ->
7.8539816339744828e-01-1.4142135623731026e-51i
7.0710678118654746e-01+1.0000000000000058e-54i ->
7.8539816339744828e-01-1.4142135623731032e-54i
7.0710678118654746e-01+1.0000000000000060e-57i ->
7.8539816339744828e-01-1.4142135623731035e-57i
7.0710678118654746e-01+1.0000000000000066e-60i ->
7.8539816339744828e-01-1.4142135623731042e-60i
Marking as ready for test.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?62332>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/