Reminder that if

reminder that if
1.5 == 1.49999999999999999999

is true in your programming language of choice, then you should seriously reconsider your life choices

Attached: aGVdbkRthyEeTIKBUIVEqoExmDuVwGRZlgqiM0sfQAs.jpg (687x389, 39K)

Other urls found in this thread:

play.rust-lang.org/?gist=d5e98870f26e259ff5b8ae8999d00536&version=stable&mode=debug
en.wikipedia.org/wiki/Double-precision_floating-point_format
twitter.com/AnonBabble

That's just a result of being fast and efficient.
An academic memer like you wouldn't understand such things.

Reminder that if you don't understand IEEE 754, and the hardware reasons behind it, you're not allowed to talk shit about floating point numbers.

> He thinks floating point arithmetic is dependent on the language used

Attached: 1407303027536.png (724x611, 129K)

Floating point arithmetic is broken in every single language using this crap.

>Scheme numerical tower master race reporting

Attached: scheme.png (389x110, 15K)

If you mean 1.49 recuring then yes, it does equal 1.5

>abstract math

\thread

OP mortally BTFO

Attached: 1457290198609-0.png (500x720, 215K)

how does the tower handle irrationals

1.0111...11 =/= 1.1000..00
Those recurring numbers that /sci/ likes to babble over don't work in base 2, where you can't express a value that is less than your maximum value but is also not your lowest. Coincidentally, base 2 is the simplest numerical representation and is as natural as the atom.

Some languages use different default types.

Reminder that if you don't understand IEEE 754 and the mathematical reasons why floating point numbers can't be associative, much less distributive, you're not allowed to talk shit about floating point numbers.

my win7 calc will give proper answers and not those fractions of endless digits so whats the deal?

Retard.

These recurring numbers exist, just try to express 0.1 as a floating point number.

>1.0111...11 =/= 1.1000..00
You are retarded, if you you take the limit of 1.0111... it equals 1.10.

>These recurring numbers exist, just try to express 0.1 as a floating point number.
Wrong. Floating point numbers are expressed in base two with an exponent field and a mantissa field.
In fact, in floating point arithmetic the most significant bit is assumed to one and is not encoded, because every number starts with a most significant bit that is 1.
So the signficand on the left is 01111 and the one on right is 1000. Not the same for floating point arithmetic. If they were the same you'd be able to xor it and get zero.
This is because /sci/ ignores the elephant in the room that recurring numbers do not exist. You cannot express limits like that in 64bits or in any representive base. Even if your supposed turing machine could write a number on every atom of the universe, they would still be different and not equatable, because there is only a finite number of atoms and eventually you'd run into clamping. The "equality" falls apart.

>Floating point numbers are expressed in base two with an exponent field and a mantissa field.
Yes. But I am assuming both to be infinite.
But in fact the bit pattern is completely irrelevant to numbers in base 2.

>In fact, in floating point arithmetic the most significant bit is assumed to one and is not encoded, because every number starts with a most significant bit that is 1.
>So the signficand on the left is 01111 and the one on right is 1000. Not the same for floating point arithmetic. If they were the same you'd be able to xor it and get zero.
Why are you telling me this?

>You cannot express limits like that in 64bits
You can.
Just not in the regular IEEE 754.

>or in any representive base.
You are retarded.
I can encode the number 0.1in 64 bits, just not in IEEE 754.
That is what a CAS does by the way.
A computer CAN calculate with infinite decimals, just Google COMPUTER ALGEBRA.

>Even if your supposed turing machine could write a number on every atom of the universe, they would still be different and not equatable, because there is only a finite number of atoms and eventually you'd run into clamping. The "equality" falls apart.
Good to know that youjust solved a nearly two thousand year long debate in mathematics.
You are an absolute retard and have no clue what you are talking about.

Are you frustrated?

No, just disappointed that someone who doesn't know what a CAS is is spewing such bullshit as if he had any clue what he talking about.

