
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y x) (- z t)) (- a t))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - x) * (z - t)) / (a - t));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + (((y - x) * (z - t)) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - x) * (z - t)) / (a - t));
}
def code(x, y, z, t, a): return x + (((y - x) * (z - t)) / (a - t))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - x) * (z - t)) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y x) (- z t)) (- a t))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - x) * (z - t)) / (a - t));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + (((y - x) * (z - t)) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - x) * (z - t)) / (a - t));
}
def code(x, y, z, t, a): return x + (((y - x) * (z - t)) / (a - t))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - x) * (z - t)) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (- x y) (/ (- z a) t) y)))
(if (<= t -2.5e+80)
t_1
(if (<= t 1.9e+248) (fma (/ (- z t) (- a t)) (- y x) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((x - y), ((z - a) / t), y);
double tmp;
if (t <= -2.5e+80) {
tmp = t_1;
} else if (t <= 1.9e+248) {
tmp = fma(((z - t) / (a - t)), (y - x), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(x - y), Float64(Float64(z - a) / t), y) tmp = 0.0 if (t <= -2.5e+80) tmp = t_1; elseif (t <= 1.9e+248) tmp = fma(Float64(Float64(z - t) / Float64(a - t)), Float64(y - x), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x - y), $MachinePrecision] * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision]}, If[LessEqual[t, -2.5e+80], t$95$1, If[LessEqual[t, 1.9e+248], N[(N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] * N[(y - x), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(x - y, \frac{z - a}{t}, y\right)\\
\mathbf{if}\;t \leq -2.5 \cdot 10^{+80}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.9 \cdot 10^{+248}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -2.4999999999999998e80 or 1.9e248 < t Initial program 20.1%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites93.9%
if -2.4999999999999998e80 < t < 1.9e248Initial program 79.4%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6490.6
Applied rewrites90.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (- x y) (/ (- z a) t) y)))
(if (<= t -1.36e+73)
t_1
(if (<= t 3.4e+91) (fma (/ z (- a t)) (- y x) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((x - y), ((z - a) / t), y);
double tmp;
if (t <= -1.36e+73) {
tmp = t_1;
} else if (t <= 3.4e+91) {
tmp = fma((z / (a - t)), (y - x), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(x - y), Float64(Float64(z - a) / t), y) tmp = 0.0 if (t <= -1.36e+73) tmp = t_1; elseif (t <= 3.4e+91) tmp = fma(Float64(z / Float64(a - t)), Float64(y - x), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x - y), $MachinePrecision] * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision]}, If[LessEqual[t, -1.36e+73], t$95$1, If[LessEqual[t, 3.4e+91], N[(N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision] * N[(y - x), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(x - y, \frac{z - a}{t}, y\right)\\
\mathbf{if}\;t \leq -1.36 \cdot 10^{+73}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 3.4 \cdot 10^{+91}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{a - t}, y - x, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.3599999999999999e73 or 3.4000000000000001e91 < t Initial program 30.7%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites84.0%
if -1.3599999999999999e73 < t < 3.4000000000000001e91Initial program 85.5%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6493.3
Applied rewrites93.3%
Taylor expanded in z around inf
lower-/.f64N/A
lower--.f6483.5
Applied rewrites83.5%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma (- x y) (/ (- z a) t) y))) (if (<= t -1.4e-14) t_1 (if (<= t 3.1e+91) (fma (/ z a) (- y x) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((x - y), ((z - a) / t), y);
double tmp;
if (t <= -1.4e-14) {
tmp = t_1;
} else if (t <= 3.1e+91) {
tmp = fma((z / a), (y - x), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(x - y), Float64(Float64(z - a) / t), y) tmp = 0.0 if (t <= -1.4e-14) tmp = t_1; elseif (t <= 3.1e+91) tmp = fma(Float64(z / a), Float64(y - x), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x - y), $MachinePrecision] * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision]}, If[LessEqual[t, -1.4e-14], t$95$1, If[LessEqual[t, 3.1e+91], N[(N[(z / a), $MachinePrecision] * N[(y - x), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(x - y, \frac{z - a}{t}, y\right)\\
\mathbf{if}\;t \leq -1.4 \cdot 10^{-14}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 3.1 \cdot 10^{+91}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{a}, y - x, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.4e-14 or 3.09999999999999998e91 < t Initial program 37.3%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites79.3%
if -1.4e-14 < t < 3.09999999999999998e91Initial program 85.7%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6494.3
Applied rewrites94.3%
Taylor expanded in t around 0
lower-/.f6474.9
Applied rewrites74.9%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma (/ z a) (- y x) x))) (if (<= a -7.2e-50) t_1 (if (<= a 9.5e-87) (+ y (/ (* z (- x y)) t)) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((z / a), (y - x), x);
double tmp;
if (a <= -7.2e-50) {
tmp = t_1;
} else if (a <= 9.5e-87) {
tmp = y + ((z * (x - y)) / t);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(z / a), Float64(y - x), x) tmp = 0.0 if (a <= -7.2e-50) tmp = t_1; elseif (a <= 9.5e-87) tmp = Float64(y + Float64(Float64(z * Float64(x - y)) / t)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z / a), $MachinePrecision] * N[(y - x), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -7.2e-50], t$95$1, If[LessEqual[a, 9.5e-87], N[(y + N[(N[(z * N[(x - y), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{z}{a}, y - x, x\right)\\
\mathbf{if}\;a \leq -7.2 \cdot 10^{-50}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 9.5 \cdot 10^{-87}:\\
\;\;\;\;y + \frac{z \cdot \left(x - y\right)}{t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -7.19999999999999958e-50 or 9.5e-87 < a Initial program 68.6%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6487.9
Applied rewrites87.9%
Taylor expanded in t around 0
lower-/.f6470.3
Applied rewrites70.3%
if -7.19999999999999958e-50 < a < 9.5e-87Initial program 63.6%
lift-*.f64N/A
lift--.f64N/A
sub-negN/A
+-commutativeN/A
distribute-lft-inN/A
lower-fma.f64N/A
lower-neg.f64N/A
lower-*.f6463.6
Applied rewrites63.6%
Taylor expanded in a around 0
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f6478.9
Applied rewrites78.9%
Final simplification73.7%
(FPCore (x y z t a) :precision binary64 (if (<= t -4.4e+19) (fma (/ z t) (- y) y) (if (<= t 4.2e+91) (fma (/ z a) (- y x) x) (fma a (/ (- y x) t) y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -4.4e+19) {
tmp = fma((z / t), -y, y);
} else if (t <= 4.2e+91) {
tmp = fma((z / a), (y - x), x);
} else {
tmp = fma(a, ((y - x) / t), y);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (t <= -4.4e+19) tmp = fma(Float64(z / t), Float64(-y), y); elseif (t <= 4.2e+91) tmp = fma(Float64(z / a), Float64(y - x), x); else tmp = fma(a, Float64(Float64(y - x) / t), y); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -4.4e+19], N[(N[(z / t), $MachinePrecision] * (-y) + y), $MachinePrecision], If[LessEqual[t, 4.2e+91], N[(N[(z / a), $MachinePrecision] * N[(y - x), $MachinePrecision] + x), $MachinePrecision], N[(a * N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.4 \cdot 10^{+19}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{t}, -y, y\right)\\
\mathbf{elif}\;t \leq 4.2 \cdot 10^{+91}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{a}, y - x, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(a, \frac{y - x}{t}, y\right)\\
\end{array}
\end{array}
if t < -4.4e19Initial program 35.2%
Taylor expanded in a around 0
+-commutativeN/A
mul-1-negN/A
*-commutativeN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
lower-fma.f64N/A
lower--.f64N/A
distribute-neg-fracN/A
mul-1-negN/A
lower-/.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
lower--.f6444.0
Applied rewrites44.0%
Taylor expanded in x around inf
Applied rewrites12.6%
Taylor expanded in x around 0
Applied rewrites65.0%
if -4.4e19 < t < 4.20000000000000015e91Initial program 85.5%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6493.8
Applied rewrites93.8%
Taylor expanded in t around 0
lower-/.f6473.8
Applied rewrites73.8%
if 4.20000000000000015e91 < t Initial program 36.4%
Taylor expanded in z around 0
+-commutativeN/A
mul-1-negN/A
*-commutativeN/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6447.0
Applied rewrites47.0%
Taylor expanded in t around -inf
Applied rewrites56.9%
(FPCore (x y z t a) :precision binary64 (if (<= t -4.4e+19) (fma (/ z t) (- y) y) (if (<= t 4.2e+91) (fma z (/ (- y x) a) x) (fma a (/ (- y x) t) y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -4.4e+19) {
tmp = fma((z / t), -y, y);
} else if (t <= 4.2e+91) {
tmp = fma(z, ((y - x) / a), x);
} else {
tmp = fma(a, ((y - x) / t), y);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (t <= -4.4e+19) tmp = fma(Float64(z / t), Float64(-y), y); elseif (t <= 4.2e+91) tmp = fma(z, Float64(Float64(y - x) / a), x); else tmp = fma(a, Float64(Float64(y - x) / t), y); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -4.4e+19], N[(N[(z / t), $MachinePrecision] * (-y) + y), $MachinePrecision], If[LessEqual[t, 4.2e+91], N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], N[(a * N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.4 \cdot 10^{+19}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{t}, -y, y\right)\\
\mathbf{elif}\;t \leq 4.2 \cdot 10^{+91}:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{y - x}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(a, \frac{y - x}{t}, y\right)\\
\end{array}
\end{array}
if t < -4.4e19Initial program 35.2%
Taylor expanded in a around 0
+-commutativeN/A
mul-1-negN/A
*-commutativeN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
lower-fma.f64N/A
lower--.f64N/A
distribute-neg-fracN/A
mul-1-negN/A
lower-/.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
lower--.f6444.0
Applied rewrites44.0%
Taylor expanded in x around inf
Applied rewrites12.6%
Taylor expanded in x around 0
Applied rewrites65.0%
if -4.4e19 < t < 4.20000000000000015e91Initial program 85.5%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6471.1
Applied rewrites71.1%
if 4.20000000000000015e91 < t Initial program 36.4%
Taylor expanded in z around 0
+-commutativeN/A
mul-1-negN/A
*-commutativeN/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6447.0
Applied rewrites47.0%
Taylor expanded in t around -inf
Applied rewrites56.9%
(FPCore (x y z t a) :precision binary64 (if (<= t -9.5e+17) (fma (/ z t) (- y) y) (if (<= t 4.2e+91) (fma z (/ y a) x) (fma a (/ (- y x) t) y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -9.5e+17) {
tmp = fma((z / t), -y, y);
} else if (t <= 4.2e+91) {
tmp = fma(z, (y / a), x);
} else {
tmp = fma(a, ((y - x) / t), y);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (t <= -9.5e+17) tmp = fma(Float64(z / t), Float64(-y), y); elseif (t <= 4.2e+91) tmp = fma(z, Float64(y / a), x); else tmp = fma(a, Float64(Float64(y - x) / t), y); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -9.5e+17], N[(N[(z / t), $MachinePrecision] * (-y) + y), $MachinePrecision], If[LessEqual[t, 4.2e+91], N[(z * N[(y / a), $MachinePrecision] + x), $MachinePrecision], N[(a * N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -9.5 \cdot 10^{+17}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{t}, -y, y\right)\\
\mathbf{elif}\;t \leq 4.2 \cdot 10^{+91}:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{y}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(a, \frac{y - x}{t}, y\right)\\
\end{array}
\end{array}
if t < -9.5e17Initial program 35.2%
Taylor expanded in a around 0
+-commutativeN/A
mul-1-negN/A
*-commutativeN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
lower-fma.f64N/A
lower--.f64N/A
distribute-neg-fracN/A
mul-1-negN/A
lower-/.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
lower--.f6444.0
Applied rewrites44.0%
Taylor expanded in x around inf
Applied rewrites12.6%
Taylor expanded in x around 0
Applied rewrites65.0%
if -9.5e17 < t < 4.20000000000000015e91Initial program 85.5%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6493.8
Applied rewrites93.8%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6471.1
Applied rewrites71.1%
Taylor expanded in y around inf
Applied rewrites55.4%
if 4.20000000000000015e91 < t Initial program 36.4%
Taylor expanded in z around 0
+-commutativeN/A
mul-1-negN/A
*-commutativeN/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6447.0
Applied rewrites47.0%
Taylor expanded in t around -inf
Applied rewrites56.9%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma z (/ y a) x))) (if (<= a -9.2e+23) t_1 (if (<= a 2.15e-70) (fma (/ z t) (- y) y) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(z, (y / a), x);
double tmp;
if (a <= -9.2e+23) {
tmp = t_1;
} else if (a <= 2.15e-70) {
tmp = fma((z / t), -y, y);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(z, Float64(y / a), x) tmp = 0.0 if (a <= -9.2e+23) tmp = t_1; elseif (a <= 2.15e-70) tmp = fma(Float64(z / t), Float64(-y), y); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(z * N[(y / a), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -9.2e+23], t$95$1, If[LessEqual[a, 2.15e-70], N[(N[(z / t), $MachinePrecision] * (-y) + y), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(z, \frac{y}{a}, x\right)\\
\mathbf{if}\;a \leq -9.2 \cdot 10^{+23}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 2.15 \cdot 10^{-70}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{t}, -y, y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -9.2000000000000002e23 or 2.15e-70 < a Initial program 69.1%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6488.1
Applied rewrites88.1%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6470.5
Applied rewrites70.5%
Taylor expanded in y around inf
Applied rewrites60.8%
if -9.2000000000000002e23 < a < 2.15e-70Initial program 63.4%
Taylor expanded in a around 0
+-commutativeN/A
mul-1-negN/A
*-commutativeN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
lower-fma.f64N/A
lower--.f64N/A
distribute-neg-fracN/A
mul-1-negN/A
lower-/.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
lower--.f6453.0
Applied rewrites53.0%
Taylor expanded in x around inf
Applied rewrites30.3%
Taylor expanded in x around 0
Applied rewrites53.4%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma z (/ y a) x))) (if (<= a -1.05e-63) t_1 (if (<= a 1.85e-171) (/ (* z (- x y)) t) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(z, (y / a), x);
double tmp;
if (a <= -1.05e-63) {
tmp = t_1;
} else if (a <= 1.85e-171) {
tmp = (z * (x - y)) / t;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(z, Float64(y / a), x) tmp = 0.0 if (a <= -1.05e-63) tmp = t_1; elseif (a <= 1.85e-171) tmp = Float64(Float64(z * Float64(x - y)) / t); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(z * N[(y / a), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -1.05e-63], t$95$1, If[LessEqual[a, 1.85e-171], N[(N[(z * N[(x - y), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(z, \frac{y}{a}, x\right)\\
\mathbf{if}\;a \leq -1.05 \cdot 10^{-63}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1.85 \cdot 10^{-171}:\\
\;\;\;\;\frac{z \cdot \left(x - y\right)}{t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -1.05e-63 or 1.85000000000000006e-171 < a Initial program 68.8%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6487.3
Applied rewrites87.3%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6465.2
Applied rewrites65.2%
Taylor expanded in y around inf
Applied rewrites54.8%
if -1.05e-63 < a < 1.85000000000000006e-171Initial program 62.3%
Taylor expanded in a around 0
+-commutativeN/A
mul-1-negN/A
*-commutativeN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
lower-fma.f64N/A
lower--.f64N/A
distribute-neg-fracN/A
mul-1-negN/A
lower-/.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
lower--.f6456.2
Applied rewrites56.2%
Taylor expanded in z around inf
Applied rewrites49.8%
(FPCore (x y z t a) :precision binary64 (if (<= t -1.75e+45) y (if (<= t 2.8e+134) (fma z (/ y a) x) y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.75e+45) {
tmp = y;
} else if (t <= 2.8e+134) {
tmp = fma(z, (y / a), x);
} else {
tmp = y;
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.75e+45) tmp = y; elseif (t <= 2.8e+134) tmp = fma(z, Float64(y / a), x); else tmp = y; end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.75e+45], y, If[LessEqual[t, 2.8e+134], N[(z * N[(y / a), $MachinePrecision] + x), $MachinePrecision], y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.75 \cdot 10^{+45}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq 2.8 \cdot 10^{+134}:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{y}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if t < -1.75000000000000011e45 or 2.7999999999999999e134 < t Initial program 29.2%
Taylor expanded in a around 0
+-commutativeN/A
mul-1-negN/A
*-commutativeN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
lower-fma.f64N/A
lower--.f64N/A
distribute-neg-fracN/A
mul-1-negN/A
lower-/.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
lower--.f6442.5
Applied rewrites42.5%
Taylor expanded in x around inf
Applied rewrites14.3%
Taylor expanded in z around 0
Applied rewrites51.0%
if -1.75000000000000011e45 < t < 2.7999999999999999e134Initial program 83.7%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6492.7
Applied rewrites92.7%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6467.9
Applied rewrites67.9%
Taylor expanded in y around inf
Applied rewrites53.4%
(FPCore (x y z t a) :precision binary64 (if (<= t -1.3e-55) y (if (<= t 1.05e-20) (* y (/ z a)) y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.3e-55) {
tmp = y;
} else if (t <= 1.05e-20) {
tmp = y * (z / a);
} else {
tmp = y;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-1.3d-55)) then
tmp = y
else if (t <= 1.05d-20) then
tmp = y * (z / a)
else
tmp = y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.3e-55) {
tmp = y;
} else if (t <= 1.05e-20) {
tmp = y * (z / a);
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -1.3e-55: tmp = y elif t <= 1.05e-20: tmp = y * (z / a) else: tmp = y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.3e-55) tmp = y; elseif (t <= 1.05e-20) tmp = Float64(y * Float64(z / a)); else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -1.3e-55) tmp = y; elseif (t <= 1.05e-20) tmp = y * (z / a); else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.3e-55], y, If[LessEqual[t, 1.05e-20], N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision], y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.3 \cdot 10^{-55}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq 1.05 \cdot 10^{-20}:\\
\;\;\;\;y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if t < -1.2999999999999999e-55 or 1.0499999999999999e-20 < t Initial program 47.5%
Taylor expanded in a around 0
+-commutativeN/A
mul-1-negN/A
*-commutativeN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
lower-fma.f64N/A
lower--.f64N/A
distribute-neg-fracN/A
mul-1-negN/A
lower-/.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
lower--.f6439.9
Applied rewrites39.9%
Taylor expanded in x around inf
Applied rewrites17.2%
Taylor expanded in z around 0
Applied rewrites38.8%
if -1.2999999999999999e-55 < t < 1.0499999999999999e-20Initial program 88.0%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6495.1
Applied rewrites95.1%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6475.4
Applied rewrites75.4%
Taylor expanded in y around inf
Applied rewrites29.8%
(FPCore (x y z t a) :precision binary64 (if (<= x -1.65e+174) (* z (/ x t)) (if (<= x 6.2e+139) y (* x (/ z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -1.65e+174) {
tmp = z * (x / t);
} else if (x <= 6.2e+139) {
tmp = y;
} else {
tmp = x * (z / t);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (x <= (-1.65d+174)) then
tmp = z * (x / t)
else if (x <= 6.2d+139) then
tmp = y
else
tmp = x * (z / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -1.65e+174) {
tmp = z * (x / t);
} else if (x <= 6.2e+139) {
tmp = y;
} else {
tmp = x * (z / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -1.65e+174: tmp = z * (x / t) elif x <= 6.2e+139: tmp = y else: tmp = x * (z / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -1.65e+174) tmp = Float64(z * Float64(x / t)); elseif (x <= 6.2e+139) tmp = y; else tmp = Float64(x * Float64(z / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -1.65e+174) tmp = z * (x / t); elseif (x <= 6.2e+139) tmp = y; else tmp = x * (z / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -1.65e+174], N[(z * N[(x / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 6.2e+139], y, N[(x * N[(z / t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.65 \cdot 10^{+174}:\\
\;\;\;\;z \cdot \frac{x}{t}\\
\mathbf{elif}\;x \leq 6.2 \cdot 10^{+139}:\\
\;\;\;\;y\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{z}{t}\\
\end{array}
\end{array}
if x < -1.65e174Initial program 62.6%
Taylor expanded in a around 0
+-commutativeN/A
mul-1-negN/A
*-commutativeN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
lower-fma.f64N/A
lower--.f64N/A
distribute-neg-fracN/A
mul-1-negN/A
lower-/.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
lower--.f6433.2
Applied rewrites33.2%
Taylor expanded in x around inf
Applied rewrites36.8%
Applied rewrites45.8%
if -1.65e174 < x < 6.2e139Initial program 68.4%
Taylor expanded in a around 0
+-commutativeN/A
mul-1-negN/A
*-commutativeN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
lower-fma.f64N/A
lower--.f64N/A
distribute-neg-fracN/A
mul-1-negN/A
lower-/.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
lower--.f6434.1
Applied rewrites34.1%
Taylor expanded in x around inf
Applied rewrites11.7%
Taylor expanded in z around 0
Applied rewrites29.5%
if 6.2e139 < x Initial program 60.2%
Taylor expanded in a around 0
+-commutativeN/A
mul-1-negN/A
*-commutativeN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
lower-fma.f64N/A
lower--.f64N/A
distribute-neg-fracN/A
mul-1-negN/A
lower-/.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
lower--.f6429.4
Applied rewrites29.4%
Taylor expanded in x around inf
Applied rewrites36.4%
Applied rewrites44.6%
Final simplification33.5%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* z (/ x t)))) (if (<= x -1.65e+174) t_1 (if (<= x 6.2e+139) y t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = z * (x / t);
double tmp;
if (x <= -1.65e+174) {
tmp = t_1;
} else if (x <= 6.2e+139) {
tmp = y;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = z * (x / t)
if (x <= (-1.65d+174)) then
tmp = t_1
else if (x <= 6.2d+139) then
tmp = y
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = z * (x / t);
double tmp;
if (x <= -1.65e+174) {
tmp = t_1;
} else if (x <= 6.2e+139) {
tmp = y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = z * (x / t) tmp = 0 if x <= -1.65e+174: tmp = t_1 elif x <= 6.2e+139: tmp = y else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(z * Float64(x / t)) tmp = 0.0 if (x <= -1.65e+174) tmp = t_1; elseif (x <= 6.2e+139) tmp = y; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = z * (x / t); tmp = 0.0; if (x <= -1.65e+174) tmp = t_1; elseif (x <= 6.2e+139) tmp = y; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(z * N[(x / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.65e+174], t$95$1, If[LessEqual[x, 6.2e+139], y, t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \frac{x}{t}\\
\mathbf{if}\;x \leq -1.65 \cdot 10^{+174}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 6.2 \cdot 10^{+139}:\\
\;\;\;\;y\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -1.65e174 or 6.2e139 < x Initial program 61.4%
Taylor expanded in a around 0
+-commutativeN/A
mul-1-negN/A
*-commutativeN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
lower-fma.f64N/A
lower--.f64N/A
distribute-neg-fracN/A
mul-1-negN/A
lower-/.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
lower--.f6431.2
Applied rewrites31.2%
Taylor expanded in x around inf
Applied rewrites36.6%
Applied rewrites39.3%
if -1.65e174 < x < 6.2e139Initial program 68.4%
Taylor expanded in a around 0
+-commutativeN/A
mul-1-negN/A
*-commutativeN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
lower-fma.f64N/A
lower--.f64N/A
distribute-neg-fracN/A
mul-1-negN/A
lower-/.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
lower--.f6434.1
Applied rewrites34.1%
Taylor expanded in x around inf
Applied rewrites11.7%
Taylor expanded in z around 0
Applied rewrites29.5%
(FPCore (x y z t a) :precision binary64 y)
double code(double x, double y, double z, double t, double a) {
return y;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = y
end function
public static double code(double x, double y, double z, double t, double a) {
return y;
}
def code(x, y, z, t, a): return y
function code(x, y, z, t, a) return y end
function tmp = code(x, y, z, t, a) tmp = y; end
code[x_, y_, z_, t_, a_] := y
\begin{array}{l}
\\
y
\end{array}
Initial program 66.6%
Taylor expanded in a around 0
+-commutativeN/A
mul-1-negN/A
*-commutativeN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
lower-fma.f64N/A
lower--.f64N/A
distribute-neg-fracN/A
mul-1-negN/A
lower-/.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
lower--.f6433.4
Applied rewrites33.4%
Taylor expanded in x around inf
Applied rewrites18.0%
Taylor expanded in z around 0
Applied rewrites23.9%
(FPCore (x y z t a) :precision binary64 0.0)
double code(double x, double y, double z, double t, double a) {
return 0.0;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = 0.0d0
end function
public static double code(double x, double y, double z, double t, double a) {
return 0.0;
}
def code(x, y, z, t, a): return 0.0
function code(x, y, z, t, a) return 0.0 end
function tmp = code(x, y, z, t, a) tmp = 0.0; end
code[x_, y_, z_, t_, a_] := 0.0
\begin{array}{l}
\\
0
\end{array}
Initial program 66.6%
Taylor expanded in x around inf
+-commutativeN/A
distribute-rgt-inN/A
mul-1-negN/A
distribute-lft-neg-outN/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
*-lft-identityN/A
lower-fma.f64N/A
lower--.f64N/A
distribute-neg-frac2N/A
lower-/.f64N/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
remove-double-negN/A
lower-+.f64N/A
lower-neg.f6445.4
Applied rewrites45.4%
Taylor expanded in t around inf
Applied rewrites2.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (/ (- y x) 1.0) (/ (- z t) (- a t))))))
(if (< a -1.6153062845442575e-142)
t_1
(if (< a 3.774403170083174e-182) (- y (* (/ z t) (- y x))) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((y - x) / 1.0) * ((z - t) / (a - t)));
double tmp;
if (a < -1.6153062845442575e-142) {
tmp = t_1;
} else if (a < 3.774403170083174e-182) {
tmp = y - ((z / t) * (y - x));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + (((y - x) / 1.0d0) * ((z - t) / (a - t)))
if (a < (-1.6153062845442575d-142)) then
tmp = t_1
else if (a < 3.774403170083174d-182) then
tmp = y - ((z / t) * (y - x))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((y - x) / 1.0) * ((z - t) / (a - t)));
double tmp;
if (a < -1.6153062845442575e-142) {
tmp = t_1;
} else if (a < 3.774403170083174e-182) {
tmp = y - ((z / t) * (y - x));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (((y - x) / 1.0) * ((z - t) / (a - t))) tmp = 0 if a < -1.6153062845442575e-142: tmp = t_1 elif a < 3.774403170083174e-182: tmp = y - ((z / t) * (y - x)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(Float64(y - x) / 1.0) * Float64(Float64(z - t) / Float64(a - t)))) tmp = 0.0 if (a < -1.6153062845442575e-142) tmp = t_1; elseif (a < 3.774403170083174e-182) tmp = Float64(y - Float64(Float64(z / t) * Float64(y - x))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (((y - x) / 1.0) * ((z - t) / (a - t))); tmp = 0.0; if (a < -1.6153062845442575e-142) tmp = t_1; elseif (a < 3.774403170083174e-182) tmp = y - ((z / t) * (y - x)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(y - x), $MachinePrecision] / 1.0), $MachinePrecision] * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[a, -1.6153062845442575e-142], t$95$1, If[Less[a, 3.774403170083174e-182], N[(y - N[(N[(z / t), $MachinePrecision] * N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y - x}{1} \cdot \frac{z - t}{a - t}\\
\mathbf{if}\;a < -1.6153062845442575 \cdot 10^{-142}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a < 3.774403170083174 \cdot 10^{-182}:\\
\;\;\;\;y - \frac{z}{t} \cdot \left(y - x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
herbie shell --seed 2024220
(FPCore (x y z t a)
:name "Graphics.Rendering.Chart.Axis.Types:linMap from Chart-1.5.3"
:precision binary64
:alt
(! :herbie-platform default (if (< a -646122513817703/4000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ x (* (/ (- y x) 1) (/ (- z t) (- a t)))) (if (< a 1887201585041587/50000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- y (* (/ z t) (- y x))) (+ x (* (/ (- y x) 1) (/ (- z t) (- a t)))))))
(+ x (/ (* (- y x) (- z t)) (- a t))))