Numeric roadmap?

Why don’t we have proper support for numbers in Ruby?
Numeric, Fixnum, Float, Bignum, Complex, Rational, BigDecimal…
What a mess! And they are often incompatible and can’t be safely
interchanged!

There MUST BE ONE SINGLE AND TRUE COMPLETE NUMERIC TYPE!!!
namely, class ArbitraryPrecisionHyperComplexNumber !

P.S. just a joke, raised by Unicode debate :)))

There MUST BE ONE SINGLE AND TRUE COMPLETE NUMERIC TYPE!!!
namely, class ArbitraryPrecisionHyperComplexNumber !

P.S. just a joke, raised by Unicode debate :)))

Not a good idea to joke about language design, see Parrot.
-tim

There MUST BE ONE SINGLE AND TRUE COMPLETE NUMERIC TYPE!!!
namely, class ArbitraryPrecisionHyperComplexNumber !

You will support quaternions and octonions, right? It had also better
support vector rotation by quaternion, or I’m not using it :slight_smile:

P.S. just a joke, raised by Unicode debate :)))

We’ll see :slight_smile:

Tim B. wrote:

There MUST BE ONE SINGLE AND TRUE COMPLETE NUMERIC TYPE!!!
namely, class ArbitraryPrecisionHyperComplexNumber !

P.S. just a joke, raised by Unicode debate :)))

Not a good idea to joke about language design, see Parrot.
-tim

Parrot? This parrot is dead, right?


M. Edward (Ed) Borasky

http://linuxcapacityplanning.com

On 6/19/06, M. Edward (Ed) Borasky [email protected] wrote:

We’ll see :slight_smile:
Why not do what R did — define “scalars” as vectors of length 1 and
make the vector the basic numeric type?

Then you have a conformability problem. How do you multiply a vector
times a scalar? If a scalar is represented by a vector of length one,
“doubling” a vector of length greater than one won’t work or will
require special code.

On 19/06/06, M. Edward (Ed) Borasky [email protected] wrote:

Parrot? This parrot is dead, right?

Careful - that’s a Python joke!

Paul.

stuart yarus wrote:

Why not do what R did — define “scalars” as vectors of length 1 and
make the vector the basic numeric type?

Then you have a conformability problem. How do you multiply a vector
times a scalar? If a scalar is represented by a vector of length one,
“doubling” a vector of length greater than one won’t work or will
require special code.
Ah, but R, like S, uses something called the recycling rule. Vector A of
length N times vector B of length M is defined by recycling the shorter
vector from the end back to the beginning. So [3 4 5] * [3] is [9 12
15], [2 3] + [7 8 9] is [9 11 11], etc.


M. Edward (Ed) Borasky

http://linuxcapacityplanning.com

[email protected] wrote:

There MUST BE ONE SINGLE AND TRUE COMPLETE NUMERIC TYPE!!!
namely, class ArbitraryPrecisionHyperComplexNumber !

You will support quaternions and octonions, right? It had also better
support vector rotation by quaternion, or I’m not using it :slight_smile:

P.S. just a joke, raised by Unicode debate :)))

We’ll see :slight_smile:
Why not do what R did — define “scalars” as vectors of length 1 and
make the vector the basic numeric type?


M. Edward (Ed) Borasky

http://linuxcapacityplanning.com

Paul B. wrote:

On 19/06/06, M. Edward (Ed) Borasky [email protected] wrote:

Parrot? This parrot is dead, right?

Careful - that’s a Python joke!
"If all the young ladies were diamonds and rubies,
Then I’d … "

Uh … never mind … wrong newsgroup.


M. Edward (Ed) Borasky

http://linuxcapacityplanning.com

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs