每个条目的 n 是它离最近整数的距离取负对数,即小数点后连续 0 或 9 的位数;complexity 是 RIES 符号权重之和;surplus 大于 0 表示这个巧合比同等复杂度下随机可期的更罕见。
For each entry, n is the negative log of its distance to the nearest integer, i.e. the run of 0s or 9s after the decimal point; complexity is the sum of RIES symbol weights; a surplus above 0 means the coincidence is rarer than chance would produce at that complexity.
| 名次Rank | 表达式Expression | 数值Value | n | 复杂度Complexity | surplus |
|---|
数值列中高亮的是小数点后连续的 0 或 9;n 是它的连续量版本。surplus 一栏的小条以 0 为中心,向右为正(深青)、向左为负(灰)。左侧带竖线的行 surplus 为正。名次旁的角标指向下方注释。
In the value column the highlighted digits are the run of 0s or 9s after the decimal point; n is its continuous version. The small bar in the surplus column is centred on 0, extending right for positive (teal) and left for negative (grey). Rows with a vertical rule on the left have positive surplus. Superscripts next to the rank point to the notes below.
定义
质量函数
对一个 almost integer $x$,定义
$$\text{surplus}(x) = n(x) - \frac{\text{complexity}(x)}{10},\qquad n(x) = -\log_{10}\left|x - \operatorname{nint}(x)\right|$$
$n$ 用绝对误差计算,是小数点后连续 0 或 9 位数的连续量版本:$e^{\pi\sqrt{163}}$ 与最近整数相差 $7.5\times10^{-13}$,$n = 12.12$。不采用相对精度,因为一个数的整数部分有多少位与巧合无关:给定量级后,随机实数的小数部分是均匀分布的,落在整数 $\varepsilon$ 邻域内的概率就是 $2\varepsilon$。
复杂度:RIES 的符号权重
complexity 借用 Robert Munafo 的 RIES 中的 complexity() 函数。表达式写成后缀形式,复杂度是每个符号权重之和,权重 = 基数 10 + 符号的个别权重。基数保证每个符号权重为正,搜索才能按复杂度递增终止;它同时让 complexity/10 近似于描述整个表达式所需的十进制位数。
| 类别 | 符号 | 权重 |
|---|---|---|
| 常数 | 1, 2, 3, 4, 5, 6, 7, 8, 9 | 10, 13, 15, 16, 17, 18, 18, 19, 19 |
| 常数 | $\pi$, $e$, $\phi$ | 14, 16, 18 |
| 一元 | 取负, 倒数 | 7 |
| 一元 | 平方, 开方 | 9 |
| 一元 | $\ln$, $\exp$, $\sin$, $\cos$ | 13 |
| 一元 | $\tan$, Lambert $W$ | 16, 15 |
| 二元 | $+$, $\times$ | 4 |
| 二元 | $-$, $\div$ | 5 |
| 二元 | 幂 | 6 |
| 二元 | $n$ 次方根, $\log_b$, $\operatorname{atan2}$ | 7, 9, 9 |
RIES 只有一位数字,10 要写成 2 5 *。ries.c 的注释说常数权重约为 $10\log_{10}x$,本站据此外推:整数 $N \ge 10$ 的权重取 $10 + \operatorname{round}(10\log_{10}N)$,如 163 计 32。RIES 没有的符号按类比赋权:$\cosh,\sinh,\tanh$ 同三角函数计 13;$\Gamma$、digamma、erfi、$\zeta$ 同 Lambert $W$ 计 15;欧拉常数 $\gamma$、Catalan 常数、Khinchin 常数、supergolden 数 $\psi$ 同 $\phi$ 计 18。每个条目取权重最低的写法,例如 $e^{\pi}$ 写作 pi exp(27)而不是 e pi ^(36),$\pi^4$ 写作 pi sq sq(32)。
校准
为什么是 n − complexity/10
ries.c 的日志记录了复杂度 $\le 64$ 的表达式共 2 236 462 个,$\log_{10}$ 后为 6.35,约等于 $64/10$。也就是说复杂度 $c$ 对应大约 $10^{c/10}$ 个同样简单的表达式。随机实数落在整数 $10^{-n}$ 邻域内的概率约为 $10^{-n}$,于是在复杂度不超过 $c$ 的表达式中,和某条目一样好的近整数期望有 $10^{c/10-n}$ 个。surplus 就是这个期望个数的负对数:大于 0 说明比随机碰巧更罕见,小于 0 说明这种精度在这个复杂度下本来就会出现。这与 Borwein 讨论"high precision fraud"时的判据一致。
对平凡家族做穷举检验:$\sqrt2\cdot a/b$($a\le 20000$, $b\le 300$)最好只有 $-3.1$,$\pi\cdot 113 = 354.99997$ 为 $-0.38$,$a/\ln a$($a \le 10^6$)最好是 $163/\ln 163$ 的 $-2.3$。对 RIES 全空间枚举到复杂度 74(约 197 万个不同值),剔除放大器后没有任何条目 surplus 为正。表中两个正盈余的条目 $e^{\pi\sqrt{163}}$、$e^{\pi\sqrt{652}}$ 都来自模函数($j$ 不变量)。
作为比较,$n/c$ 与 $n/c^2$ 没有概率含义:$n/c$ 把 5 位换 33 的 $\sin 11$ 与 34 位换 93 的嵌套余弦看成只差 2.4 倍,实际稀有程度差 $10^{23}$ 倍;$n/c^2$ 的排名会随 RIES 基数的任意选择而重排。
剥离
放大器
按符号计数的复杂度识别不了三类机械结构,它们能用很低的复杂度换取任意多的精度,因此单独处理:
- 临界点处的三角函数。$\cos y \approx \pm1$ 等价于 $y \approx k\pi$,而 $\cos(k\pi+\varepsilon) = \pm(1 - \varepsilon^2/2)$,底层近似 $y\approx k\pi$ 的误差被平方。$\cos(\pi\cos(\pi\cos(\ln(\pi+20))))$ 有 34 位,全部由 $e^{\pi} - \pi \approx 20$ 的 3 位机械放大而来。此类条目归并到核心近整数打分。
- Pisot 数的幂。若代数整数 $x$ 的其余共轭根模都小于 1,则 $x^k$ 与整数的距离按几何级数收缩,而复杂度只随 $\log k$ 增长,surplus 随 $k$ 无界上升。用 findpoly 求底数的最小多项式自动检测,命中者直接退出排名,如 supergolden 数 $\psi^{11}$。
- 模函数在 CM 点的代数值。复乘理论保证:模函数($j$、Weber 函数等)在 CM 点取代数值 $y$,且 $y = e^{\pi\sqrt r}\,(1 + O(e^{-\pi\sqrt r}))$,$r$ 为有理数,例如 $j = e^{\pi\sqrt D} - 744 + O(e^{-\pi\sqrt D})$。这是定理而非巧合:用单位 $a + \sqrt{a^2-1}$ 的乘积拼出类不变量,精度随 $\sqrt D$ 增长而复杂度增长很慢。再套一层 $\ln y/\pi$,$y$ 的相对精度就变成了绝对精度,这正是被拒绝的相对精度从后门回来。检测:对每个代数子式(整数、四则、根号、有理次幂、$\phi$、$\psi$),以及代数数之 ln 的有理线性组合(其指数仍是代数数,防止把 $\ln y$ 拆成 $\sum \ln u_i$),若 $|y| \ge 10^6$,且 $(\ln y/\pi)^2$ 与某个分母 $\le 576$ 的有理数 $r$ 相差 $< 10^{-10}$,或分母 $\le 4$ 时 $|\ln y - \pi\sqrt r| < 1000/|y|$(容纳 744、24 这类常数项),即判为 CM 恒等式。$y$ 为整数时按核心 $e^{\pi\sqrt r}$ 计分,如 $(\ln(640320^3+744)/\pi)^2$ 归并到 $e^{\pi\sqrt{163}}$;否则没有近整数核心,直接退出排名,如 $(\sqrt2\,\psi)^{24} - e^{\pi\sqrt{31}}$。$e^{\pi\sqrt{163}}$ 本身不受影响,因为 $\pi\sqrt{163}$ 不是代数数的对数。
门槛
入场门槛与稳定性检验
surplus 只回答"比机会水平好多少",不判断一个数是否算 almost integer。两条附加规则负责这一点,计算器另有一条精度保护:
- 门槛 n ≥ 2。与最近整数相差必须小于 0.01。$\pi$ 的 $n = 0.85$、surplus $-0.55$ 高于表中多数条目,但它不是 almost integer。MathWorld 条目中有 8 条不达标,列在下表,不参与排名。
- 结构性稳定检验。把表达式中每个常数分别乘 1.01 和 0.99 重新求值。真巧合至少有一个关键常数一动就碎:$e^{\pi\sqrt{163}}$ 里的 163 改动 1%,只剩 0.3 位。而 $1/\pi^{100}$、$\cos(\pi/8^8)$、$2^{1/\pi^{25}}$ 这类极限结构动哪个常数都还接近整数。若所有扰动后仍有 $\ge 3$ 位,判为结构性,不参与排名。顶层加减法中的整数项不扰动,否则 $1 + 1/\pi^{100}$ 可以靠"1 变成 1.01 平移了目标"逃过检测。校准假设"给定量级后小数部分均匀分布"对这类结构不成立:$1/\pi^{100}$ 接近 0 是因为量级被构造成 $10^{-50}$,不是小数部分的巧合。这条检验对现有条目零误判,并顺带抓住嵌套余弦一类放大器;它抓不到 Pisot 幂(扰动 $\phi$ 会破坏 $\phi^{64}$),所以 Pisot 规则仍需保留。
- 计算器的精度保护。先以 90 位有效数字求值并记录最大中间量的整数位数 $I$;需要 $I + 70$ 位时以该精度重算,超过 1000 位(decimal.js 内置 $\pi$ 常数的上限)则拒绝。判断精确整数时再以多 40 位复算一次,距离随精度继续缩小的才是精确恒等式,避免把 $\pi^{1000}$ 这类超出精度的数误报为整数。
范围
收录与排除
条目取自 MathWorld 的 Almost Integer 页面,包括 $e^{\pi\sqrt n}$ 表格的 13 个值与 Hickerson 数 $h_0$ 到 $h_{17}$。排除需要无穷级数或无穷乘积的条目(Borwein 级数、theta 和、Maze–Minder 的 $u_k$、q-Pochhammer 符号)、非封闭形式(第三类椭圆积分、Student $t$ 分位数)以及涉及物理常数或单位的条目。所有数值用 mpmath 以 120 位精度计算,与 MathWorld 给出的数字核对一致;页面公式图片的 alt 文本有三处歧义或错误,已按数值核对更正。
附录
RIES 内置符号
RIES 用单个字符表示每个符号,表达式是这些字符组成的后缀串,例如 pE 是 $e^{\pi}$,2q 是 $\sqrt2$,5 2 v 是 $\sqrt[5]{2}$。按"栈效应类型"(seft)分为三类:常数入栈、一元函数替换栈顶、二元运算弹出两项压入一项。下表列出全部内置符号,权重已含基数 10。
常数(seft a)
| 符号 | 名称 | 权重 | 含义 |
|---|---|---|---|
1 … 9 | 1 … 9 | 10, 13, 15, 16, 17, 18, 18, 19, 19 | 一位整数。RIES 没有多位数,10 写作 25*,权重约为 $10 + 10\log_{10}n$ |
p | pi | 14 | 圆周率 $\pi = 3.14159\ldots$ |
e | e | 16 | 自然对数的底 $e = 2.71828\ldots$ |
f | phi | 18 | 黄金比 $\phi = (1+\sqrt5)/2 = 1.61803\ldots$ |
x | x | 15 | 方程的未知数,即用户输入的目标值。RIES 搜索的是形如 LHS(x) = RHS 的等式;本站只对不含 $x$ 的常数表达式计复杂度 |
一元函数(seft b)
| 符号 | 名称 | 权重 | 含义 |
|---|---|---|---|
n | neg | 7 | 取负 $-x$ |
r | recip | 7 | 倒数 $1/x$ |
s | dup* | 9 | 平方 $x^2$。名字来自 FORTH 的"复制再相乘" |
q | sqrt | 9 | 平方根 $\sqrt x$ |
l | ln | 13 | 自然对数 $\ln x$ |
E | exp | 13 | 指数函数 $e^{x}$ |
S | sinpi | 13 | $\sin(\pi x)$。默认三角函数的参数以 $\pi$ 为单位,这样 $\sin$ 在有理数处取到代数值;加 -s 选项后改为弧度制的 $\sin x$,权重不变 |
C | cospi | 13 | $\cos(\pi x)$,同上 |
T | tanpi | 16 | $\tan(\pi x)$,同上。权重比正余弦高 3,因为它在 $\pi/2$ 附近发散,容易制造虚假匹配 |
W | W | 15 | Lambert W 函数,$w e^{w} = x$ 的反函数 |
二元运算(seft c)
| 符号 | 名称 | 权重 | 含义 |
|---|---|---|---|
+ | + | 4 | 加法 $A + B$ |
- | − | 5 | 减法 $A - B$ |
* | * | 4 | 乘法 $A \times B$ |
/ | / | 5 | 除法 $A / B$ |
^ | ** | 6 | 幂 $A^{B}$ |
v | root | 7 | $A$ 次方根:A B v $= \sqrt[A]{B}$,注意根指数在前 |
L | logN | 9 | 以 $A$ 为底的对数:A B L $= \log_A B = \ln B / \ln A$ |
A | atan2 | 9 | 两参数反正切:y x A $= \operatorname{atan2}(y, x)$,即原点到点 $(x, y)$ 的射线幅角。权重设为 11 即可禁用 |
此外还有几个不参与搜索的内部符号:空格是空操作,供 --eval-expression 使用;!/、!-、!^、>< 是后缀转中缀时用的"反向运算"占位符,权重为 0;括号、逗号和等号只用于输出格式;当用户禁用了全部一元函数时,RIES 会临时加入权重 20 的恒等符号 I 以维持表达式形状的完整。用户可以用 --define 增加自定义常数并指定权重,用 --symbol-weights 覆盖任一符号的权重,用 --eval-expression 直接查看某个后缀串的值和复杂度。
Definition
The quality function
For an almost integer $x$ define
$$\text{surplus}(x) = n(x) - \frac{\text{complexity}(x)}{10},\qquad n(x) = -\log_{10}\left|x - \operatorname{nint}(x)\right|$$
$n$ uses the absolute error and is the continuous version of the run of 0s or 9s after the decimal point: $e^{\pi\sqrt{163}}$ misses the nearest integer by $7.5\times10^{-13}$, so $n = 12.12$. Relative precision is not used, because the number of digits before the decimal point has nothing to do with the coincidence: once the magnitude is fixed, the fractional part of a random real is uniformly distributed, and the probability of landing within $\varepsilon$ of an integer is simply $2\varepsilon$.
Complexity: RIES symbol weights
Complexity is borrowed from the complexity() function in Robert Munafo's RIES. An expression is written in postfix form and its complexity is the sum of the weights of its symbols, where weight = base 10 + the symbol's individual weight. The base keeps every symbol weight positive, so that a search ordered by increasing complexity terminates; it also makes complexity/10 roughly the number of decimal digits needed to describe the whole expression.
| Kind | Symbols | Weight |
|---|---|---|
| Constant | 1, 2, 3, 4, 5, 6, 7, 8, 9 | 10, 13, 15, 16, 17, 18, 18, 19, 19 |
| Constant | $\pi$, $e$, $\phi$ | 14, 16, 18 |
| Unary | negate, reciprocal | 7 |
| Unary | square, square root | 9 |
| Unary | $\ln$, $\exp$, $\sin$, $\cos$ | 13 |
| Unary | $\tan$, Lambert $W$ | 16, 15 |
| Binary | $+$, $\times$ | 4 |
| Binary | $-$, $\div$ | 5 |
| Binary | power | 6 |
| Binary | $n$-th root, $\log_b$, $\operatorname{atan2}$ | 7, 9, 9 |
RIES only has single digits; 10 must be written 2 5 *. A comment in ries.c says constant weights are close to $10\log_{10}x$, and this site extrapolates from it: an integer $N \ge 10$ weighs $10 + \operatorname{round}(10\log_{10}N)$, so 163 costs 32. Symbols RIES lacks are weighted by analogy: $\cosh,\sinh,\tanh$ cost 13 like the trigonometric functions; $\Gamma$, digamma, erfi and $\zeta$ cost 15 like Lambert $W$; Euler's $\gamma$, Catalan's constant, Khinchin's constant and the supergolden ratio $\psi$ cost 18 like $\phi$. Each entry is scored on its cheapest form: $e^{\pi}$ is pi exp (27) rather than e pi ^ (36), and $\pi^4$ is pi sq sq (32).
Calibration
Why n − complexity/10
The ries.c log records 2 236 462 expressions of complexity $\le 64$; $\log_{10}$ of that is 6.35, about $64/10$. So complexity $c$ corresponds to roughly $10^{c/10}$ equally simple expressions. A random real lands within $10^{-n}$ of an integer with probability about $10^{-n}$, so among expressions of complexity at most $c$ one expects $10^{c/10-n}$ almost integers as good as a given entry. The surplus is the negative log of that expected count: above 0 means rarer than chance, below 0 means such precision is bound to appear at that complexity anyway. This is the same test Borwein used when discussing "high precision fraud".
Exhaustive checks on trivial families: $\sqrt2\cdot a/b$ ($a\le 20000$, $b\le 300$) peaks at $-3.1$; $\pi\cdot 113 = 354.99997$ reaches $-0.38$; $a/\ln a$ ($a \le 10^6$) peaks at $163/\ln 163$ with $-2.3$. Enumerating the whole RIES space up to complexity 74 (about 1.97 million distinct values) and removing amplifiers leaves no entry with positive surplus. The two positive entries in the table, $e^{\pi\sqrt{163}}$ and $e^{\pi\sqrt{652}}$, both come from modular functions (the $j$-invariant).
By comparison, $n/c$ and $n/c^2$ carry no probabilistic meaning: $n/c$ rates $\sin 11$ (5 digits for 33) and the nested cosine (34 digits for 93) as differing by a factor of 2.4, when their rarity differs by $10^{23}$; the ranking under $n/c^2$ reshuffles with the arbitrary choice of the RIES base weight.
Stripping
Amplifiers
A symbol-counting complexity cannot see three mechanical constructions that buy arbitrary precision at almost no cost, so they are handled separately:
- Trigonometric functions at a critical point. $\cos y \approx \pm1$ is the same as $y \approx k\pi$, and $\cos(k\pi+\varepsilon) = \pm(1 - \varepsilon^2/2)$ squares the error of the underlying approximation $y\approx k\pi$. The 34 digits of $\cos(\pi\cos(\pi\cos(\ln(\pi+20))))$ are all manufactured from the 3 digits of $e^{\pi} - \pi \approx 20$. Such entries are scored on their core almost integer.
- Powers of Pisot numbers. If an algebraic integer $x$ has all its other conjugates inside the unit circle, then $x^k$ approaches integers geometrically while complexity grows only like $\log k$, so the surplus rises without bound. The base's minimal polynomial is found with findpoly and matching entries are dropped from the ranking, e.g. the supergolden ratio $\psi^{11}$.
- Algebraic values of modular functions at CM points. Complex multiplication guarantees that a modular function ($j$, the Weber functions, …) takes an algebraic value $y$ at a CM point with $y = e^{\pi\sqrt r}\,(1 + O(e^{-\pi\sqrt r}))$, $r$ rational; for example $j = e^{\pi\sqrt D} - 744 + O(e^{-\pi\sqrt D})$. This is a theorem, not a coincidence: a class invariant assembled from products of units $a + \sqrt{a^2-1}$ gains precision like $\sqrt D$ while its complexity grows slowly. Wrapping it in $\ln y/\pi$ turns the relative precision of $y$ into absolute precision, which brings the rejected relative-precision metric back through the side door. Detection: for every algebraic subexpression (integers, arithmetic, roots, rational powers, $\phi$, $\psi$) and every rational combination of logarithms of algebraic numbers (whose exponential is again algebraic, so splitting $\ln y$ into $\sum \ln u_i$ does not help), if $|y| \ge 10^6$ and $(\ln y/\pi)^2$ lies within $10^{-10}$ of a rational $r$ with denominator $\le 576$, or within $|\ln y - \pi\sqrt r| < 1000/|y|$ for denominator $\le 4$ (allowing constant terms such as 744 or 24), the entry is a CM identity. When $y$ is an integer the entry is scored on its core $e^{\pi\sqrt r}$, so $(\ln(640320^3+744)/\pi)^2$ is merged into $e^{\pi\sqrt{163}}$; otherwise there is no almost-integer core and the entry is dropped, e.g. $(\sqrt2\,\psi)^{24} - e^{\pi\sqrt{31}}$. $e^{\pi\sqrt{163}}$ itself is unaffected, since $\pi\sqrt{163}$ is not the logarithm of an algebraic number.
Admission
Threshold and stability test
The surplus only answers "how much better than chance"; it does not decide whether a number is an almost integer at all. Two further rules do that, and the calculator adds a precision guard:
- Threshold n ≥ 2. The distance to the nearest integer must be below 0.01. $\pi$ has $n = 0.85$ and surplus $-0.55$, better than most entries in the table, yet it is not an almost integer. Eight MathWorld entries fall below the threshold; they are listed below and not ranked.
- Structural-stability test. Each constant in the expression is multiplied by 1.01 and by 0.99 in turn and the value recomputed. A genuine coincidence has at least one critical constant that shatters it: moving the 163 in $e^{\pi\sqrt{163}}$ by 1% leaves 0.3 digits. Limiting structures such as $1/\pi^{100}$, $\cos(\pi/8^8)$ or $2^{1/\pi^{25}}$ stay near an integer whichever constant is moved. If every perturbation still leaves $\ge 3$ digits, the entry is structural and not ranked. Integers added or subtracted at the top level are exempt, otherwise $1 + 1/\pi^{100}$ would escape by letting the 1 become 1.01 and shift the target. The calibration assumption "fractional part uniform given the magnitude" fails for such structures: $1/\pi^{100}$ is near 0 because its magnitude was built to be $10^{-50}$, not because of its fractional part. The test produces no false positives on the existing entries and also catches nested-cosine amplifiers; it does not catch Pisot powers (perturbing $\phi$ destroys $\phi^{64}$), so the Pisot rule stays.
- Precision guard in the calculator. The value is first computed at 90 significant digits while recording the largest number of integer digits $I$ among all intermediate values; if $I + 70$ digits are needed the value is recomputed at that precision, and above 1000 digits (the limit of decimal.js's built-in $\pi$) the input is refused. An exact integer is only declared when a recomputation with 40 more digits shrinks the distance further, so an out-of-precision number such as $\pi^{1000}$ is no longer reported as an integer.
Scope
Included and excluded
Entries come from MathWorld's Almost Integer page, including the 13 values of the $e^{\pi\sqrt n}$ table and the Hickerson numbers $h_0$ to $h_{17}$. Excluded are entries requiring infinite sums or products (the Borwein series, the theta sum, the Maze–Minder $u_k$, the q-Pochhammer symbol), non-closed forms (an elliptic integral of the third kind, a Student $t$ quantile) and anything involving physical constants or units. All values were computed with mpmath at 120 digits and agree with the figures MathWorld prints; three formula images on that page have ambiguous or wrong alt text, corrected here by numerical check.
Appendix
RIES built-in symbols
RIES writes every symbol as a single character and an expression as a postfix string of them: pE is $e^{\pi}$, 2q is $\sqrt2$, 5 2 v is $\sqrt[5]{2}$. Symbols fall into three "stack effect types" (seft): constants push a value, unary functions replace the top of the stack, binary operators pop two values and push one. The tables list every built-in symbol with its weight including the base of 10.
Constants (seft a)
| Symbol | Name | Weight | Meaning |
|---|---|---|---|
1 … 9 | 1 … 9 | 10, 13, 15, 16, 17, 18, 18, 19, 19 | Single digits. RIES has no multi-digit numerals: 10 is 25*. Weight is close to $10 + 10\log_{10}n$ |
p | pi | 14 | $\pi = 3.14159\ldots$ |
e | e | 16 | Base of natural logarithms, $e = 2.71828\ldots$ |
f | phi | 18 | Golden ratio $\phi = (1+\sqrt5)/2 = 1.61803\ldots$ |
x | x | 15 | The unknown of the equation, i.e. the user's target value. RIES searches for equations LHS(x) = RHS; this site only scores constant expressions without $x$ |
Unary functions (seft b)
| Symbol | Name | Weight | Meaning |
|---|---|---|---|
n | neg | 7 | Negation $-x$ |
r | recip | 7 | Reciprocal $1/x$ |
s | dup* | 9 | Square $x^2$. The name is FORTH for "duplicate and multiply" |
q | sqrt | 9 | Square root $\sqrt x$ |
l | ln | 13 | Natural logarithm $\ln x$ |
E | exp | 13 | Exponential $e^{x}$ |
S | sinpi | 13 | $\sin(\pi x)$. By default the trigonometric argument is in units of $\pi$, so $\sin$ takes algebraic values at rationals; the -s option switches to radians $\sin x$ at the same weight |
C | cospi | 13 | $\cos(\pi x)$, likewise |
T | tanpi | 16 | $\tan(\pi x)$, likewise. Weighted 3 above sine and cosine because it diverges near $\pi/2$ and produces spurious matches |
W | W | 15 | Lambert W function, the inverse of $w e^{w} = x$ |
Binary operators (seft c)
| Symbol | Name | Weight | Meaning |
|---|---|---|---|
+ | + | 4 | Addition $A + B$ |
- | − | 5 | Subtraction $A - B$ |
* | * | 4 | Multiplication $A \times B$ |
/ | / | 5 | Division $A / B$ |
^ | ** | 6 | Power $A^{B}$ |
v | root | 7 | $A$-th root: A B v $= \sqrt[A]{B}$; note the index comes first |
L | logN | 9 | Logarithm to base $A$: A B L $= \log_A B = \ln B / \ln A$ |
A | atan2 | 9 | Two-argument arctangent: y x A $= \operatorname{atan2}(y, x)$, the angle of the ray from the origin through $(x, y)$. Setting the weight to 11 disables it |
A few internal symbols take no part in the search: a space is a no-op for --eval-expression; !/, !-, !^ and >< are "reversed operation" placeholders used when converting postfix to infix, with weight 0; parentheses, comma and equals sign are output formatting only; and when the user disables every unary function, RIES temporarily adds an identity symbol I of weight 20 to keep expression shapes intact. Users can add constants with a chosen weight via --define, override any weight with --symbol-weights, and print the value and complexity of a postfix string with --eval-expression.
试试这些:Try one of these:
支持的写法Supported syntax
- 整数、小数(小数按分数计价)
\pi,e,\phi(黄金比),\gamma(欧拉常数)+ - \cdot \times /,并列即相乘\frac{a}{b},a^{b},\sqrt{x},\sqrt[n]{x}\ln,\log_{b}(无底数按 10),\exp,e^{x}\sin \cos \tan \sinh \cosh \tanh \arctan\left( \right)、( )、[ ]、{ }- 不支持 $\Gamma$、$\zeta$、erfi 等特殊函数与变量
- Integers and decimals (a decimal is priced as a fraction)
\pi,e,\phi(golden ratio),\gamma(Euler's constant)+ - \cdot \times /; juxtaposition multiplies\frac{a}{b},a^{b},\sqrt{x},\sqrt[n]{x}\ln,\log_{b}(base 10 if omitted),\exp,e^{x}\sin \cos \tan \sinh \cosh \tanh \arctan\left( \right),( ),[ ],{ }- Special functions such as $\Gamma$, $\zeta$, erfi, and variables are not supported