fanf: (Default)
[personal profile] fanf
http://www.cs.berkeley.edu/~wkahan/JAVAhurt.pdf

On pages 11-15 this rant goes off on a tangent about branch cuts in complex arithmetic. It distinguishes between C99-style complex numbers, which have a separate type for bare imaginary numbers, and Fortran-style complex numbers, which do not. The authors assert that it isn't possible for Fortran-style complex numbers to handle signed zeroes correctly and therefore that programs written to use this style of arithmetic necessarily get branch cuts wrong.

This seems unlikely to me, if the programmer has suitable facilities for constructing or decomposing complex numbers from or into two reals. I guess they must be over-simplifying.

pure imaginaries

Date: 2006-05-31 10:29 (UTC)
From: (Anonymous)
I think that there is a problem in Fortran-style (and Common Lisp-style, which is where I come from) imaginaries and zeros, in that typically the complex numbers which can be decomposed into two reals must have the two reals of the same type: for instance, at least in CL, if you have \sqrt{i} it must be represented as #C(0.70710677 0.70710677); 1+2i must be #C(1 2) and cannot be #C(1 2.0) or any other mixed representation.

Why does this matter? It matters because there are three values for the real part to consider along the imaginary axis: +0, -0 and really truly 0. But it's impossible to express the third concept with a floating point imaginary part in those languages with no mixed representation. I'd have to go back to my notes to dig out cases where it matters, but the basic point is that multiplying a floating point real by i twice is not the same as multiplying by -1, and that causes pain.

Christophe

Date: 2006-05-31 12:07 (UTC)
ext_8103: (Default)
From: [identity profile] ewx.livejournal.com
The implication seems to be that Branch cuts for complex elementary functions; or, Much ado about nothing's sign bit has the answer. Perhaps an instance can be found in the UL (I can't find any indication of an online version). But while looking I found tthis somewhat diverting - I kind of like the idea of anonymous mathematicians taking pot shots through journals.

You look like the silent type

Date: 2006-05-31 14:10 (UTC)
From: [identity profile] hoiho.livejournal.com
I still don't really trust anything but int.

Although I'm passing my time at the moment by adding fractional type support to gcc.

December 2025

S M T W T F S
 123456
78910111213
14151617181920
21222324 252627
28293031   

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated 2026-01-04 21:49
Powered by Dreamwidth Studios