RIES Change History
This page lists changes I've made to the RIES program, which searches for equations given their solution. It's a great tool for solving puzzles like "What's so special about 2.131?" or "How do I make 11 out of a 2 and two 3's?"
The Short List
(For details on all of the new options, see the manual, which is linked near the top of the main RIES page.)
Add a few rules to make RIES avoid redundant forms (such as ef(x) using the two-argument ^ operator rather than the one-argument ex function). This makes deep (level-4 or higher) searches a little more efficient and eliminates some roundoff tautologies, including the dreaded "ex2-ex2 = 1/49"
If you use a restricted class option, like -a, and a subsequentargument enables an operator or function that had been disabled by the class restriction, that operator won't be used unless you also relax the class using --any-subexpressions. However you can still re-enablea constant, so for example -a -Ep produces algebraic-like answersthat can also involve π.
Switch the license from GPLv2 to GPLv3.
Make -i (integer subexpressions) option more efficient. All classrestrictions (like -a, -l, etc.) now also exclude W.
Add the Lambert W function, with symbol 'W', available if you compile with the RIES_USE_SA_M64 compile-time option, which requires the extrasource file "msal_math64.c".
Add RIES_WANT_LDBL compile-time option.
Try to make the Visual Studio C++ instructions more complete and accurate. (These are in a block comment in ries-for-windows.c)
Add --max-equate-value and --min-equate-value options.
Add a little to the brief help (given by the --help or -h option).
2014 Jan-Aug and 2013 Sep-Dec
(There were no changes during this period)
For Windows users, there is now a special source file, ries-for-windows.c, that you can use to build the RIES command-line tool for use within the console (DOS command prompt) in MS Windows. Read the source code's header comments for instructions.
RIES now contains its own formatting routine ('ries_spfg', replacing 'snprintf' with a '%g' format specifier) to convert floating-point values to strings for output.
On the PowerPC architecture using the GCC compiler (version 4.0.1 or later), the 'long double' data type gives 32 decimal digits of precision. Some initialization and result-reporting code was changed to work properly with this 'double-double' precision. Only 31 digits are printed, to account for common roundoff error.
Disallow calculations that make the derivative overflow; this prevents bogus 'solutions' that happened with a very small target value (for example, ries 1.0e-319 formerly gave the answer '1/sqrt(x) =4').
Exit with an error if the target value is zero (formerly ries would run forever and generate no output).
RIES will now use the 'long double' data type for its calculations, if it is compiled with the option -DRIES_VAL_LDBL (defining the #ifdefswitch 'RIES_VAL_LDBL'). On Intel processors using most compilers thisprovides about 3 extra digits of precision (18 "usable" decimal digits rather than 15).
There is still a problem with RIES_VAL_LDBL in MinGW using theMicrosoft runtime library; the sscanf function does not handle long doubles so ries cannot be compiled. This will be fixed in the future.
Rename boolean data type to 'b001' to avoid conflict with apredefined 'boolean' type (that is included in many compilers and libraries).
Allow proportional --min-match-distance argument (specified bygiving a negative value).
You can now define a symbol to its normal name (important in the postfix formats -F, -F0 and -F3), e.g. "--symbol-names ':^:^'" inthe sample profile dc.ries
New option --no-slow-messages, which suppresses the "Stillsearching..." messages that you would see if you run a search with very restrictive options. For example, the command "ries -s 2.50618423523463 --max-match-distance 1e-12 -l6" typically takes more than 30 seconds to find its first answer.
For very small targets, ries now auto-sets the k_min_best_match and k_vanished_dx variables; this enables it to find answers that previously it could not. Example: "ries -l5 2.30557392e-30" now gives answers, where formerly it found nothing.
The online RIES queries in English and French now allow users to issue queries with the Liouvillian, Chow closed-form, Algebraic, Constructible, and Rational restrictions (in addition to the already extant options for Integer and unrestricted searches). For more information on each of these, begin at this table.
(There were no changes in April or May)
New option "-l" (or --liouvillian-subexpressions) to restrict riesto only give equations whose roots are Liouvillian.
There is now a rather full complement of easy options to limit answers to well-known classes (-i, -r, -c, -a, -Ox and-l). See this section for more details on each ofthese options.
With the syntax ":.:." you can define a character to stand in forblank space when changing symbol names. This is used in (for example) the Latin profile to set the name of square root to "radix quadrata".
New option "-a" (or --algebraic-subexpressions) makes ries limitits answers to algebraic numbers (those that are a root of a polynomial with rational coefficients).
New options --rational-exponents and --rational-trig-args (mainlyto support -a). --rational-trig-args also sets--trig-argument-scale to π.
New options --any-exponents and --any-trig-args to cancel thesetting of --rational-exponents or --rational-trig-args.
New option --max-matches (or -n) to control how many results are given(useful with --no-refinement)
New option "--no-refinement" tells ries to print any answer it finds,regardless of whether it is a closer approximation than the previous answer.
New option "-c" (or --constructible-subexpressions) tells ries tolimit its answers to constructible numbers.
New option "-r" (or --rational-subexpressions) tells ries tolimit its answers to rational numbers.
New --symbol-names option allows you to redefine the strings used toprint each part of an equation. Two example ries profiles show how to use this option to format ries output for Mathematica and in Latin:
New option --no-solve-for-x turns off the --try-solve-for-x option(mainly useful if you have --try-solve-for-x in your .ries_profileand want to see output in the normal ries "equation format" instead).
The -i option is now implemented by an entirely different method(using attribute tags, to provide for upcoming changes). Results should not be affected.
A new option "--absolute-roots" is a synonym for the existing"-x"; and a new option "--relative-roots" cancels it.
Added default settings file (profile):
RIES now looks in your home directory for a file called .ries_profileor ries_profile.txt and if found, automatically reads it as if it weregiven with the --include option at the beginning of the RIES parameterlist. Thus (for example) if ries_profile.txt contains a single line"--try-solve-for-x", every RIES command you run will behave as if you gave that option.
If you give the option "-p" at the beginning of your RIES arguments, RIES will not use the .ries_profile settings.
If you give the option "-p" anywhere else in your RIES arguments, RIES will load the .ries_profile settings at that point. This allows you to insert options before your default (profile) options with a command like "ries -p -option1 -option2 -p -option3". The first "-p" makes it skip the profile, and the second "-p" makes it read the profile at that point.
("-p" with a name, like "-pfilename", is still a synonym for "--include filename".)
Windows Users: your "home directory" is probably something like C:\Users\yourname
The -N, -O and -S options now pre-empt each other in whateverorder they are given. A new option -E can be used to enable symbolsthat were previously disabled with -S or -N. (This is mainly to makeit easier to combine multiple --include settings files).
The option ''-'' (a single dash) can be used to end a list ofparameters to an option like --symbol-weights.
New option --min-match-distance 0 will cause RIES to exit if andwhen it finds an "exact" match.
If an "exact" match is reported, RIES now prints a warning that it may be a result of roundoff error and not actual mathematical truth (unless the -i option was used).
I have added the optional self-contained math functions code needed for the RIES_USE_SA_M64 flag to be useful. It ishere.
This math functions library includes a Lambert W function implementation, which is not yet used by RIES.
Add --symbol-weights option, and -S to display a list of allsymbols and their current weights. Adjusting the weights lets you fine-tune how often (or seldom) RIES uses the various functions, operators, digits and constants.
Add --explicit-multiply option. This makes it always use the '*'symbol when printing results: For example, "ries 6.3 -s --explicit-multiply" will give "x=2*pi" as an answer rather than "x=2 pi".
Improvements to --canon-reduction: it now simplifies a few commonforms such as "exprA/2 = exprB/2" before printing.
Several changes to debug flags; make some degug info more useful. (For details, see the -D option in the manual, several versions ofwhich are linked from here near the top of the page).
Add --try-solve-for-x (or -s) option. This makes it rebalance allsolutions to put a single 'x' on the left-hand-side before printing. RIES still makes no effort to solve equations that contain more than one 'x' (if this matters add the -Ox option to prevent anysolutions involving more than one 'x').
If you need to solve problems with a limited set of symbols, you'll still have more control with --one-sided, because--try-solve-for-x will use the quota of symbols on both sides of theequation, then when it solves for x things change (like an x2 will turn into a square root) which may not be what you want.
Several changes to the handling of large target values and the automatic defaults for the --derivative-margin option. This mattersfor commands like "ries 12345678".
Add the --match-all-digits option, which makes RIES only reportanswers that match all the digits you give. For example, "ries 2.5061 --match-all-digits" gives the "xx=1+9" solution first, skipping less accurate solutions like "2x=5".
Add --one-sided option; --numeric-anagram now sets --one-sidedby default.
The --one-sided option makes RIES only generate equations of theform "x=expression", with no x's on the right side. This makes it a lot slower, but it's the best way to answer questions like "How can I make 17 from four 4's?"
Add --numeric-anagram option. With this option, RIES finds solutionsusing at most a certain number of each of the digit and constant symbols. Compare "ries 27" to "ries 27 --numeric-anagram 123".
Implemented the Online RIES Server, which allows people to do simple RIES searches in a web browser.
The Long List
For a more detailed list, you can look at the source code, starting at the words "REVISION HISTORY" which is about 15% of the way through the file.
This page was written in the "embarrassingly readable" markup language RHTF, and was last updated on 2020 Mar 26. s.11