Math FPCore C Julia Wolfram TeX \[x + \left(y - z\right) \cdot \frac{t - x}{a - z}
\]
↓
\[\begin{array}{l}
t_1 := \mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)\\
t_2 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\mathbf{if}\;t_2 \leq -2 \cdot 10^{-293}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_2 \leq 0:\\
\;\;\;\;t - \frac{t - x}{z} \cdot \left(y - a\right)\\
\mathbf{else}:\\
\;\;\;\;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 (fma (- t x) (/ (- y z) (- a z)) x))
(t_2 (+ x (* (- y z) (/ (- t x) (- a z))))))
(if (<= t_2 -2e-293)
t_1
(if (<= t_2 0.0) (- t (* (/ (- t x) z) (- y a))) 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 = fma((t - x), ((y - z) / (a - z)), x);
double t_2 = x + ((y - z) * ((t - x) / (a - z)));
double tmp;
if (t_2 <= -2e-293) {
tmp = t_1;
} else if (t_2 <= 0.0) {
tmp = t - (((t - x) / z) * (y - a));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a)
return Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z))))
end
↓
function code(x, y, z, t, a)
t_1 = fma(Float64(t - x), Float64(Float64(y - z) / Float64(a - z)), x)
t_2 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z))))
tmp = 0.0
if (t_2 <= -2e-293)
tmp = t_1;
elseif (t_2 <= 0.0)
tmp = Float64(t - Float64(Float64(Float64(t - x) / z) * Float64(y - a)));
else
tmp = t_1;
end
return tmp
end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
↓
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -2e-293], t$95$1, If[LessEqual[t$95$2, 0.0], N[(t - N[(N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] * N[(y - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
x + \left(y - z\right) \cdot \frac{t - x}{a - z}
↓
\begin{array}{l}
t_1 := \mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)\\
t_2 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\mathbf{if}\;t_2 \leq -2 \cdot 10^{-293}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_2 \leq 0:\\
\;\;\;\;t - \frac{t - x}{z} \cdot \left(y - a\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
Alternatives Alternative 1 Error 7.2 Cost 2632
\[\begin{array}{l}
t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\mathbf{if}\;t_1 \leq -1 \cdot 10^{-205}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_1 \leq 10^{-210}:\\
\;\;\;\;t + \left(t - x\right) \cdot \frac{a - y}{z}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 2 Error 24.4 Cost 1500
\[\begin{array}{l}
t_1 := x - t \cdot \frac{z}{a}\\
t_2 := t + \frac{y - a}{\frac{z}{x}}\\
\mathbf{if}\;z \leq -2.9426793673236367 \cdot 10^{+109}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -484489518.32149315:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -0.1261910771288048:\\
\;\;\;\;t + \frac{t}{z} \cdot \left(a - y\right)\\
\mathbf{elif}\;z \leq -5.149600259341313 \cdot 10^{-22}:\\
\;\;\;\;t \cdot \frac{y}{a - z}\\
\mathbf{elif}\;z \leq 3.5 \cdot 10^{-94}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq 5.738369557299789 \cdot 10^{+19}:\\
\;\;\;\;t + \frac{x \cdot \left(y - a\right)}{z}\\
\mathbf{elif}\;z \leq 1.4805273746873535 \cdot 10^{+87}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
Alternative 3 Error 21.3 Cost 1368
\[\begin{array}{l}
t_1 := x + \frac{t}{\frac{a - z}{y}}\\
t_2 := t + \frac{y - a}{\frac{z}{x}}\\
\mathbf{if}\;z \leq -1.88177966163057 \cdot 10^{+61}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -3.2 \cdot 10^{-166}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.9 \cdot 10^{-289}:\\
\;\;\;\;x + y \cdot \frac{t - x}{a}\\
\mathbf{elif}\;z \leq 1.02 \cdot 10^{-90}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 5.738369557299789 \cdot 10^{+19}:\\
\;\;\;\;t - \left(t - x\right) \cdot \frac{y}{z}\\
\mathbf{elif}\;z \leq 1.4805273746873535 \cdot 10^{+87}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
Alternative 4 Error 34.6 Cost 1240
\[\begin{array}{l}
t_1 := t + \frac{x \cdot y}{z}\\
\mathbf{if}\;z \leq -1.88177966163057 \cdot 10^{+61}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -5.2 \cdot 10^{-112}:\\
\;\;\;\;y \cdot \frac{t}{a - z}\\
\mathbf{elif}\;z \leq -1.07 \cdot 10^{-134}:\\
\;\;\;\;x + t\\
\mathbf{elif}\;z \leq -1.3 \cdot 10^{-170}:\\
\;\;\;\;\left(t - x\right) \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq 2.45 \cdot 10^{-113}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 2.3461495599211315 \cdot 10^{+138}:\\
\;\;\;\;x + t\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 5 Error 23.7 Cost 1236
\[\begin{array}{l}
t_1 := t + \frac{y - a}{\frac{z}{x}}\\
\mathbf{if}\;z \leq -2.9426793673236367 \cdot 10^{+109}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -484489518.32149315:\\
\;\;\;\;x - t \cdot \frac{z}{a}\\
\mathbf{elif}\;z \leq -0.1261910771288048:\\
\;\;\;\;t + \frac{t}{z} \cdot \left(a - y\right)\\
\mathbf{elif}\;z \leq -5.149600259341313 \cdot 10^{-22}:\\
\;\;\;\;t \cdot \frac{y}{a - z}\\
\mathbf{elif}\;z \leq 1.4805273746873535 \cdot 10^{+87}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 6 Error 20.9 Cost 1236
\[\begin{array}{l}
t_1 := x + \frac{t}{\frac{a - z}{y}}\\
t_2 := t + \frac{y - a}{\frac{z}{x}}\\
\mathbf{if}\;z \leq -1.88177966163057 \cdot 10^{+61}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -4 \cdot 10^{-139}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 10^{-110}:\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq 5.738369557299789 \cdot 10^{+19}:\\
\;\;\;\;t - \left(t - x\right) \cdot \frac{y}{z}\\
\mathbf{elif}\;z \leq 1.4805273746873535 \cdot 10^{+87}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
Alternative 7 Error 15.6 Cost 1232
\[\begin{array}{l}
t_1 := x + \frac{y - z}{\frac{a - z}{t}}\\
t_2 := t + \frac{y - a}{\frac{z}{x}}\\
\mathbf{if}\;z \leq -1.2023703340738331 \cdot 10^{+119}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -4 \cdot 10^{-139}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.9 \cdot 10^{-289}:\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq 2.085151857107415 \cdot 10^{+141}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
Alternative 8 Error 15.2 Cost 1232
\[\begin{array}{l}
t_1 := x + \frac{y - z}{\frac{a - z}{t}}\\
\mathbf{if}\;z \leq -1.2023703340738331 \cdot 10^{+119}:\\
\;\;\;\;t + \frac{y - a}{\frac{z}{x}}\\
\mathbf{elif}\;z \leq -4 \cdot 10^{-139}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.9 \cdot 10^{-289}:\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq 2.085151857107415 \cdot 10^{+141}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t - \frac{t - x}{z} \cdot \left(y - a\right)\\
\end{array}
\]
Alternative 9 Error 14.4 Cost 1232
\[\begin{array}{l}
t_1 := x + \frac{y - z}{\frac{a - z}{t}}\\
t_2 := t + \left(t - x\right) \cdot \frac{a - y}{z}\\
\mathbf{if}\;z \leq -1.2023703340738331 \cdot 10^{+119}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -4 \cdot 10^{-139}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.9 \cdot 10^{-289}:\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq 2.085151857107415 \cdot 10^{+141}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
Alternative 10 Error 14.2 Cost 1232
\[\begin{array}{l}
t_1 := x - t \cdot \frac{z - y}{a - z}\\
t_2 := t + \left(t - x\right) \cdot \frac{a - y}{z}\\
\mathbf{if}\;z \leq -3.634705079014071 \cdot 10^{+135}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -3.2 \cdot 10^{-166}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.9 \cdot 10^{-289}:\\
\;\;\;\;x + y \cdot \frac{t - x}{a}\\
\mathbf{elif}\;z \leq 2.085151857107415 \cdot 10^{+141}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
Alternative 11 Error 27.5 Cost 1108
\[\begin{array}{l}
t_1 := t + \frac{x \cdot y}{z}\\
\mathbf{if}\;z \leq -2.9426793673236367 \cdot 10^{+109}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -484489518.32149315:\\
\;\;\;\;x - t \cdot \frac{z}{a}\\
\mathbf{elif}\;z \leq -0.1261910771288048:\\
\;\;\;\;t + \frac{t}{z} \cdot \left(a - y\right)\\
\mathbf{elif}\;z \leq -5.149600259341313 \cdot 10^{-22}:\\
\;\;\;\;t \cdot \frac{y}{a - z}\\
\mathbf{elif}\;z \leq 1.4805273746873535 \cdot 10^{+87}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 12 Error 23.9 Cost 1104
\[\begin{array}{l}
t_1 := t + \frac{y - a}{\frac{z}{x}}\\
\mathbf{if}\;z \leq -1.88177966163057 \cdot 10^{+61}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 5.8 \cdot 10^{-109}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq 5.738369557299789 \cdot 10^{+19}:\\
\;\;\;\;t - \left(t - x\right) \cdot \frac{y}{z}\\
\mathbf{elif}\;z \leq 1.4805273746873535 \cdot 10^{+87}:\\
\;\;\;\;x - t \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 13 Error 22.6 Cost 1104
\[\begin{array}{l}
t_1 := x + t \cdot \frac{y - z}{a}\\
t_2 := t + \frac{y - a}{\frac{z}{x}}\\
\mathbf{if}\;z \leq -2.9426793673236367 \cdot 10^{+109}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 3.4 \cdot 10^{-94}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 5.738369557299789 \cdot 10^{+19}:\\
\;\;\;\;t - \left(t - x\right) \cdot \frac{y}{z}\\
\mathbf{elif}\;z \leq 1.4805273746873535 \cdot 10^{+87}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
Alternative 14 Error 21.9 Cost 1104
\[\begin{array}{l}
t_1 := x + \frac{t}{\frac{a - z}{y}}\\
t_2 := t + \frac{y - a}{\frac{z}{x}}\\
\mathbf{if}\;z \leq -1.88177966163057 \cdot 10^{+61}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 1.02 \cdot 10^{-90}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 5.738369557299789 \cdot 10^{+19}:\\
\;\;\;\;t - \left(t - x\right) \cdot \frac{y}{z}\\
\mathbf{elif}\;z \leq 1.4805273746873535 \cdot 10^{+87}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
Alternative 15 Error 19.7 Cost 1104
\[\begin{array}{l}
t_1 := t + \frac{y - a}{\frac{z}{x}}\\
\mathbf{if}\;z \leq -1.88177966163057 \cdot 10^{+61}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -4 \cdot 10^{-139}:\\
\;\;\;\;x + \frac{t}{\frac{a - z}{y}}\\
\mathbf{elif}\;z \leq 2.55 \cdot 10^{-141}:\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq 2.085151857107415 \cdot 10^{+141}:\\
\;\;\;\;x - t \cdot \frac{z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 16 Error 9.5 Cost 1096
\[\begin{array}{l}
t_1 := t + \left(t - x\right) \cdot \frac{a - y}{z}\\
\mathbf{if}\;z \leq -1.2467783538137027 \cdot 10^{+125}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 2.085151857107415 \cdot 10^{+141}:\\
\;\;\;\;x + \frac{y - z}{\frac{a - z}{t - x}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 17 Error 36.4 Cost 984
\[\begin{array}{l}
t_1 := t \cdot \frac{y}{a - z}\\
\mathbf{if}\;z \leq -1.88177966163057 \cdot 10^{+61}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -5.2 \cdot 10^{-112}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.07 \cdot 10^{-134}:\\
\;\;\;\;x + t\\
\mathbf{elif}\;z \leq -3.485 \cdot 10^{-168}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 2.45 \cdot 10^{-113}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 2.3461495599211315 \cdot 10^{+138}:\\
\;\;\;\;x + t\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\]
Alternative 18 Error 36.4 Cost 984
\[\begin{array}{l}
\mathbf{if}\;z \leq -1.88177966163057 \cdot 10^{+61}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -5.2 \cdot 10^{-112}:\\
\;\;\;\;t \cdot \frac{y}{a - z}\\
\mathbf{elif}\;z \leq -1.07 \cdot 10^{-134}:\\
\;\;\;\;x + t\\
\mathbf{elif}\;z \leq -1.3 \cdot 10^{-170}:\\
\;\;\;\;\left(t - x\right) \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq 2.45 \cdot 10^{-113}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 2.3461495599211315 \cdot 10^{+138}:\\
\;\;\;\;x + t\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\]
Alternative 19 Error 36.5 Cost 984
\[\begin{array}{l}
\mathbf{if}\;z \leq -1.88177966163057 \cdot 10^{+61}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -5.2 \cdot 10^{-112}:\\
\;\;\;\;y \cdot \frac{t}{a - z}\\
\mathbf{elif}\;z \leq -1.07 \cdot 10^{-134}:\\
\;\;\;\;x + t\\
\mathbf{elif}\;z \leq -1.3 \cdot 10^{-170}:\\
\;\;\;\;\left(t - x\right) \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq 2.45 \cdot 10^{-113}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 2.3461495599211315 \cdot 10^{+138}:\\
\;\;\;\;x + t\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\]
Alternative 20 Error 36.5 Cost 852
\[\begin{array}{l}
\mathbf{if}\;z \leq -0.003637529066001391:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -1.2 \cdot 10^{-106}:\\
\;\;\;\;\frac{y}{\frac{a}{t}}\\
\mathbf{elif}\;z \leq -1.32 \cdot 10^{-170}:\\
\;\;\;\;x + t\\
\mathbf{elif}\;z \leq 2.45 \cdot 10^{-113}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 2.3461495599211315 \cdot 10^{+138}:\\
\;\;\;\;x + t\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\]
Alternative 21 Error 36.2 Cost 720
\[\begin{array}{l}
\mathbf{if}\;z \leq -0.003637529066001391:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -4.3 \cdot 10^{-105}:\\
\;\;\;\;\frac{t}{\frac{a}{y}}\\
\mathbf{elif}\;z \leq 2.45 \cdot 10^{-113}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 2.3461495599211315 \cdot 10^{+138}:\\
\;\;\;\;x + t\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\]
Alternative 22 Error 27.0 Cost 712
\[\begin{array}{l}
t_1 := t + \frac{x \cdot y}{z}\\
\mathbf{if}\;z \leq -1.88177966163057 \cdot 10^{+61}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.4805273746873535 \cdot 10^{+87}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 23 Error 35.3 Cost 588
\[\begin{array}{l}
\mathbf{if}\;z \leq -1.88177966163057 \cdot 10^{+61}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 2.45 \cdot 10^{-113}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 2.3461495599211315 \cdot 10^{+138}:\\
\;\;\;\;x + t\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\]
Alternative 24 Error 35.9 Cost 328
\[\begin{array}{l}
\mathbf{if}\;z \leq -1.88177966163057 \cdot 10^{+61}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 1.4805273746873535 \cdot 10^{+87}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\]
Alternative 25 Error 45.8 Cost 64
\[t
\]