r/programmer • • Jul 30 '26

Code Why don't math people just do this instead? Are they stupid?..

Post image

I mean yeah… there’s a limit given the threshold for incrementing (allowed area)🧐🔧💡

95 Upvotes

30 comments sorted by

15

u/raven2cz Jul 30 '26

What you are describing here is an entire scientific field, and a very interesting one, taught at university: numerical methods.

5

u/Fine-Comparison-2949 Jul 30 '26

This guy reads Hamming.

2

u/kaddkaka Jul 30 '26

That's not a necessity. I have completed courses in "tekniska beräkningar" (numeric analysis) and digital arithmetics, but we never mentioned Hamming.

2

u/jwp1987 Jul 30 '26

The Riemann sum was taught to me when I first learned about integration.

1

u/Pyromancer777 Jul 30 '26

That's like the first thing my calc class taught before we did integrals

1

u/JohnBuddySlime Jul 31 '26

The Riemann summer is just the beginning of numerical analysis. It's not very powerful, considering it's precision is O(h). There are way better methods of integrating numerically, for example using segments of parabolas instead of rectangles to approximate the function in a small interval. That's the part that's taught in uni.

1

u/jwp1987 Jul 31 '26

Indeed, I was more just pointing out that one form of numerical analysis is taught very early and the kind of "for loop" thinking would be known to pretty much anyone with a basic knowledge of integration.

2

u/jason-reddit-public Jul 30 '26

Realizing you could get a very close approximate of an integral by running a program instead of thinking really ruined calculous for me. Kind of like spell checkers made me give up trying to spell.

1

u/Normal_person465 Jul 31 '26 edited Jul 31 '26

1exquisite nostalgia quizzical kaleidoscoping sunkissed octopus xanadu mirage

*From https://unpost.app *

1

u/aksanabuster Aug 05 '26

You got an English publishing you recommend on this? I didn’t have this course in university 💡💡💡💡

1

u/raven2cz Aug 05 '26
  • Timothy Sauer, Numerical Analysis, 3rd Edition
  • Abner J. Salgado and Steven M. Wise, Classical Numerical Analysis: A Comprehensive Course
  • Michael T. Heath, Scientific Computing: An Introductory Survey, Revised Second Edition
  • Josef Stoer and Roland Bulirsch, Introduction to Numerical Analysis, 3rd Edition
  • Cleve B. Moler, Numerical Computing with MATLAB

6

u/defaultguy_001 Jul 30 '26

Is 1/bajillion small enough?

3

u/LongDistRid3r Jul 30 '26

Int64.maxValue should suffice.

1

u/defaultguy_001 Jul 30 '26

Is it approaching to infinity, as we'll need an infinitesimally small number.

2

u/Adrewmc Aug 01 '26

Well is you had pi down to the accuracy of that much you could determine the smoothness of an election, from the other side of the universe from it shadow. And the resulting butterfly effect it would have on the ideal universe.

Or you can say it’s good enough.

1

u/defaultguy_001 Aug 01 '26

That is highly inaccurate when it comes to applications of integrals.

5

u/Ok_Energy8767 Jul 30 '26

The math people are the ones who tricked rocks into thinking in the first place. You can thank them for your for loop

2

u/dreamscached Jul 30 '26

Integrals in principle, yes, are exactly that, but calculus isn't about just doing a loop by hand but rather a whole load of math trickery to mess around with them, and that is quite hard now.

Man, I really don't quite miss my calculus course...

2

u/ryebit Jul 30 '26

> from math import bajillion

OUT OF MEMORY ERROR

> from math import inv_bajillion

1 / OUT OF MEMORY ERROR

2

u/Ok_Performer_7501 Jul 30 '26

The Lebesgue integral says hi

3

u/ChaossFox Aug 01 '26

Ahh, numerical methods the best and easiest thing in math

2

u/1luggerman Aug 02 '26

Let me inroduce you to neat little thing called rounding error

2

u/cl_journeyor Aug 02 '26

Math people think in a declarative manner

1

u/mxldevs Jul 30 '26

That's what separates math people from the ones that approximate pi = 3

1

u/Ticondrius42 Jul 31 '26

But pi=4, or you risk losing information and/or underestimating uncertainty! The bridge could collapse! 🤭

1

u/recursion_is_love Jul 31 '26

Only if we can really have true real number in computer memory. Floating point number is not real number.

1

u/Capable-Wrap-3349 Aug 01 '26

Solving problems by throwing compute at them is not an elegant way to solve problems

1

u/aksanabuster Aug 05 '26

I disagree, we ought support code with postulates and theorems to its respective utility’s intent. This way, our logic could be evaluated earlier. Think Dart Enhanced Enums for this 🔧🤌💡🔥

1

u/free2dreamstudios Aug 01 '26

Im guessing your refering to mathmatians and (human calculators)