Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Reals

Name: Tony Blair 2014-03-22 6:04

Why do so many languages include the type of "real" numbers if real numbers are physically impossible to represent in any computer? There are no and will never be realnums in any computer, stop deluding yourselves.

Name: Anonymous 2014-03-22 6:37

hax my anus

Name: Anonymous 2014-03-22 6:52

WTF?

Of course you can represent them in a computer. Even irrational ones. You represent them symbolically

e.g. the Lisp forms

'(sqrt 2)
pi

Represent irrational, real numbers.

Try using a CAS e.g. Maxima or Mathematica and learning how they work.

Name: Anonymous 2014-03-22 7:05

>>3
Try representing pi or e in a computer.
And in many programming languages a realnum is just a misnomer for a limited-precision floating-point number. And that is just lunacy and delusion. 64 bits are not a "real number".

Name: Anonymous 2014-03-22 8:14

>>4
'e
'pi

There, I represented both.

Name: Anonymous 2014-03-22 8:18


In[33]:= 2 * Pi
Out[33]= 2 \[Pi]

In[34]:= 2 * Pi * E
Out[34]= 2 E \[Pi]

In[35]:= Sqrt[2 * E * Pi]
Out[35]= Sqrt[2 E \[Pi]]

In[36]:= N[Sqrt[2 E \[Pi]], 50]
Out[36]= 4.1327313541224929384693918842998526494455219169913

In[37]:= N[Sqrt[2 * E * Pi], 100]

Out[37]= 4.\
1327313541224929384693918842998526494455219169913084515566512537979579\
28513417032362520362455466283


Do you understand yet?

Name: Anonymous 2014-03-22 8:23

In case you don't understand I'll spell it out for you:

Sqrt[2 * E * Pi]

is a computer representation, as an M-expression of a real number. The exact encoding of the M-expression is not really important, but ultimately it is encoded in binary.

The function N evaluates the precise "lossless" (if you will) computer representation of a real number into a lossy decimal representation to some specified amount of digits.

Nevertheless, it is evident that a computer can easily represent, manipulate and compute with, a real number.

Name: Anonymous 2014-03-22 10:58

>>7
An M-expression is no more a real number than the Greek letter pi is the number pi. It is a symbol, not a number.
Even computation of a real number to arbitrary precision does not mean the real number itself is ever represented in computer memory.
There is no precise "lossless", as you call it, computer representation of an arbitrary real number as it would overfill any memory. You are lying.
Thus saying that any programming language has a "real number" type is misleading, arrogant and delusional. Computers have floating-point numbers, sure, but not real numbers.

Name: Anonymous 2014-03-22 11:05

>>1
Rational numbers can easily be represented in a computer program by defining them as the quotient of two integers. Irrational numbers must be, just like IRL, represented by an approximation or a symbol.

Name: Anonymous 2014-03-22 12:44

>>9
But in programming languages that have a realnum type it is not a type of symbols or even rational numbers, but simply floating-point numbers.

Name: Anonymous 2014-03-22 14:04

>>10
those are shit languages

Name: Anonymous 2014-03-22 18:21

>>11
I'm sorry you can't appreciate REAL programming languages.

Name: Anonymous 2014-03-22 18:22

The ``goo nuff'' ``real'' numbers in most programming languages can't even represent 0.1 exactly, let alone real numbers.

Name: Anonymous 2014-03-22 19:02

>>13
0.1
0.0001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100

Name: Anonymous 2014-03-22 19:12

>>8
Yes, it's not a real number. It's a representation of a real number. Like a machine word can be a representation of integers (a subset of real numbers) or certain decimals (floating point numbers).

A physical entity can never be a number, it can only represent it.

Name: Anonymous 2014-03-22 19:20

A physical entity can never be a number, it can only represent it.
I actually have a seven in my pocket right now.

Name: Anonymous 2014-03-22 19:34

>>16
I have a fourteen in my crotch, if you know what i mean

Name: Anonymous 2014-03-25 16:12

>>3
Still nowhere close to 'real numbers'
The best you can do is rational numbers + extension fields.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List