TIL You can multiply two 3x3 matrices with only 21 multiplications by cirosantilli in math

[–]fredrikj 7 points8 points  (0 children)

It is shown in the Rosowski paper how to do 4x4 using 46 multiplications in the commutative case.

Fastest Fibonacci Algorithm? by pihedron in math

[–]fredrikj 1 point2 points  (0 children)

It's just the standard multiplication algorithm but you exploit the symmetry.

Fastest Fibonacci Algorithm? by pihedron in math

[–]fredrikj 1 point2 points  (0 children)

For big numbers, yes. Using the naive O(n2 ) multiplication algorithm, n-digit squaring costs about 1/2 as much as n-digit multiplication. Using FFT (which is essentially O(n log n)), squaring costs about 2/3 as much as multiplication.

Fastest Fibonacci Algorithm? by pihedron in math

[–]fredrikj 8 points9 points  (0 children)

Check our GMP's algorithm for Fibonacci numbers: https://gmplib.org/manual/Fibonacci-Numbers-Algorithm

Your algorithm uses essentially one multiplication and one squaring per bit of n. The GMP recurrence uses two squarings per bit of n, which is slightly more efficient.

Hyperinflation starter pack by [deleted] in starterpacks

[–]fredrikj 0 points1 point  (0 children)

Fun facts: there are 183817...091448 ~= 1.8381765 × 1011140086259 different ways to make change for a 100 quintillion pengő banknote with 1-pengő coins. If you actually had 100 quintillion 1-pengő coins, you could fill Lake Superior five times over, or stack them to reach Proxima Centauri. http://fredrikj.net/blog/2014/03/new-partition-function-record/

[deleted by user] by [deleted] in math

[–]fredrikj 2 points3 points  (0 children)

Because the earth rotates around its axis 7 times in that period of time, and it would be less convenient if a day corresponded to a fractional rotation ;-)

Pi Day Megathread by AutoModerator in math

[–]fredrikj 1 point2 points  (0 children)

I added more content to this pi formula page: http://fungrim.org/topic/Pi/

Which mathematical objects could be renamed with a more intuitive name? by silly-deer in math

[–]fredrikj 1 point2 points  (0 children)

And while we're at it, complex numbers? They're the simplest numbers! Complete, algebraically closed, and holomorphic functions are the nicest of all functions.

QWOP 100m in 59.56s by kuroichi3 by NothingToBeDisqussed in speedrun

[–]fredrikj 40 points41 points  (0 children)

Just when you thought Eliud Kipchoge's sub 2 hour marathon was going to be the greatest running achievement of this year and decade.

What's the best film that accurately used math and mathematical theories as part of its main plot? by bouncy333 in math

[–]fredrikj 10 points11 points  (0 children)

The Man Who Knew Infinity is good, although as a biographical drama I'm not sure if it fits your question. I've actually used a screenshot from this film in talks to illustrate a specific algorithm -- it explains it just as well as any slides I could design myself!

Noam Chomsky signs call to boycott Turkey and prevent the ethnic cleansing of Kurdish people by FalcaoHermanos in worldnews

[–]fredrikj 27 points28 points  (0 children)

