Free42 and cube root of complex number

02242021, 02:02 AM
Post: #2




RE: Free42 and cube root of complex number
In the first case, the imaginary part is 0, while in the second case, it is 0.
0, also known as signed zero, is a feature of IEEE754 floating point. The difference between 0 and 0 shouldn't matter in Free42, but apparently this is a case where it does and where there is no specialcase code for zero to prevent this behavior. What happens internally is that the number is first converted to polar using the hypot() and atan2() functions, and atan2(0, 8) => pi, while atan2(0, 8) => pi. After multiplying that angle by 1/3, you end up on opposite sides of the real axis. I'll fix this in the next release. (You won't see this behavior in >POL, because it does contain specialcase code for handling zero in either coordinate.) 

« Next Oldest  Next Newest »

Messages In This Thread 
Free42 and cube root of complex number  Ajaja  02232021, 11:05 PM
RE: Free42 and cube root of complex number  Thomas Okken  02242021 02:02 AM
RE: Free42 and cube root of complex number  Albert Chan  02242021, 10:26 AM
RE: Free42 and cube root of complex number  Paul Dale  02242021, 02:52 AM
RE: Free42 and cube root of complex number  JF Garnier  02242021, 08:28 AM
RE: Free42 and cube root of complex number  Werner  02242021, 08:59 AM
RE: Free42 and cube root of complex number  Thomas Okken  02242021, 01:35 PM
RE: Free42 and cube root of complex number  Albert Chan  02242021, 02:47 PM
RE: Free42 and cube root of complex number  Thomas Okken  02242021, 02:53 PM
RE: Free42 and cube root of complex number  Werner  02252021, 06:08 AM
RE: Free42 and cube root of complex number  Albert Chan  02252021, 04:40 PM

User(s) browsing this thread: 1 Guest(s)