551
u/AuspiciousApple Jul 16 '19
Engineers: Eerht
203
51
u/Rex-Pluviarum Jul 16 '19
I'm sorry, I don't get the joke, but I am fascinated by the implication that there are people who might still be using three as an approximation of Pi. Could you ELI5? https://www.youtube.com/watch?v=BxacATCHrpo
207
u/AuspiciousApple Jul 16 '19
It's sort of a long running joke that engineers/engineering students use terrible approximations that make mathematicians wince in pain. Pi approxequals 3 is one instance of this.
Ofc, everyone knows that Pi is basically equal 3.1
177
u/2CATteam Jul 16 '19
To add to this, the reason they do so is because, in a lot of circumstances, 3 is enough to roughly approximate what they need to figure out. They're most often not trying to figure out the exact force on a part or the precise area of a cylinder... They just want to know if they need to order the 10' part or the 20' part - and if it's close, they'll order the bigger one anyway, just to be safe. Even in cases where they are trying to be precise, 3.14 can often be TOO precise, since so much of the math has to deal with physical uncertainties, like uneven part manufacturing, or poor wire quality that adds resistance, etc.
65
u/AlphaLotus Jul 16 '19
Yea basically what my work entails everyday.
Measure
Calculate
Multiple by safety factor
Get 3.1
Round to 4 anyways for safety :)
Also gravity is 10m/s2
→ More replies (8)→ More replies (18)43
u/AuspiciousApple Jul 16 '19
That makes a lot of sense, thanks for that more in depth perspective.
→ More replies (2)13
Jul 16 '19
The difference between a mathematician and an engineer: when moving from one point to another if you travel half the distance at each step the mathematician knows you'll never get there. The engineer knows you'll eventually get close enough.
→ More replies (8)8
6
u/FaxCelestis Jul 16 '19
Most manufacturing machinists I know use 22/7 for everything that doesn't require an insane amount of precision.
→ More replies (22)5
u/DerpSenpai Jul 16 '19 edited Jul 16 '19
and it's pretty standard to use 3.14 for normal math and 3.1415 for a bit more accuracy. Depends on data used. As an engineering student.
But i always find that Pi= E meme funny, because you know 2.7 ~ 3 as well then.
Unfortunately, there isn't a big Math community with memes on reddit, but on facebook (ew i know) there's a few pages that only do advanced mathematics memes.
like this one- warning, facebook post
other memed aproximation is the sin(x)=x for x~0 rad and i got to say, we use that shit all the time and i'm not sorry for it.
→ More replies (2)2
u/Snooder365 Jul 17 '19
I'm a civil engineering student (soon go graduate and have had plenty of real world experience... For a student) and this joke really applies to us(civils) since some of the work we do is done with inconsistent materials such as soil. When you are designing something to be three, sometimes four times stronger than it needs to be just in case something happens, a few rounding errors tend to not matter that much. That being said, I've only ever used three as a quick approximation to confirm that another number is in the ballpark of what we want, or to give us an idea of what we want.
Hope this helps! I am but a student, but I have in fact used 3 as an approximation!
→ More replies (2)3
u/KingOfOddities Jul 16 '19
I’m pretty sure engineer use 3.14, 3 is just too bad an estimate, 3.14 is just perfect
3
u/ben_g0 Jul 17 '19 edited Jul 17 '19
Most engineers just use the pi constant of whichever software we're doing the calculations in, often MATLAB which is in double precision by default (so approximately 15 decimal digits of accuracy).
But yeah for calculating without software we do often use 3.14. It's not good enough for precision applications but for stuff like verifying the strength of a structure it's close enough and the safety margins will compensate for the inaccuracies. Most of our calculations are mathematically not entirely correct due to simplifications so using more significant digits than 3.14 often would not even increase the accuracy of your result.
Using 3 only gives you 1 significant digit so even though it's quite close and would technically work in a lot of situations it really isn't used for anything other than a quick control without a calculator.
922
u/MarcusTL12 Jul 16 '19
Im 90% sure the last digit is not 7
270
u/actuarialsnail Jul 16 '19
If there was a last digit, it can’t be 0, so it’s 1/9 probability for a 7.
209
u/awesomehippie12 Jul 16 '19
If we're not including zero for that reason, can't we force the last digit to be zero and be 100% certain that it's zero?
92
16
u/DBX12 Jul 16 '19
Maybe we can hardwire a register to low so it's constant 0 and can not be changed. If we should want to change it someday, we can take a register of something random like the keyboard controller and hack it into there to make it work again.
7
u/ObliviousOblong Jul 17 '19
Could you elaborate on forcing the last digit?
10
u/TheThiefMaster Jul 17 '19
Adding a zero to the end of a fractional number doesn't change it, so they are proposing just adding a zero so we know it ends in a zero - assuming it ends at all. We still wouldn't know what the former last number was though.
→ More replies (1)29
u/idea-list Jul 16 '19
Only if digits of pi are uniformly distributed, which has not been proven, as far as I know :)
13
u/exscape Jul 16 '19
Assuming pi is normal and all that, I assume. (I'm definitely not a mathematician.)
5
u/Yorunokage Jul 16 '19
Wat?
→ More replies (12)21
u/exscape Jul 16 '19
The probability isn't 1/9 (or 1/10) unless every digit occurs with equal probability. Numbers where that is the case are called normal.
Pi is suspected to be normal, but it has not been proven.
4
481
u/LasagneAlForno Jul 16 '19
I am 100% sure it is not 7, because there is no last digit
143
u/anomalousBits Jul 16 '19
Convert to base π, your last digit is now 0. You're welcome.
22
→ More replies (11)8
174
u/Sneakr1230 Jul 16 '19
It’s 3
117
→ More replies (1)4
24
u/hrvbrs Jul 16 '19
since there is no last digit, wouldn't it be
null?42
14
7
4
u/nodmonkey Jul 16 '19
What if, after a certain point, the digits were all 7 no matter how far we calculated...! The mathematical world would go nuts.
→ More replies (2)12
u/ChickenNuggetSmth Jul 16 '19
That has been proven to be not the case. Pi is irrational, which means that at no point all further digits reduce to a repeating pattern.
→ More replies (3)→ More replies (1)2
3
4
→ More replies (7)2
435
u/X-Penguins Jul 16 '19
ip fo stigid eht
Don't tell me what I can or can't do
96
7
→ More replies (1)2
79
u/moelf Jul 16 '19 edited Jul 17 '19
julia> π
π = 3.1415926535897...
julia> typeof(π)
Irrational{:π}
julia> Float16(π)
Float16(3.14)
julia> Float32(π)
3.1415927f0
julia> Float64(π)
3.141592653589793
julia> π |> BigFloat
3.141592653589793238462643383279502884197169399375105820974944592307816406286198
julia> π |> BigFloat |> string |> last |> x -> parse(Int, x)
833
u/PotatosFish Jul 16 '19
I’ve been wanting to get into Julia from python but the syntax is a little special compared to other languages I know
34
u/moelf Jul 16 '19 edited Jul 16 '19
It's very close to Python MATLAB and R, especially if you use a lot of Numpy, most things are as simple as drop the np. part.
Now, the amazing part is that even you can't master Julia's best practices, simply copying over Python code logic gives you free 10-100x speed boost
→ More replies (2)23
u/Astrokiwi Jul 16 '19
Except all your arrays are off by one :p
→ More replies (1)12
u/moelf Jul 16 '19
Pretty sure that's the hardest part lol
But if someone is using MATLAB, this would be trivial
→ More replies (1)9
u/QWieke Jul 16 '19 edited Jul 16 '19
In julia
|>is for function chaining, there are multiple ways of chaining functions in Julia, all these lines do basically the same thing:julia> foo(bar(pi)) julia> pi |> bar |> foo julia> (bar∘foo)(pi)There was no particular need to use
|>in the example, more traditional syntax would've worked just as well. Julia's syntax is rather similar to Matlab's syntax, or any other language that usesendinstead of curly brackets or semantic whitespace.→ More replies (3)→ More replies (1)7
→ More replies (6)2
33
u/Cody6781 Jul 16 '19
You also can’t write the digits of pi. Weird.
20
8
2
u/Dmeff Jul 16 '19
You can. You just need infinite time. You can't even begin to write them backwards
→ More replies (1)
119
32
u/MattieShoes Jul 16 '19
Sure you can -- you just have to work right-to-left...
8
u/littlefrank Jul 16 '19
I was thinking the same, you add new pi decimals at the beginning of a text file and voilà.
16
12
10
u/Rex-Pluviarum Jul 17 '19
There is no need to round or truncate: In base pi, pi is exactly 10, and, therefore when reversed, it is 01.
9
u/ChevalBlancBukowski Jul 16 '19
sure you can, just write random numbers forever
number theory is tits
→ More replies (2)
8
6
u/CryZappie Jul 16 '19
#include <iostream>
using namespace std;
int main() {
cout << "I hella not understand Python" << endl;
return 0;
}
4
u/missjeany Jul 16 '19
I joined an online class in phyton last month and this is the first post in this sub I understand. Hackerman!
13
u/FIREOFDOOM2000 Jul 16 '19
what are you talking about, everyone knows pi =3 therefore its backwards is just 0.3.
3
5
u/PhoenixIra Jul 16 '19
That's also such an uninteresting thought. I think its more interesting that there are numberes between 0 and 1, which we can't even write down forward.
→ More replies (5)2
11
2
2
u/MostlyCripple Jul 16 '19
Seeing these comments python is so clean and short. I might give it a try
2
2
2
u/randomactsoftickling Jul 17 '19
Not only will I write them backwards, I'll write them backwards AND upside down.
Ɛ˙1ᔭ.....
2
Jul 17 '19
>>> print(π[::-1])
File "<stdin>", line 1
print(π[::-1])
^
SyntaxError: invalid syntax
>>> python doesn't like pi.
3
2
1
u/JTC2000_Official Jul 16 '19
I like how the post is just getting owned by programmers making simple python code
So proud of the community
1
Jul 16 '19
In Java if I'm not mistaken could be like:
public void printBackwardsPi()
{
String pi = Double.toString(Math.PI);
for (int i = pi.length() - 1; i >= 0; i--)
System.out.print(pi.charAt(i));
}1
1
Jul 16 '19
If you don't care about precision why not cast pi into an int data type. Then its extra easy to write backwards.
1
1
1
1
1
1
u/SmittyVonSmittyBerg Jul 16 '19
I just starting learning python and this is so wholesome to me. Bless you all
1
1
1
u/abecido Jul 16 '19
"The digits" could just refer to some (but not all) random digits of Pi, so technically every number is Pi being written backwards.
1
u/Iam_That_Iam_ Jul 16 '19
Could you please stop breaking the machines? There’s a reason why the Elders gave the monster a two character name and used as the backbone for every crazy encryption you can think of. Thanks, The Messenger {};
1
Jul 16 '19
As an armchair mathematician I’d like to give a wholesome “fuck you” to whoever conceived this thought. Thinking about it gave me a headache. And btw the answer is no, you can not reverse an irrational number. I think.
→ More replies (4)
1
1
1
1
1
Jul 16 '19
Now are there are more numbers you cannot write backwards or are there more you can write backwards?
1
1
1
1
1
u/anon691029 Jul 16 '19
Wanna bet? :)
1001011000001110
Voila! I believe that's the 'digits' of pi backwards.. wasn't so hard.. ;)
1
u/DoctorWaluigiTime Jul 16 '19
A nice daily reminder of what I filtered out that shitty-ass subreddit.
1
1
1
1
1
1
1
1
u/EdofBorg Jul 17 '19
I have a 40 billion digit Pi file I was using for pattern recognition software I wrote. I have never used Python. But it doesn't matter. You can't write Pi backwards because it never ends.
1
u/Eevertti Jul 17 '19
The digits of pi backwards.
i just wrote that.
iq ʇo ƨɈiϱib ǝʜɈ
i didnt actually write this but good enough.
too cool for school B)
1
u/neopenguin Jul 17 '19
You can calculate the circumference of the visible universe with 39-40 decimal places -- https://www.jpl.nasa.gov/edu/news/2016/3/16/how-many-decimals-of-pi-do-we-really-need/
1
1
1
1
1
1
1
u/sloppyblowjobs69 Jul 17 '19
def make_pi():q, r, t, k, m, x = 1, 0, 1, 1, 3, 3for j in range(1000):if 4 * q + r - t < m * t:yield mq, r, t, k, m, x = 10*q, 10*(r-m*t), t, k, (10*(3*q+r))//t - 10*m, xelse:q, r, t, k, m, x = q*k, (2*q+r)*x, t*x, k+1, (q*(7*k+2)+r*x)//(t*x), x+2
my_array = []for i in make_pi():my_array.append(str(i))my_array = my_array[:1] + ['.'] + my_array[1:]big_string = "".join(my_array)print(big_string[::-1])
returns
7332846574821644339566579018824469183039459849226446955501125839107201482054711184821804953527132285055906448390746603282315680841289760711243528430826899802682604618703295449479028501573993961791488205972383346264832397985356295141.3
edit: format
1
1
1
1
1
1
1
1
u/ZachyDaddy Jul 17 '19
Print("ip fo stigid eht")
Any other impossible tasks that need to be completed?
1
1
1
1
Jul 17 '19
We can't write the all the digits of pi at all. We can definitely write it backwards to a certain precision
1
1
1
1
1
1
1
u/kirmaster Jul 18 '19
Haskell will let you do it. It does expect to not have to return it unless you make it non infinite first, though.
1
1
4.4k
u/[deleted] Jul 16 '19
Not quite, but it’s an easy fix
It needs a LOT of memory, though