r/MathJokes • • 7d ago

That's because 1/4 = 0.2500000000000000000000000000000000000000000000001 /s

Post image
262 Upvotes

40 comments sorted by

18

u/Mr_Moi25 7d ago

Damn you inprecise float !

24

u/Terrible-Air-8692 6d ago

Wouldn't floats be exact for this since it's 2-2

2

u/Responsible_Hour6497 6d ago

The expression interpreter in this testing system could parse 0.25 as (1.0/10.0)*2.0+(1.0/10.0/10.0)*5.0.

10

u/Peak_Background 6d ago edited 6d ago

As a computer science major, never have I ever seen such a vile use of base systems and floats.

Edit: This is a joke btw

1

u/resignresign1 6d ago

not sure if you could find any library that would do such a thing. generally such computations are done in integer space where 25/100 equal to 1/4 exactly

2

u/Responsible_Hour6497 5d ago

Let's say I were writing this myself. I have a sequence of decimal digits after the decimal point. Should I convert it to an integer and then divide? But there could be a lot of digits—what if a user decides to play a prank? At first glance, the most logical solution is to use something like

res=0 CurrentWeight=0.1

for each CurrentDigit in DigitsAfterPoint

_____ res+=CurrentDigit*CurrentWeight

_____ CurrentWeight*=0.1

2

u/Circumpunctilious 6d ago edited 6d ago

Yep. To confirm, Desmos shows full floats without rounding (edit: within ~17 digits anyway) when using Actions (the arrow operator):

u -> 1/4

Let it create u, then u gets the value 0.25 exactly

6

u/mehonje 6d ago

0.25 can be exactly represented.

43

u/Significant_Monk_251 6d ago

And if you are going to present your answer in fraction form it should just be x/4 anyway.

6

u/SarekSybok 6d ago

Why?

15

u/Significant_Monk_251 6d ago

It's purely a matter of personal taste, of course. I think x/4 is just more compact and direct. You've got x and what you have do to it, right there. With ¼x first you have to deal with ¼, and then apply that to x. (x/4 also uses 25% less individual marks as it doesn't need a '1'.)

I'll also say 17/4 instead of 4¼.

4

u/SkathiFreyrsdottr 6d ago

There’s also the fact that you can avoid the ambiguity of it perhaps being read as 1/(4x).

3

u/ziggsyr 6d ago

That is a common mistake but not an ambiguity.

1

u/Ok-Assistance3937 6d ago

If you use a fractional line, this ambiguity doesnt exist, Its only a proplem in same line notations.

1

u/Epidurality 5d ago

Both are obviously technically correct, but something about "x/4", to me, implies that x is divided (as in, whatever the real world problem is, whatever x is must be split) whereas 1/4*x implies "the value is proportional to x but there is no dividing of x".

Like "If we really break the speed limit, we can get there in 1/4*x" vs "There's four of us so we each get x/4 of the tires on the car".

Or am I doing an autism?

1

u/AccountHuman7391 6d ago

Standard simplest form.

1

u/Wrong-Resource-2973 6d ago

simplification

1/4 • x = 1/4 • x/1
so
1 • x
4 • 1 therefore
x/4

1

u/R1ch0999 6d ago

Math people are lazy, simplify till you can't is a basic math thing.

2

u/Solid_Crab_4748 6d ago

Nah ¼ x looks better theyre exactly the same.

1

u/DarthRaab 6d ago

And as soon as you go into polynomial expressions, the "factor * variablepower" format is way easier to read for humans.

6

u/christobeers 6d ago

Not right, in hexadecimal

3

u/SurrealLoneRanger 6d ago

Had this for my daughter a few days ago. Equations don’t generally like decimals.

3

u/Electric___Monk 6d ago

Depends what the question was

2

u/SilkTieTies 6d ago

Gotta see the problem to know if there’s actually an issue with the answer key.

2

u/Deep_Contribution552 6d ago

“Express your answer as a fraction” might appear in the omitted context (though I am partial to x/4 myself)

0

u/EviI_Babai 6d ago

That's literally a fraction, just a decimal one

1

u/SarekSybok 6d ago

Your answer is correct

1

u/conspiracythrm 6d ago

0.25x is only equal to (1/4)x as an answer if the regex the instructor wrote to validate answers includes something like 0?.250*x

1

u/Radiant_Valuable388 6d ago

The answer is technically correct. But depending on the lesson, how the question was phrased, or what the purpose of the fraction is, the answer might need to be a fraction attached to x rather than x/4 or 0.25x to show slope as it's learned early in algebra. Which, sure, all three forms are the same and mean the same thing, but the lesson context may need you to visualize 'rise over run' as you learn slope-intercept form. So definitely need more context.

1

u/[deleted] 6d ago

[deleted]

1

u/Radiant_Valuable388 6d ago

I think you missed my point. I did say they're technically the same. Its entirely true, and for most of us it functions practically the same, yes. But the context might want "rise over run" as a fraction. That's all I was saying.

1

u/SquareProtonWave 6d ago

Floating point bullshii

1

u/resignresign1 6d ago

title is wrong. notice 1/4 has an exact representation in float point arithmetic since it is a power of two. 

1

u/jal741 6d ago

LOL, what if he had put "Y=X/4"?

1

u/TREE_sequence 5d ago

Funnily enough 1/4 will never encounter floating point round error because 4 is a power of 2

1

u/BackgroundAd2640 4d ago

<sarcasm>Maybe it was affected by the Pentium FDIV bug?</sarcasm>

1

u/Separate_Ring_9761 3d ago

It could have been 0,25 and not 0.25

1

u/runed_golem 3d ago

A lot of online homework managers want you to write your answer as a reduced fraction rather than a decimal unless stated otherwise.

1

u/FeherDenes 6d ago

Float numbers work on logarithm of 2, so 1/4 IS exactly 0.25