>what is IEEE 754

Attached: 1498659752346.jpg (800x450, 37K)

>brainlet can't wrap his head around hardware limitations and efficiency

In PHP you can add a third equal sign for maximum precision
>1.5 === 1.49999999999999999999

It gives a real approximation, because it's not a full CAS unfortunately.

>Those recurring numbers that /sci/ likes to babble over don't work in base 2
Yes they do.

x = 10
y = 1.111...
y = 1 + 0.1 + 0.01 ...
10y = 10 + 1 + 0.1 ...
10y - y = 10 + 1 + 0.1 ... - (1 + 0.1 + 0.01 ...)
y = 10
y = x

QED

>... recurring numbers do not exist.

Attached: 1467980932800.png (500x375, 296K)

Fuck off sci.
Also even Wildberger accepts the existence of recurring numbers, he doesn't call 1/3 illogical.

I also think that the existence of CAS at least shows that finite extensions of Q should be valid, as eg. sqrt(2) as a mathematical object can be handled very well by a computer.

Hmm

Attached: 1522694942101.png (274x74, 2K)

Don't put the numbers in quotes, you idiot.

>I don't understand floats

Attached: vO7lRZ7.png (621x702, 56K)

>Comparing two different strings
Dude

Okay

Attached: 1510933451022.png (459x59, 1K)

>reminder that if your language is IEEE 754 compliant then you should seriously reconsider your life choices
-you

Attached: Untitled.png (400x432, 10K)

Base-1 (unary) is the simplest, and only natural numerical representation. I = 1, III = 3 etc.

Attached: do-not-dumb-here.jpg (800x666, 72K)

It kind of is though.

COBOL was built to deal with this sort of thing as a core feature. It's something that's been lost in the last 20 years of new languages.

changing the base doesn't change anything you fucking retard, the proof is the same

Not quite. COBOL had types to deal with money in a good way, that's true.
Scheme as mentioned above comes close, but it is not a CAS (although it's easy to implement a CAS in Scheme).

I want a language where I have exact real arithmetic by default, and only floating point as an option. Similarly, I want something that abstracts away things like threads, etc. and provide parallelism in a transparent way.

Attached: Capture.png (644x453, 13K)

>bool Equals(float lhs, float rhs) { return abs(lhs - rhs) < 0.00009; }
Wew lad

There's no 1.49999999999999999999 in IEE-754. The closest thing is 1.49999994, greater values get rounded to 1.5, which can be accurately stored in a float.

Attached: reeeeee.png (645x101, 5K)

Scheme changed my understanding of programming completely.

I'll call my bullshit, this is only true for 32-bit floats.

play.rust-lang.org/?gist=d5e98870f26e259ff5b8ae8999d00536&version=stable&mode=debug

You had none before?

Hmm

Attached: 1506418493168.png (772x765, 23K)

you cannot represent 1.49999999999 with anything other than 1.5 in IEEE-754 64-bit

Attached: IEEE754 Double precision 64-bit.jpg (416x105, 15K)

What the fuck is interaction engineer?

Try adding more 9s

Seems like 8bit computers can't into rusting.

Attached: emsex.jpg (562x439, 47K)

>What is the maximum length of an integer evaluated at compile time?

Next time make sure you have more than 64 bits to adress that number and see what it evaluates to.

No, but I was a die-hard C-fag.

So do tell me what exactly changed in your understanding?

in many languages, you cannot compare floats.
If you think you can compare float, then you haven't read this

I'm bored

Attached: 1522987303314.png (815x732, 23K)

I grew a big RMS beard

Thought so.

Still not enough 9s...
Do you know how much 9s can fit in 64bits?

This mean that A) Your language doesn't use IEEE-754 standard B) Is a shit language

*many

Thats more than enough 9's. 64 bits doesn't evaluate t that many decimal characters in base10. And its a double as well.