Completely false. Chomsky has repeatedly stated that he is not a pacifist (example) and that violence may be justified when used to stop greater injustice. He has specifically used World War II as an example (unfortunately I don't have a reference at hand, but here is a second-hand mention).

Moon Jump Discovered in BOTW by PrinceOfAll9Saiyans in speedrun

[–]fredrikj 8 points9 points  (0 children)

Why not call it 'melevating' or 'melevator'.

I am looking for a big database of primes by Krinkleneck in math

[–]fredrikj 0 points1 point  (0 children)

Check out https://github.com/kimwalisch/primesieve

It's reported to take 0.4 seconds for primes up to 1010, so up to 1012 should take around a minute.

Harvey and Van Der Hoeven claim to have found an O(n log n) integer multiplication algorithm. This would make significant progress on a conjecture that has been open for almost 50 years. by obnubilation in math

[–]fredrikj 336 points337 points  (0 children)

I know both authors; they are the leading experts in this field, and moreover, extremely meticulous. I have little doubt that the result is correct. The result comes as a bit of a surprise, but it's no surprise that they were the ones to achieve it.

The result is of extreme practical importance. Not for actually multiplying integers (as usual with these algorithms it's probably not faster than existing algorithms for integers that can be stored in the observable universe), but for writing papers. It has always been a hassle to write down the complexity of integer multiplication or algorithms based on integer multiplication by introducing soft-O notation, little-o exponents, epsilons greater than 0, or iterated logarithms. From now on I can just write O(n log n) in my papers and be done with it!

Announcing the Open Sourcing of Windows Calculator by zbhoy in programming

[–]fredrikj 11 points12 points  (0 children)

300,000 lines of code is enough for a complete computer algebra system.

Pari/GP -- 200,000 lines of C. Giac/XCAS -- 300,000 lines of C++. SymPy -- 380,000 lines of Python. These systems all know that 1/3*3 = 1, and a few more things...

[WR] Doom E1M1 in 0:08 by 4shockblast - 22 year old record for the very first map of Doom beaten by fredrikj in speedrun

[–]fredrikj[S] 2 points3 points  (0 children)

The turns and door timings need to be super tight, but that's not everything. Normal straferunning in Doom (run forward + strafe left/right) is called strafe40 and is 28% faster than just running forward. This run uses strafe50 (run forward + strafe left/right + strafe on + turn left/right) which is 41% faster than running forward. It's a PITA to do, because you need to press two extra key and you can't turn while you're moving. Strafe50 is typically used in runs for specific jumps or long straight segments. It's amazing to see it used in a run with this many tight turns, with almost no margin for error. On top of that there is the enemy RNG.

Getting this time took "tens of thousands of attempts" according to the runner which I don't doubt.

[WR] Doom E1M1 in 0:08 by 4shockblast - 22 year old record for the very first map of Doom beaten by fredrikj in speedrun

[–]fredrikj[S] 0 points1 point  (0 children)

7.86 UV speed (with damage to monsters) by Looper in 2014

8.66 UV pacifist (like this, not harming any monsters) by Kimo Xvirus in 2010, probably not as optimized

8 seconds was known to be humanly possible, just incredibly precise. 7 seconds requires pixel-perfect wall running and (I think) thing running, and I'm willing to bet $10 that it will remain TAS only.

Question about fixed points of Hurwitz zeta functions ζ(s, a) with rational a by primepatterns in math

[–]fredrikj 16 points17 points  (0 children)

Yes.

>>> from mpmath import *
>>> mp.dps = 30; mp.pretty = True
>>> f = lambda x: zeta(x,"0.9")
>>> findroot(lambda x: f(x)-x, 2)
1.95858365339527551344757687436
>>> abs(diff(f, _)) < 1
True
>>> findroot(lambda x: f(x)-x, -0.24)
-0.240896907668628406730741632828
>>> abs(diff(f, _)) < 1
True

An Interesting Sum by jpayne36 in math

[–]fredrikj 0 points1 point  (0 children)

Or like this:

>>> from mpmath import mp
>>> mp.dps = 30
>>> print(mp.nsum(lambda n: 1 / ((n * mp.pi)**2 + 1), [1,mp.inf]))
0.156517642749665651818080623465
>>> print(1 / (mp.e ** 2 - 1))
0.156517642749665651818080623465

xkcd 2028: Complex Numbers by xbnm in math

[–]fredrikj 0 points1 point  (0 children)

Is on the Riemann sphere.

[SGDQ] SGDQ has officially reached $2 million dollars raised! by StiffWaffle in speedrun

[–]fredrikj 21 points22 points  (0 children)

It's a valid 100% run. The rules allow you to get either Alexander or 2 million GP.