Re: Arithmetic overflow checking
 From: Patricia Shanahan <pats@xxxxxxx>
 Date: Mon, 25 Jul 2011 00:56:30 0700
On 7/25/2011 12:21 AM, Henderson wrote:
On 24/07/2011 12:16 PM, Patricia Shanahan wrote:On 7/23/2011 7:55 PM, Henderson wrote:We could go further and rewrite Number.java so that it is Number<T
extends Number<T>> and defines:
I don't think it would be wise to tie operator overloading to Number.
Number defines a series of conversions that make some sense for those
types that represent subsets of the real line.
I wasn't thinking beyond the real line to the more abstract stuff
mathematicians futz around with and consider to have addition and
multiplication.
Historically, complex numbers were indeed invented by and for
mathematicians for the abstract satisfaction of having solutions for all
quadratic equations. However, as happens surprisingly often when
mathematicians think they have invented something abstract for their own
amusement, scientists and engineers turned them into useful tools for
practical uses.
For example, a complex number can represent both magnitude and phase of
an alternating current. That simplifies some electrical engineering
calculations.
I've seen far too many uses of complex numbers in scientific and
engineering programs to be really comfortable with the fact that Java
lacks a practical way to express anything other than the simplest
complex number expressions.
Patricia
.
 FollowUps:
 Re: Arithmetic overflow checking
 From: Thomas Richter
 Re: Arithmetic overflow checking
 From: Arved Sandstrom
 Re: Arithmetic overflow checking
 References:
 Arithmetic overflow checking
 From: rop rop
 Re: Arithmetic overflow checking
 From: Gene Wirchenko
 Re: Arithmetic overflow checking
 From: lewbloch
 Re: Arithmetic overflow checking
 From: Arne Vajhøj
 Re: Arithmetic overflow checking
 From: Arne Vajhøj
 Re: Arithmetic overflow checking
 From: Arved Sandstrom
 Re: Arithmetic overflow checking
 From: RedGrittyBrick
 Re: Arithmetic overflow checking
 From: lewbloch
 Re: Arithmetic overflow checking
 From: RedGrittyBrick
 Re: Arithmetic overflow checking
 From: lewbloch
 Re: Arithmetic overflow checking
 From: Andreas Leitgeb
 Re: Arithmetic overflow checking
 From: lewbloch
 Re: Arithmetic overflow checking
 From: Joshua Cranmer
 Re: Arithmetic overflow checking
 From: Andreas Leitgeb
 Re: Arithmetic overflow checking
 From: David Lamb
 Re: Arithmetic overflow checking
 From: Andreas Leitgeb
 Re: Arithmetic overflow checking
 From: Henderson
 Re: Arithmetic overflow checking
 From: Patricia Shanahan
 Re: Arithmetic overflow checking
 From: Henderson
 Arithmetic overflow checking
 Prev by Date: Re: Getter/Setter  Serialization
 Next by Date: Re: Arithmetic overflow checking
 Previous by thread: Re: Arithmetic overflow checking
 Next by thread: Re: Arithmetic overflow checking
 Index(es):
Relevant Pages