64/9 == 7 :ᐢ)

>in many languages, you cannot compare floats.
Namely?

>I was wrong
Circa 324 decimals in base10 for 64bit.

32 is only 38 decimals.

Tha's bullshit. Where are you getting this from?

From the wiki page:

en.wikipedia.org/wiki/Double-precision_floating-point_format
0 01111111111 00000000000000000000000000000000000000000000000000012 ≙ +20·(1 + 2−52) ≈ 1.0000000000000002, the smallest number > 1
0 01111111111 00000000000000000000000000000000000000000000000000102 ≙ +20·(1 + 2−51) ≈ 1.0000000000000004

So 16 decimals for double should be enough for 1.5 = 1.49[...].

Reminder, if your language doesn't support superior Fixed Point types instead of garbage floating point you need to reconsider your life choices.

How do I make sure of that in JS?

JS doesn't have Integers.

what the fuck is an interaction engineer?

But we aren't talking about integers.

>oh, I'm not gonna read the JS standard I'll just assume it works like C
>oh, it doesn't work like C, I guess it's just garbage

>He doesn't use the winapi DECIMAL type.

If your language has an === operator it is garbage though.

If your language doesn't have an := operator it is garbage though.

Agreed.

Same as = in proper languages. === is completely different.

>Winapi
From which mental institution you're posting?

>:= === =
False. Go read a book.

reminder that if
1 == 0.999...

is true in your chosen universe, then you should seriously reconsider your life choices

It is true by definition, standard mathematic is independent of the physical reality.

>some languages can make up their own operators
>the ones I hate cannot

I'm sure you meant which HMENTALINSTITUTION, didn't you?

>his universe can't define infinite precision

Attached: smug manga.png (519x843, 418K)

The universe doesn't define anything.
Real numbers are a human construct.

>a human construct
Part of our universe then.

You will just return a four digit number, won't you?

Yes, but not necessarily corresponding to physical reality.

The physical universe has a limit on precision.

The tech industry equivalent of a sanitation engineer

Then anime is real.

Mathematically
>1.5 == 1.49999999999999999999...
is a true statement.
You just need to add three dots at the end.

I don't know if that is true, but so what?

>animals are nature
>things animals make are natural
>humans are animals
>things humans make are unnatural
i've always thought it absurd that nature is mostly used to describe anything not human-related, but is also applied to various human-related things with no clear bounds
is there even really such thing as "unnatural"?

The absolute state of Jow Forums

So? We aren't operating in the limits of our universe here. It's math.

>You just need to add three dots at the end.
they're called ellipses (not to be confused with ellipse)

If it had infinite precision 1 != 0.999...
The only reason math takes the form of having rules that make them equal is because physical quantum values are larger than an infinitely small value. Math would be different if the universe was different.

Math doesn't give a shit about our universe at all.
>Math would be different if the universe was different.
Wrong.

Well no shit. You're defining an end to the decimal numbers, which is an improper use of the ... symbol.
Also, there's a 0.08... difference between 1.01... and 1.1, because you're retarded.

But back to actual math, when you have an infinitely repeating decimal, especially 0.9..., there is no way you can define the difference and if you are being sensible no matter what decimal accuracy you are going for it should be rounded appropriately.
Using 1.5 in your calculation will always give a more accurate result than flooring 1.4999... to any decimal place of your choice, by 9/10ths of the next decimal place.

You clearly just reduced the number of 9s to a point where rust would comprehend the difference and then added more 9s without rerunning the application.

Pretty dishonest when anyone can load it up and check it as well.

>If it had infinite precision 1 != 0.999...
That statement is independent of physical reality, it is purely abstract.

>Math would be different if the universe was different.
No, standard mathematics are defined by ZFC, they are completely independent of the physical world.

>Using 1.5 in your calculation will always give a more accurate result than flooring 1.4999...
Not if you make your computations in IEEE 754 artithmetic.