Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Why isn't there a java.lang.Complex ?

2 views
Skip to first unread message

D'Arcy Smith

unread,
Jul 24, 1996, 3:00:00 AM7/24/96
to Don Bennett

Don Bennett wrote:
>
> I'm curious as to why there is no Complex number class supplied with the
> API (not that it'd be difficult to implement). I mean, even the GNU C++
> library comes with a Complex number class.

We were all waiting for you to do it :-)

..darcy

Don Bennett

unread,
Jul 24, 1996, 3:00:00 AM7/24/96
to

I'm curious as to why there is no Complex number class supplied with the
API (not that it'd be difficult to implement). I mean, even the GNU C++
library comes with a Complex number class.

Don (Just curious, not a gripe. :)

--
IBM: Iconoclastic Bilateral Monopoly------------------------------------------
-------------------------------Finger d...@nano.engr.mun.ca for PGP Public Key.
Don Bennett (TIP#318) C[ ]~~~ Electrical Engineering -- Class of '99
Email: d...@engr.mun.ca [_] Home page: http://www.engr.mun.ca/~don

Alexander Anderson

unread,
Jul 25, 1996, 3:00:00 AM7/25/96
to

In article <31F6AD...@symantec.com>, D'Arcy Smith
<DSm...@symantec.com> writes

>Don Bennett wrote:
>>
>> I'm curious as to why there is no Complex number class supplied with the
>> API (not that it'd be difficult to implement). I mean, even the GNU C++
>> library comes with a Complex number class.
>

>We were all waiting for you to do it :-)
>
>..darcy


Dear Don Bennett,


>(not that it'd be difficult to implement)


Able to leap buildings at a single bound. van Hoff did not finish
Java in six days, although it probably felt like it at the time.


Rather like the "C." in Authur C. Clarke [*], what exactly does
"GNU" stand for? I've always wanted to know. Sometimes I spend 10
minutes at a stretch puzzling, rather like when you're trying to
remember Tom Cruise's name.


Global Net University?
Geostationary Nuclear Unit?
Gnat-Newton Updraft?
Great Newbie Utility?


Where could I get to look EASILY (ie. browse) at the source of the
Complex number class. Would you send it to me? (Hang on, haven't I
seen a Borland Complex source somewhere?)


Waiting for the Java Class Warehouse to get it's act together here's
a Complex class:


http://www.mdx.ac.uk/~alexander9/html/cs_coursework_examples.html


(Third bullet)


Sandy

[*] Charles
--
// Alexander Anderson Computer Systems Student //
// sa...@almide.demon.co.uk Middlesex University //
// Home Fone: +44 (0) 171-794-4543 Bounds Green //
// http://www.mdx.ac.uk/~alexander9 London U.K. //

Scott Wheeler

unread,
Jul 25, 1996, 3:00:00 AM7/25/96
to

In Article <4t68ko$1...@coranto.ucs.mun.ca> Don Bennett writes:
>I'm curious as to why there is no Complex number class supplied with
>the API (not that it'd be difficult to implement). I mean, even the
>GNU C++ library comes with a Complex number class.

My guess is that they were not sure of the Right Way to do it.
Apparently when IBM designed the COMPLEX data type in PL/I, they chose
the Cartesian representation (z=x+iy) and annoyed a load of numeric
workers for whom the exponential representation (z=r*e^it) was more
natural or gave better performance. If you miss it out of a language,
it's trivial for people to write their own. If you put it in, people
wanting the other representation have to hack around it, and risk
mistakes like using the wrong constructor, e.g. Complex (double x,
double y) rather than Cmplex(double r, double theta) [user's class].

Scott

Dave Zimmerman

unread,
Jul 25, 1996, 3:00:00 AM7/25/96
to

Alexander Anderson wrote:
>
>
> Rather like the "C." in Authur C. Clarke [*], what exactly does
> "GNU" stand for? I've always wanted to know. Sometimes I spend 10
> minutes at a stretch puzzling, rather like when you're trying to
> remember Tom Cruise's name.
>

GNU - GNU's Not Unix

--
\ The _____
\ /\ /idget
\ \/ \/ _______ David Zimmerman The Widget Workshop
\ /\ /orkshop dz...@widget.com 4001 Weston Parkway
\/ \/ Inc. 919 677 1942 Cary NC 27513
--
Any sufficiently advanced technology is indistinguishable from a
rigged demo.

Arne Lindstrom

unread,
Jul 26, 1996, 3:00:00 AM7/26/96
to

Alexander Anderson wrote:

> Rather like the "C." in Authur C. Clarke [*], what exactly does
> "GNU" stand for? I've always wanted to know.
>
I thought EVERYONE knew :
_G_NU is _N_ot _U_nix
(an yes it's recursive:)

--
Arne Lindström
mailto:al9...@sa.erifoft.se (until Aug. 9)

Eric Vought

unread,
Jul 27, 1996, 3:00:00 AM7/27/96
to

Alexander Anderson wrote:
I thought EVERYONE knew :
> >_G_NU is _N_ot _U_nix
> >(an yes it's recursive:)
>
> I don't get it.
>
> Why did this joke, that I don't get, happen?
>
> Is it something to do with Linux?

It has to do with the fact that UNIX(TM) is a trademarked name. An
opperating system cannot be "UNIX" unless it pays the owners of the
trademark and can prove that it conforms to the standard. GNU's idea was
to build a free and portable UNIX variant that would be compatible with
UNIX, but would not be UNIX, both in the sense of not having the
trademarked name and in having vastly improved internals, functionality,
and greater flexibility. The GNU tools were created to run on top of
this OS, called the HURD, which is still in development (and sadly, at
the rate its going, will be for a *very* long time). In the mean time,
Linus Torvalds developed the Linux kernel and people have created an OS,
Linux, which is based on Linus' kernel and the GNU tool suite. This has
become the de facto GNU system, at least until the HURD is completed.
So, Linux has accomplished a large portion of the original goals of the
GNU project using their tools, but is not considered by the FSF to be
"the GNU system".

The acronym boils down to "This OS would be called UNIX(TM), if it could
legally use the UNIX trademark, but heck its much better than UNIX
anyway"

Alexander Anderson

unread,
Jul 27, 1996, 3:00:00 AM7/27/96
to

In article <31F88C...@sa.erisoft.se>, Arne Lindstrom
<al9...@sa.erisoft.se> writes


>> Rather like the "C." in Authur C. Clarke [*], what exactly does
>> "GNU" stand for? I've always wanted to know.
>>

>I thought EVERYONE knew :
>_G_NU is _N_ot _U_nix
>(an yes it's recursive:)


I don't get it.


Why did this joke, that I don't get, happen?


Is it something to do with Linux?


Sandy

Trond Eivind Glomsrød

unread,
Jul 30, 1996, 3:00:00 AM7/30/96
to

D'Arcy Smith <DSm...@symantec.com> writes:

> Don Bennett wrote:
> >
> > I'm curious as to why there is no Complex number class supplied with the
> > API (not that it'd be difficult to implement). I mean, even the GNU C++
> > library comes with a Complex number class.
>

> We were all waiting for you to do it :-)

Anyone can do it- the math is simple, and can be found in many
books. There would be no problem in making a class supporting sin, ln,
sqrt etc. The problem is, that without native support (like double and
int), they'll become far too slow. And if you're using complex
numbers, you're doing mathematics, so speed is important.

> ...darcy

--
Trond Eivind Glomsrød
t...@stud.imf.unit.no :::: http://www.pvv.ntnu.no/~teg/
**linux: because a PC is a terrible thing to waste**

Trond Eivind Glomsrød

unread,
Jul 30, 1996, 3:00:00 AM7/30/96
to

Alexander Anderson <sa...@almide.demon.co.uk> writes:

> Rather like the "C." in Authur C. Clarke [*], what exactly does
> "GNU" stand for?

GNU is Not Unix (recursive)

> Where could I get to look EASILY (ie. browse) at the source of the
> Complex number class.

There's no need for one- the math is simple. The problem is speed.

> [*] Charles

0 new messages