A

A Challenge to RK4

Hacker News

A Challenge to RK4

Why limit yourself to fourth-order integration? Why put up with roundoff errors in your finite differences? Here is a Lorenz ODE solver in 20 lines of dependency-free Python to enlighten you! Find out more about the Taylor Series Method at https://github.com/m4r35n357/ODE-Playground, read the docs and follow the references, marvel at how long this technique has lain undiscovered by the masses. #!/usr/bin/env python3 from sys import argv # Example: ./tsm.py lorenz 10 .01 3000 -15.8 -17.48 35.64 10 28 8 3 model, order, δt, n_steps = argv[1], int(argv[2]), float(argv[3]), int(argv[4]) # integrator controls x0, y0, z0 = float(argv[5]), float(argv[6]), float(argv[7]) # initial values x, y, z = [0.0] * (order + 1), [0.0] * (order + 1), [0.0] * (order + 1) # Taylor coefficient jets σ, ρ, β = float(argv[8]), float(argv[9]), float(argv[10]) / float(argv[11]) # Lorenz parameters print(f'{x0:.9e} {y0:.9e} {z0:.9e} {0.0:.5e}') for step in range(1, n_steps + 1): x[0], y[0], z[0] = x0, y0, z0 # build the coefficient jets for k in range(order): x[k + 1] = σ * (y[k] - x[k]) / (k + 1) y[k + 1] = (ρ * x[k] - sum(x[j] * z[k - j] for j in range(k + 1)) - y[k]) / (k + 1) z[k + 1] = (sum(x[j] * y[k - j] for j in range(k + 1)) - β * z[k]) / (k + 1) x0, y0, z0 = x[-1], y[-1], z[-1] # perform an integration step using Horner's method for i in range(len(x) - 2, -1, -1): x0 = x0 * δt + x[i] y0 = y0 * δt + y[i] z0 = z0 * δt + z[i] print(f'{x0:.9e} {y0:.9e} {z0:.9e} {step * δt:.5e}')

Share card

Actual performance

1points
Did not reach leaderboard

Launch Intel predictions

Analyze your own launch →
TrustMRRLess likely to generate early MRR · Strong signals: para · Missing: mobile apps, ios, personal
46%46% predicted probability of success on TrustMRR, based on ML models trained on real launch data.
best fitHighest predicted score across all platforms for this description.
Product HuntUnlikely to reach the leaderboard · Strong signals: model, using · Missing: mac, agents, macos
38%38% predicted probability of success on Product Hunt, based on ML models trained on real launch data.
AppSumoMay struggle as an AppSumo deal · Strong signals: efficient · Missing: plus, platform, intuitive
31%31% predicted probability of success on AppSumo, based on ML models trained on real launch data.
Hacker NewsMay not resonate with HN audience · Strong signals: 000, io · Missing: https docs, excited, just released
27%27% predicted probability of success on Hacker News, based on ML models trained on real launch data.
nativeThis product was originally launched on this platform.
Indie HackersIH features products with proven revenue · Strong signals: para · Missing: supports, reddit linkedin, podcasting
25%25% predicted probability of success on Indie Hackers, based on ML models trained on real launch data.
Acquire.comPre-revenue stage for this audience · Missing: arr, mrr, revenue
15%15% predicted probability of success on Acquire.com, based on ML models trained on real launch data.
BetaListMay not resonate with beta-testers · Missing: web3, chat, crypto
6%6% predicted probability of success on BetaList, based on ML models trained on real launch data.

Correct prediction on native model

Similar products

A
A Bruteforcer in Go for WarpWallet's 10BTC Challenge35%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

A Bruteforcer in Go for WarpWallet's 10BTC Challenge

Hacker News2
Ho
Holiday Binge Challenge – A WebGL Experiment46%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Holiday Binge Challenge – A WebGL Experiment

Hacker News1
Rh
Rhythm Challenge35%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Rhythm Challenge

Hacker News3
I
I Challenge You to a Regex50%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

I Challenge You to a Regex

Hacker News5
Mi
MindCipher – Challenge yourself35%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

MindCipher – Challenge yourself

Hacker News14
Go
Go for Glory – take the apibunny challenge35%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Go for Glory – take the apibunny challenge

Hacker News10
Te
TelTech Challenge35%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

TelTech Challenge

Hacker News17
CROSSWORD for WORDMASTERS
CROSSWORD for WORDMASTERS33%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Wordpower Challenge

Product Hunt
Habfun
Habfun33%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Challenge yourself

Product Hunt+123Health & Fitness
Cu
Cubes Challenge: Optical Illusion Game35%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Cubes Challenge: Optical Illusion Game

Hacker News5