RIES - Find Algebraic Equations, Given Their Solution
Quick Links
RIES Source Code (build instructions in header comment)
License (GPL 2.0)
Manual:
PDF PostScript
Plain ASCII Source (nroff)
RIES was featured on xkcd on Wed 2012.0425...
which is ((7√π+1/2 × π)2 × π)2
Enter a number that you want to approximate:
Examples: -2.5062 1.855404429 6.022e+23
(Hint: RIES handles "1.2345678" more easily than "1234.5678")
Contents
Overview
Benchmarks
Motivation and History
Algorithm
Source Code
Stupid Math Tricks
"Classical" Approximations
Mystical Pre-Destiny
Four Fours
Secret Code
A Visit by Dr. Matrix
Semiserious Math Tricks
Wild Guessing
Finding Exact Solutions
Forgotten Identities
Enlightened Discovery
Links
See Also
Overview
ries (or RIES, an acronym for RILYBOT Inverse Equation Solver) takes any number and produces a list of equations that approximately solve to that number, like the following example:
bash# ries 2.5063 Your target value: T = 2.5063 www.mrob.com/ries 2 x = 5 for x = T - 0.0063 {49} 8 x = e^3 for x = T + 0.00439212 {66} x^2 = 2 pi for x = T + 0.000328275 {55} x^x = 1+9 for x = T - 0.000115854 {69} (x-1)^2 = tanpi(1/e) for x = T + 0.000108368 {75} x^2+e = 9 for x = T + 3.56063e-05 {63} ln(6) x = sqrt(pi)+e for x = T + 2.73037e-05 {93} x/4+1 = 4,/7 for x = T + 6.24679e-06 {91} ln(sqrt(x)-1) = -(phi/3) for x = T + 1.4647e-06 {97} 1/(1-ln(x)) = (1/e+pi)^2 for x = T - 3.89197e-07 {106} x+e,/4 = 7-sqrt(8) for x = T - 3.26098e-07 {109} x+pi/8 = 8 cospi(phi) for x = T + 3.89451e-08 {111} 1/(2-x)+1 = cospi(7,/phi) for x = T + 6.16902e-09 {116} x+1/e^(1/x) = 5^(e-2) for x = T - 2.25977e-09 {118} x sqrt(phi x) = 2(pi-1/phi) for x = T - 1.71971e-09 {126} (for more results, use the option '-l3') e = base of natural logarithms, 2.71828... cospi(X) = cos(pi * x) ln(x) = natural logarithm or log base e tanpi(X) = tan(pi * x) phi = the golden ratio, (1+sqrt(5))/2 sqrt(x) = square root A,/B = Ath root of B pi = 3.14159... --LHS-- --RHS-- -Total- max complexity: 67 61 128 dead-ends: 2848836 4250702 7099538 CPU time: 0.296 expressions: 228357 318227 546584 distinct: 111700 89860 201560 Memory: 12608KiB Total equations tested: 10037362000 (1.004e+10)Notice the answers are ordered by increasing closeness to the given number. It should also be apparent that the simplest equations tend to come first and the more complex ones later on. ries follows the example of continued fractions as you go to longer equations, you get a closer approximaion to your number, and each approximation is the closest approximation that is available with an equation of that "complexity".
ries is highly customizable. You can have it omit functions and symbols (like the sine and cosine functions, or the symbol for phi, the Golden Ratio) if you don't want it to use them in solutions. You can give it an integer and specify that it limit its search to calculations that come out to be exact integers, and it will figure out the shortest way to construct your number from the digits 1 through 9. If you want easily inverted solutions you can specify that there be only one x on the left-hand side, omitting things like "x-sin(x)". ries can find the simplest way to (for example) express the value 27 using only the digit 4 and the four basic operators plus, minus, times and divide.
ries Profiles
It is common to want to use several ries options together, and to use the same options in many different commands. To facilitate this, ries supports the use of "profiles" specified by the -p option. A profile is a text file containing one or more ries command-line options, with whatever spacing you desire and optional comments delimited by the '#' character. Here is an example:
# old.ries Profile for all the old RIES behaviour --trig-argument-scale 1 # Radians -NT # old RIES had no tangent function -l1 # The default searchlevel was -l1 --significance-loss-margin 15 # There were no sig-loss checksIf this file is in the current directory, a ries command with the option -pold.ries (or --include old.ries) will produce pretty much the same results as ries did prior to 2012.
. . . Forward to page 2 . . . Last page (page 4)
Contents: ries overview Benchmarks History Stupid Math Tricks Semiserious Math Tricks Links and miscellaneous
Robert Munafo's home pages on HostMDS © 1996-2012 Robert P. Munafo. about contact
Google+
mrob27
@mrob_27
This work is licensed under a Creative Commons
Attribution-NonCommercial 2.5 License. Details here
s.13