Math FPCore C Julia Wolfram TeX \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}
\]
↓
\[\begin{array}{l}
t_1 := \frac{y - z}{a - z}\\
t_2 := x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\
\mathbf{if}\;t_2 \leq -5 \cdot 10^{-294}:\\
\;\;\;\;\mathsf{fma}\left(t_1, t - x, x\right)\\
\mathbf{elif}\;t_2 \leq 0:\\
\;\;\;\;t + \left(t - x\right) \cdot \frac{a - y}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \left(t - x\right) \cdot t_1\\
\end{array}
\]
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y z) (- t x)) (- a z)))) ↓
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (- y z) (- a z))) (t_2 (+ x (/ (* (- y z) (- t x)) (- a z)))))
(if (<= t_2 -5e-294)
(fma t_1 (- t x) x)
(if (<= t_2 0.0) (+ t (* (- t x) (/ (- a y) z))) (+ x (* (- t x) t_1)))))) double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * (t - x)) / (a - z));
}
↓
double code(double x, double y, double z, double t, double a) {
double t_1 = (y - z) / (a - z);
double t_2 = x + (((y - z) * (t - x)) / (a - z));
double tmp;
if (t_2 <= -5e-294) {
tmp = fma(t_1, (t - x), x);
} else if (t_2 <= 0.0) {
tmp = t + ((t - x) * ((a - y) / z));
} else {
tmp = x + ((t - x) * t_1);
}
return tmp;
}
function code(x, y, z, t, a)
return Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z)))
end
↓
function code(x, y, z, t, a)
t_1 = Float64(Float64(y - z) / Float64(a - z))
t_2 = Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z)))
tmp = 0.0
if (t_2 <= -5e-294)
tmp = fma(t_1, Float64(t - x), x);
elseif (t_2 <= 0.0)
tmp = Float64(t + Float64(Float64(t - x) * Float64(Float64(a - y) / z)));
else
tmp = Float64(x + Float64(Float64(t - x) * t_1));
end
return tmp
end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
↓
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -5e-294], N[(t$95$1 * N[(t - x), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t$95$2, 0.0], N[(t + N[(N[(t - x), $MachinePrecision] * N[(N[(a - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t - x), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]]]]]
x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}
↓
\begin{array}{l}
t_1 := \frac{y - z}{a - z}\\
t_2 := x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\
\mathbf{if}\;t_2 \leq -5 \cdot 10^{-294}:\\
\;\;\;\;\mathsf{fma}\left(t_1, t - x, x\right)\\
\mathbf{elif}\;t_2 \leq 0:\\
\;\;\;\;t + \left(t - x\right) \cdot \frac{a - y}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \left(t - x\right) \cdot t_1\\
\end{array}
Alternatives Alternative 1 Error 6.8 Cost 2633
\[\begin{array}{l}
t_1 := x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\
\mathbf{if}\;t_1 \leq -5 \cdot 10^{-294} \lor \neg \left(t_1 \leq 0\right):\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t + \left(t - x\right) \cdot \frac{a - y}{z}\\
\end{array}
\]
Alternative 2 Error 31.0 Cost 1632
\[\begin{array}{l}
t_1 := \left(t - x\right) \cdot \frac{y}{a - z}\\
t_2 := x - x \cdot \frac{y}{a}\\
\mathbf{if}\;x \leq -1.02 \cdot 10^{+125}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq -9.2 \cdot 10^{+105}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -3.9 \cdot 10^{-54}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq 3.25 \cdot 10^{-111}:\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{elif}\;x \leq 1.26 \cdot 10^{+43}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 2.7 \cdot 10^{+69}:\\
\;\;\;\;x - \frac{t}{\frac{a}{z}}\\
\mathbf{elif}\;x \leq 7.5 \cdot 10^{+135}:\\
\;\;\;\;t - x \cdot \frac{a}{z}\\
\mathbf{elif}\;x \leq 3.2 \cdot 10^{+260}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\frac{z}{a - z} + 1\right)\\
\end{array}
\]
Alternative 3 Error 30.0 Cost 1504
\[\begin{array}{l}
t_1 := x - x \cdot \frac{y}{a}\\
t_2 := t \cdot \frac{y - z}{a - z}\\
\mathbf{if}\;x \leq -1.7 \cdot 10^{+126}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -3.3 \cdot 10^{+112}:\\
\;\;\;\;y \cdot \frac{x}{z - a}\\
\mathbf{elif}\;x \leq -4 \cdot 10^{-55}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 4.2 \cdot 10^{-91}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq 4.2 \cdot 10^{-6}:\\
\;\;\;\;x \cdot \frac{y}{z - a}\\
\mathbf{elif}\;x \leq 6 \cdot 10^{+29}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq 1.42 \cdot 10^{+75}:\\
\;\;\;\;x - \frac{t}{\frac{a}{z}}\\
\mathbf{elif}\;x \leq 1.1 \cdot 10^{+135}:\\
\;\;\;\;t - x \cdot \frac{a}{z}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 4 Error 38.5 Cost 1240
\[\begin{array}{l}
t_1 := z \cdot \frac{t}{z - a}\\
\mathbf{if}\;a \leq -2.8 \cdot 10^{+125}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq -1.3 \cdot 10^{+61}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq -1 \cdot 10^{+21}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 8.2 \cdot 10^{-307}:\\
\;\;\;\;x \cdot \frac{y}{z - a}\\
\mathbf{elif}\;a \leq 10^{-70}:\\
\;\;\;\;t\\
\mathbf{elif}\;a \leq 5.6 \cdot 10^{+128}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\]
Alternative 5 Error 37.4 Cost 1240
\[\begin{array}{l}
\mathbf{if}\;a \leq -4.1 \cdot 10^{+117}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq -8.4 \cdot 10^{-51}:\\
\;\;\;\;\left(t - x\right) \cdot \frac{y}{a}\\
\mathbf{elif}\;a \leq -4 \cdot 10^{-189}:\\
\;\;\;\;t\\
\mathbf{elif}\;a \leq 1.25 \cdot 10^{-283}:\\
\;\;\;\;x \cdot \frac{y}{z - a}\\
\mathbf{elif}\;a \leq 2.4 \cdot 10^{-73}:\\
\;\;\;\;t\\
\mathbf{elif}\;a \leq 3.5 \cdot 10^{+128}:\\
\;\;\;\;z \cdot \frac{t}{z - a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\]
Alternative 6 Error 27.7 Cost 1172
\[\begin{array}{l}
t_1 := x - \frac{t}{\frac{a}{z}}\\
t_2 := t - \frac{a}{\frac{z}{x}}\\
\mathbf{if}\;z \leq -6 \cdot 10^{+62}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -3.35 \cdot 10^{-18}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 10^{-38}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq 5.5 \cdot 10^{+91}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 2.8 \cdot 10^{+221}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{-z}{a - z}\\
\end{array}
\]
Alternative 7 Error 27.7 Cost 1172
\[\begin{array}{l}
t_1 := x - \frac{t}{\frac{a}{z}}\\
\mathbf{if}\;z \leq -1.05 \cdot 10^{+62}:\\
\;\;\;\;t - x \cdot \frac{a}{z}\\
\mathbf{elif}\;z \leq -2.4 \cdot 10^{-18}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 3.1 \cdot 10^{-34}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq 4.2 \cdot 10^{+91}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 6.6 \cdot 10^{+221}:\\
\;\;\;\;t - \frac{a}{\frac{z}{x}}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{-z}{a - z}\\
\end{array}
\]
Alternative 8 Error 23.2 Cost 1105
\[\begin{array}{l}
\mathbf{if}\;z \leq -1.85 \cdot 10^{+59}:\\
\;\;\;\;t - \frac{a}{z} \cdot \left(x - t\right)\\
\mathbf{elif}\;z \leq -0.025:\\
\;\;\;\;x - \frac{t}{\frac{a}{z}}\\
\mathbf{elif}\;z \leq -5.9 \cdot 10^{-18} \lor \neg \left(z \leq 3.5 \cdot 10^{-23}\right):\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t - x}{a}\\
\end{array}
\]
Alternative 9 Error 22.5 Cost 1105
\[\begin{array}{l}
\mathbf{if}\;z \leq -1.2 \cdot 10^{+63}:\\
\;\;\;\;t - \frac{a}{z} \cdot \left(x - t\right)\\
\mathbf{elif}\;z \leq -0.0032:\\
\;\;\;\;x - \frac{t}{\frac{a}{z}}\\
\mathbf{elif}\;z \leq -6.3 \cdot 10^{-18} \lor \neg \left(z \leq 1.6 \cdot 10^{-24}\right):\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\
\end{array}
\]
Alternative 10 Error 20.6 Cost 1104
\[\begin{array}{l}
t_1 := t - \frac{y}{\frac{z}{t - x}}\\
\mathbf{if}\;z \leq -9.5 \cdot 10^{+93}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -3.6 \cdot 10^{-6}:\\
\;\;\;\;x - \frac{t}{\frac{a}{z}}\\
\mathbf{elif}\;z \leq -7.2 \cdot 10^{-18}:\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{elif}\;z \leq 240000:\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 11 Error 16.6 Cost 1100
\[\begin{array}{l}
t_1 := t + \left(t - x\right) \cdot \frac{a - y}{z}\\
\mathbf{if}\;z \leq -8.8 \cdot 10^{+80}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -3.05 \cdot 10^{-18}:\\
\;\;\;\;x - \frac{z}{\frac{a - z}{t}}\\
\mathbf{elif}\;z \leq 0.84:\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 12 Error 16.6 Cost 1100
\[\begin{array}{l}
t_1 := t + \left(t - x\right) \cdot \frac{a - y}{z}\\
\mathbf{if}\;z \leq -1.15 \cdot 10^{+99}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -4.5 \cdot 10^{-24}:\\
\;\;\;\;x - \frac{z}{\frac{a - z}{t - x}}\\
\mathbf{elif}\;z \leq 5.7 \cdot 10^{-6}:\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 13 Error 28.5 Cost 1040
\[\begin{array}{l}
t_1 := t \cdot \frac{-z}{a - z}\\
\mathbf{if}\;z \leq -2.3 \cdot 10^{+124}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -9 \cdot 10^{-9}:\\
\;\;\;\;x - \frac{t}{\frac{a}{z}}\\
\mathbf{elif}\;z \leq -6.9 \cdot 10^{-18}:\\
\;\;\;\;\frac{z \cdot t}{z - a}\\
\mathbf{elif}\;z \leq 1.55 \cdot 10^{-20}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 14 Error 29.8 Cost 976
\[\begin{array}{l}
t_1 := x - \frac{t}{\frac{a}{z}}\\
\mathbf{if}\;z \leq -9.5 \cdot 10^{+130}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -3.7 \cdot 10^{-18}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.5 \cdot 10^{-36}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq 1.15 \cdot 10^{+92}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\]
Alternative 15 Error 20.0 Cost 972
\[\begin{array}{l}
t_1 := t - \frac{y}{\frac{z}{t - x}}\\
\mathbf{if}\;z \leq -1.9 \cdot 10^{+173}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -2.65 \cdot 10^{-18}:\\
\;\;\;\;x - \frac{z}{\frac{a - z}{t}}\\
\mathbf{elif}\;z \leq 900:\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 16 Error 38.1 Cost 712
\[\begin{array}{l}
\mathbf{if}\;a \leq -4.6 \cdot 10^{+18}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 3.1 \cdot 10^{-295}:\\
\;\;\;\;x \cdot \frac{y}{z - a}\\
\mathbf{elif}\;a \leq 2.2 \cdot 10^{+102}:\\
\;\;\;\;t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\]
Alternative 17 Error 30.3 Cost 712
\[\begin{array}{l}
\mathbf{if}\;z \leq -1.7 \cdot 10^{+125}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 5 \cdot 10^{-23}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;z \cdot \frac{t}{z - a}\\
\end{array}
\]
Alternative 18 Error 36.1 Cost 328
\[\begin{array}{l}
\mathbf{if}\;z \leq -3.8 \cdot 10^{+124}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 1.05 \cdot 10^{+88}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\]
Alternative 19 Error 45.8 Cost 64
\[t
\]