
(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 16 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 -1.32e+109)
t_1
(if (<= t 7.5e+152) (+ x (/ (- y x) (/ (- a t) (- z t)))) 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.32e+109) {
tmp = t_1;
} else if (t <= 7.5e+152) {
tmp = x + ((y - x) / ((a - t) / (z - t)));
} 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.32e+109) tmp = t_1; elseif (t <= 7.5e+152) tmp = Float64(x + Float64(Float64(y - x) / Float64(Float64(a - t) / Float64(z - t)))); 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.32e+109], t$95$1, If[LessEqual[t, 7.5e+152], N[(x + N[(N[(y - x), $MachinePrecision] / N[(N[(a - t), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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.32 \cdot 10^{+109}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 7.5 \cdot 10^{+152}:\\
\;\;\;\;x + \frac{y - x}{\frac{a - t}{z - t}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.32000000000000008e109 or 7.50000000000000046e152 < t Initial program 30.6%
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 rewrites90.8%
if -1.32000000000000008e109 < t < 7.50000000000000046e152Initial program 83.4%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6492.0
Applied rewrites92.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma t (/ (- x y) a) x)) (t_2 (fma (/ z t) (- y) y)))
(if (<= t -250.0)
t_2
(if (<= t -5.2e-116)
t_1
(if (<= t 1.02e-117)
(/ (* z (- y x)) a)
(if (<= t 1.9e-43)
t_1
(if (<= t 9.5e+41) (/ (* z (- x y)) t) t_2)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(t, ((x - y) / a), x);
double t_2 = fma((z / t), -y, y);
double tmp;
if (t <= -250.0) {
tmp = t_2;
} else if (t <= -5.2e-116) {
tmp = t_1;
} else if (t <= 1.02e-117) {
tmp = (z * (y - x)) / a;
} else if (t <= 1.9e-43) {
tmp = t_1;
} else if (t <= 9.5e+41) {
tmp = (z * (x - y)) / t;
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(t, Float64(Float64(x - y) / a), x) t_2 = fma(Float64(z / t), Float64(-y), y) tmp = 0.0 if (t <= -250.0) tmp = t_2; elseif (t <= -5.2e-116) tmp = t_1; elseif (t <= 1.02e-117) tmp = Float64(Float64(z * Float64(y - x)) / a); elseif (t <= 1.9e-43) tmp = t_1; elseif (t <= 9.5e+41) tmp = Float64(Float64(z * Float64(x - y)) / t); else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(N[(x - y), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision]}, Block[{t$95$2 = N[(N[(z / t), $MachinePrecision] * (-y) + y), $MachinePrecision]}, If[LessEqual[t, -250.0], t$95$2, If[LessEqual[t, -5.2e-116], t$95$1, If[LessEqual[t, 1.02e-117], N[(N[(z * N[(y - x), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[t, 1.9e-43], t$95$1, If[LessEqual[t, 9.5e+41], N[(N[(z * N[(x - y), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(t, \frac{x - y}{a}, x\right)\\
t_2 := \mathsf{fma}\left(\frac{z}{t}, -y, y\right)\\
\mathbf{if}\;t \leq -250:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -5.2 \cdot 10^{-116}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.02 \cdot 10^{-117}:\\
\;\;\;\;\frac{z \cdot \left(y - x\right)}{a}\\
\mathbf{elif}\;t \leq 1.9 \cdot 10^{-43}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 9.5 \cdot 10^{+41}:\\
\;\;\;\;\frac{z \cdot \left(x - y\right)}{t}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -250 or 9.4999999999999996e41 < t Initial program 44.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--.f6450.9
Applied rewrites50.9%
Taylor expanded in x around inf
Applied rewrites12.1%
Taylor expanded in x around 0
Applied rewrites59.2%
if -250 < t < -5.2000000000000001e-116 or 1.01999999999999993e-117 < t < 1.89999999999999985e-43Initial program 89.9%
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--.f6455.6
Applied rewrites55.6%
Taylor expanded in t around 0
Applied rewrites55.9%
if -5.2000000000000001e-116 < t < 1.01999999999999993e-117Initial program 93.9%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
clear-numN/A
associate-/r/N/A
lower-fma.f64N/A
lower-/.f6493.8
Applied rewrites93.8%
Taylor expanded in z around inf
div-subN/A
associate-/l*N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6464.0
Applied rewrites64.0%
Taylor expanded in a around inf
Applied rewrites54.8%
if 1.89999999999999985e-43 < t < 9.4999999999999996e41Initial program 80.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--.f6461.6
Applied rewrites61.6%
Taylor expanded in z around inf
Applied rewrites55.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (- x y) (/ (- z a) t) y)))
(if (<= t -1.32e+109)
t_1
(if (<= t 7.5e+152) (fma (* (- z t) (/ 1.0 (- 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.32e+109) {
tmp = t_1;
} else if (t <= 7.5e+152) {
tmp = fma(((z - t) * (1.0 / (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.32e+109) tmp = t_1; elseif (t <= 7.5e+152) tmp = fma(Float64(Float64(z - t) * Float64(1.0 / 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.32e+109], t$95$1, If[LessEqual[t, 7.5e+152], N[(N[(N[(z - t), $MachinePrecision] * N[(1.0 / N[(a - t), $MachinePrecision]), $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.32 \cdot 10^{+109}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 7.5 \cdot 10^{+152}:\\
\;\;\;\;\mathsf{fma}\left(\left(z - t\right) \cdot \frac{1}{a - t}, y - x, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.32000000000000008e109 or 7.50000000000000046e152 < t Initial program 30.6%
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 rewrites90.8%
if -1.32000000000000008e109 < t < 7.50000000000000046e152Initial program 83.4%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
clear-numN/A
associate-/r/N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-/.f6490.9
Applied rewrites90.9%
Final simplification90.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma z (/ (- x y) t) y)))
(if (<= t -2.7e+265)
(fma a (/ (- y x) t) y)
(if (<= t -1.8e+53)
t_1
(if (<= t 4.6e-43) (fma (/ z a) (- y x) x) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(z, ((x - y) / t), y);
double tmp;
if (t <= -2.7e+265) {
tmp = fma(a, ((y - x) / t), y);
} else if (t <= -1.8e+53) {
tmp = t_1;
} else if (t <= 4.6e-43) {
tmp = fma((z / a), (y - x), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(z, Float64(Float64(x - y) / t), y) tmp = 0.0 if (t <= -2.7e+265) tmp = fma(a, Float64(Float64(y - x) / t), y); elseif (t <= -1.8e+53) tmp = t_1; elseif (t <= 4.6e-43) 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[(z * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision]}, If[LessEqual[t, -2.7e+265], N[(a * N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision], If[LessEqual[t, -1.8e+53], t$95$1, If[LessEqual[t, 4.6e-43], 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(z, \frac{x - y}{t}, y\right)\\
\mathbf{if}\;t \leq -2.7 \cdot 10^{+265}:\\
\;\;\;\;\mathsf{fma}\left(a, \frac{y - x}{t}, y\right)\\
\mathbf{elif}\;t \leq -1.8 \cdot 10^{+53}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 4.6 \cdot 10^{-43}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{a}, y - x, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -2.69999999999999984e265Initial program 11.2%
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--.f6465.5
Applied rewrites65.5%
Taylor expanded in t around inf
Applied rewrites94.1%
Applied rewrites94.1%
if -2.69999999999999984e265 < t < -1.8e53 or 4.5999999999999998e-43 < t Initial program 50.8%
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--.f6451.6
Applied rewrites51.6%
Taylor expanded in x around inf
Applied rewrites16.7%
Taylor expanded in z around 0
Applied rewrites74.1%
if -1.8e53 < t < 4.5999999999999998e-43Initial program 90.1%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
clear-numN/A
associate-/r/N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-/.f6494.2
Applied rewrites94.2%
Taylor expanded in t around 0
lower-/.f6475.5
Applied rewrites75.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma z (/ (- x y) t) y)))
(if (<= t -2.7e+265)
(fma a (/ (- y x) t) y)
(if (<= t -1.8e+53)
t_1
(if (<= t 4.6e-43) (fma z (/ (- y x) a) x) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(z, ((x - y) / t), y);
double tmp;
if (t <= -2.7e+265) {
tmp = fma(a, ((y - x) / t), y);
} else if (t <= -1.8e+53) {
tmp = t_1;
} else if (t <= 4.6e-43) {
tmp = fma(z, ((y - x) / a), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(z, Float64(Float64(x - y) / t), y) tmp = 0.0 if (t <= -2.7e+265) tmp = fma(a, Float64(Float64(y - x) / t), y); elseif (t <= -1.8e+53) tmp = t_1; elseif (t <= 4.6e-43) tmp = fma(z, Float64(Float64(y - x) / a), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(z * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision]}, If[LessEqual[t, -2.7e+265], N[(a * N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision], If[LessEqual[t, -1.8e+53], t$95$1, If[LessEqual[t, 4.6e-43], N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(z, \frac{x - y}{t}, y\right)\\
\mathbf{if}\;t \leq -2.7 \cdot 10^{+265}:\\
\;\;\;\;\mathsf{fma}\left(a, \frac{y - x}{t}, y\right)\\
\mathbf{elif}\;t \leq -1.8 \cdot 10^{+53}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 4.6 \cdot 10^{-43}:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{y - x}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -2.69999999999999984e265Initial program 11.2%
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--.f6465.5
Applied rewrites65.5%
Taylor expanded in t around inf
Applied rewrites94.1%
Applied rewrites94.1%
if -2.69999999999999984e265 < t < -1.8e53 or 4.5999999999999998e-43 < t Initial program 50.8%
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--.f6451.6
Applied rewrites51.6%
Taylor expanded in x around inf
Applied rewrites16.7%
Taylor expanded in z around 0
Applied rewrites74.1%
if -1.8e53 < t < 4.5999999999999998e-43Initial program 90.1%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6472.4
Applied rewrites72.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (- x y) (/ (- z a) t) y)))
(if (<= t -1.32e+109)
t_1
(if (<= t 5.2e+71) (fma (- z t) (/ (- y x) (- a t)) 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.32e+109) {
tmp = t_1;
} else if (t <= 5.2e+71) {
tmp = fma((z - t), ((y - x) / (a - t)), 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.32e+109) tmp = t_1; elseif (t <= 5.2e+71) tmp = fma(Float64(z - t), Float64(Float64(y - x) / Float64(a - t)), 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.32e+109], t$95$1, If[LessEqual[t, 5.2e+71], N[(N[(z - t), $MachinePrecision] * N[(N[(y - x), $MachinePrecision] / N[(a - t), $MachinePrecision]), $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.32 \cdot 10^{+109}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 5.2 \cdot 10^{+71}:\\
\;\;\;\;\mathsf{fma}\left(z - t, \frac{y - x}{a - t}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.32000000000000008e109 or 5.19999999999999983e71 < t Initial program 37.2%
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 rewrites88.6%
if -1.32000000000000008e109 < t < 5.19999999999999983e71Initial program 85.6%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6489.5
Applied rewrites89.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (/ z t) (- y) y)))
(if (<= t -2.4e-77)
t_1
(if (<= t 2.5e-85)
(/ (* z (- y x)) a)
(if (<= t 9.5e+41) (/ (* z (- x y)) t) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((z / t), -y, y);
double tmp;
if (t <= -2.4e-77) {
tmp = t_1;
} else if (t <= 2.5e-85) {
tmp = (z * (y - x)) / a;
} else if (t <= 9.5e+41) {
tmp = (z * (x - y)) / t;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(z / t), Float64(-y), y) tmp = 0.0 if (t <= -2.4e-77) tmp = t_1; elseif (t <= 2.5e-85) tmp = Float64(Float64(z * Float64(y - x)) / a); elseif (t <= 9.5e+41) 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[(N[(z / t), $MachinePrecision] * (-y) + y), $MachinePrecision]}, If[LessEqual[t, -2.4e-77], t$95$1, If[LessEqual[t, 2.5e-85], N[(N[(z * N[(y - x), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[t, 9.5e+41], N[(N[(z * N[(x - y), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{z}{t}, -y, y\right)\\
\mathbf{if}\;t \leq -2.4 \cdot 10^{-77}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.5 \cdot 10^{-85}:\\
\;\;\;\;\frac{z \cdot \left(y - x\right)}{a}\\
\mathbf{elif}\;t \leq 9.5 \cdot 10^{+41}:\\
\;\;\;\;\frac{z \cdot \left(x - y\right)}{t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -2.3999999999999999e-77 or 9.4999999999999996e41 < t Initial program 46.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--.f6449.4
Applied rewrites49.4%
Taylor expanded in x around inf
Applied rewrites12.3%
Taylor expanded in x around 0
Applied rewrites57.0%
if -2.3999999999999999e-77 < t < 2.5000000000000001e-85Initial program 95.3%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
clear-numN/A
associate-/r/N/A
lower-fma.f64N/A
lower-/.f6495.2
Applied rewrites95.2%
Taylor expanded in z around inf
div-subN/A
associate-/l*N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6459.6
Applied rewrites59.6%
Taylor expanded in a around inf
Applied rewrites49.8%
if 2.5000000000000001e-85 < t < 9.4999999999999996e41Initial program 86.7%
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--.f6452.2
Applied rewrites52.2%
Taylor expanded in z around inf
Applied rewrites48.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (/ z t) (- y) y)))
(if (<= t -2.3e-89)
t_1
(if (<= t 1.45e-85)
(* y (/ z (- a t)))
(if (<= t 9.5e+41) (/ (* z (- x y)) t) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((z / t), -y, y);
double tmp;
if (t <= -2.3e-89) {
tmp = t_1;
} else if (t <= 1.45e-85) {
tmp = y * (z / (a - t));
} else if (t <= 9.5e+41) {
tmp = (z * (x - y)) / t;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(z / t), Float64(-y), y) tmp = 0.0 if (t <= -2.3e-89) tmp = t_1; elseif (t <= 1.45e-85) tmp = Float64(y * Float64(z / Float64(a - t))); elseif (t <= 9.5e+41) 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[(N[(z / t), $MachinePrecision] * (-y) + y), $MachinePrecision]}, If[LessEqual[t, -2.3e-89], t$95$1, If[LessEqual[t, 1.45e-85], N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9.5e+41], N[(N[(z * N[(x - y), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{z}{t}, -y, y\right)\\
\mathbf{if}\;t \leq -2.3 \cdot 10^{-89}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.45 \cdot 10^{-85}:\\
\;\;\;\;y \cdot \frac{z}{a - t}\\
\mathbf{elif}\;t \leq 9.5 \cdot 10^{+41}:\\
\;\;\;\;\frac{z \cdot \left(x - y\right)}{t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -2.3e-89 or 9.4999999999999996e41 < t Initial program 47.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--.f6449.1
Applied rewrites49.1%
Taylor expanded in x around inf
Applied rewrites12.8%
Taylor expanded in x around 0
Applied rewrites56.5%
if -2.3e-89 < t < 1.4500000000000001e-85Initial program 95.1%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
clear-numN/A
associate-/r/N/A
lower-fma.f64N/A
lower-/.f6495.0
Applied rewrites95.0%
Taylor expanded in z around inf
div-subN/A
associate-/l*N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6459.3
Applied rewrites59.3%
Taylor expanded in y around inf
Applied rewrites38.5%
if 1.4500000000000001e-85 < t < 9.4999999999999996e41Initial program 86.7%
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--.f6452.2
Applied rewrites52.2%
Taylor expanded in z around inf
Applied rewrites48.1%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma (- x y) (/ (- z a) t) y))) (if (<= t -1.8e+53) t_1 (if (<= t 4.6e-43) (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.8e+53) {
tmp = t_1;
} else if (t <= 4.6e-43) {
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.8e+53) tmp = t_1; elseif (t <= 4.6e-43) 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.8e+53], t$95$1, If[LessEqual[t, 4.6e-43], 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.8 \cdot 10^{+53}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 4.6 \cdot 10^{-43}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{a}, y - x, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.8e53 or 4.5999999999999998e-43 < t Initial program 46.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.2%
if -1.8e53 < t < 4.5999999999999998e-43Initial program 90.1%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
clear-numN/A
associate-/r/N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-/.f6494.2
Applied rewrites94.2%
Taylor expanded in t around 0
lower-/.f6475.5
Applied rewrites75.5%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma z (/ (- x y) t) y))) (if (<= t -1.8e+53) t_1 (if (<= t 4.6e-43) (fma z (/ (- y x) a) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(z, ((x - y) / t), y);
double tmp;
if (t <= -1.8e+53) {
tmp = t_1;
} else if (t <= 4.6e-43) {
tmp = fma(z, ((y - x) / a), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(z, Float64(Float64(x - y) / t), y) tmp = 0.0 if (t <= -1.8e+53) tmp = t_1; elseif (t <= 4.6e-43) tmp = fma(z, Float64(Float64(y - x) / a), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(z * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision]}, If[LessEqual[t, -1.8e+53], t$95$1, If[LessEqual[t, 4.6e-43], N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(z, \frac{x - y}{t}, y\right)\\
\mathbf{if}\;t \leq -1.8 \cdot 10^{+53}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 4.6 \cdot 10^{-43}:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{y - x}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.8e53 or 4.5999999999999998e-43 < t Initial program 46.7%
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--.f6452.3
Applied rewrites52.3%
Taylor expanded in x around inf
Applied rewrites15.3%
Taylor expanded in z around 0
Applied rewrites73.2%
if -1.8e53 < t < 4.5999999999999998e-43Initial program 90.1%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6472.4
Applied rewrites72.4%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma t (/ (- x y) a) x))) (if (<= a -1.18e+24) t_1 (if (<= a 2.8e+139) (fma z (/ (- x y) t) y) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(t, ((x - y) / a), x);
double tmp;
if (a <= -1.18e+24) {
tmp = t_1;
} else if (a <= 2.8e+139) {
tmp = fma(z, ((x - y) / t), y);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(t, Float64(Float64(x - y) / a), x) tmp = 0.0 if (a <= -1.18e+24) tmp = t_1; elseif (a <= 2.8e+139) tmp = fma(z, Float64(Float64(x - y) / t), y); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(N[(x - y), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -1.18e+24], t$95$1, If[LessEqual[a, 2.8e+139], N[(z * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(t, \frac{x - y}{a}, x\right)\\
\mathbf{if}\;a \leq -1.18 \cdot 10^{+24}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 2.8 \cdot 10^{+139}:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{x - y}{t}, y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -1.17999999999999997e24 or 2.7999999999999998e139 < a Initial program 69.6%
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--.f6463.5
Applied rewrites63.5%
Taylor expanded in t around 0
Applied rewrites53.7%
if -1.17999999999999997e24 < a < 2.7999999999999998e139Initial program 65.7%
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--.f6450.9
Applied rewrites50.9%
Taylor expanded in x around inf
Applied rewrites19.6%
Taylor expanded in z around 0
Applied rewrites68.1%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma (/ z t) (- y) y))) (if (<= t -4.5e+20) t_1 (if (<= t 9.5e+41) (/ (* z (- x y)) t) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((z / t), -y, y);
double tmp;
if (t <= -4.5e+20) {
tmp = t_1;
} else if (t <= 9.5e+41) {
tmp = (z * (x - y)) / t;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(z / t), Float64(-y), y) tmp = 0.0 if (t <= -4.5e+20) tmp = t_1; elseif (t <= 9.5e+41) 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[(N[(z / t), $MachinePrecision] * (-y) + y), $MachinePrecision]}, If[LessEqual[t, -4.5e+20], t$95$1, If[LessEqual[t, 9.5e+41], N[(N[(z * N[(x - y), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{z}{t}, -y, y\right)\\
\mathbf{if}\;t \leq -4.5 \cdot 10^{+20}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 9.5 \cdot 10^{+41}:\\
\;\;\;\;\frac{z \cdot \left(x - y\right)}{t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -4.5e20 or 9.4999999999999996e41 < t Initial program 44.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--.f6450.5
Applied rewrites50.5%
Taylor expanded in x around inf
Applied rewrites11.4%
Taylor expanded in x around 0
Applied rewrites59.6%
if -4.5e20 < t < 9.4999999999999996e41Initial program 91.1%
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--.f6427.7
Applied rewrites27.7%
Taylor expanded in z around inf
Applied rewrites28.1%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (/ (* z (- x y)) t))) (if (<= z -5.6e+83) t_1 (if (<= z 1.62e+44) (fma a (/ y t) y) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (z * (x - y)) / t;
double tmp;
if (z <= -5.6e+83) {
tmp = t_1;
} else if (z <= 1.62e+44) {
tmp = fma(a, (y / t), y);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(z * Float64(x - y)) / t) tmp = 0.0 if (z <= -5.6e+83) tmp = t_1; elseif (z <= 1.62e+44) tmp = fma(a, Float64(y / t), y); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z * N[(x - y), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]}, If[LessEqual[z, -5.6e+83], t$95$1, If[LessEqual[z, 1.62e+44], N[(a * N[(y / t), $MachinePrecision] + y), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z \cdot \left(x - y\right)}{t}\\
\mathbf{if}\;z \leq -5.6 \cdot 10^{+83}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.62 \cdot 10^{+44}:\\
\;\;\;\;\mathsf{fma}\left(a, \frac{y}{t}, y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -5.6000000000000001e83 or 1.6199999999999999e44 < z Initial program 73.7%
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--.f6451.9
Applied rewrites51.9%
Taylor expanded in z around inf
Applied rewrites39.8%
if -5.6000000000000001e83 < z < 1.6199999999999999e44Initial program 62.5%
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--.f6461.5
Applied rewrites61.5%
Taylor expanded in x around 0
Applied rewrites40.3%
Taylor expanded in t around inf
Applied rewrites42.1%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* x (/ z t)))) (if (<= z -2.2e+63) t_1 (if (<= z 1.68e+44) (fma a (/ y t) y) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x * (z / t);
double tmp;
if (z <= -2.2e+63) {
tmp = t_1;
} else if (z <= 1.68e+44) {
tmp = fma(a, (y / t), y);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(x * Float64(z / t)) tmp = 0.0 if (z <= -2.2e+63) tmp = t_1; elseif (z <= 1.68e+44) tmp = fma(a, Float64(y / t), y); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(z / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.2e+63], t$95$1, If[LessEqual[z, 1.68e+44], N[(a * N[(y / t), $MachinePrecision] + y), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{z}{t}\\
\mathbf{if}\;z \leq -2.2 \cdot 10^{+63}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.68 \cdot 10^{+44}:\\
\;\;\;\;\mathsf{fma}\left(a, \frac{y}{t}, y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.1999999999999999e63 or 1.68000000000000001e44 < z Initial program 73.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--.f6449.6
Applied rewrites49.6%
Taylor expanded in x around inf
Applied rewrites34.7%
if -2.1999999999999999e63 < z < 1.68000000000000001e44Initial program 62.5%
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--.f6461.5
Applied rewrites61.5%
Taylor expanded in x around 0
Applied rewrites41.0%
Taylor expanded in t around inf
Applied rewrites42.8%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* x (/ z t)))) (if (<= z -3e+41) t_1 (if (<= z 1.76e+31) y t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x * (z / t);
double tmp;
if (z <= -3e+41) {
tmp = t_1;
} else if (z <= 1.76e+31) {
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 = x * (z / t)
if (z <= (-3d+41)) then
tmp = t_1
else if (z <= 1.76d+31) 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 = x * (z / t);
double tmp;
if (z <= -3e+41) {
tmp = t_1;
} else if (z <= 1.76e+31) {
tmp = y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x * (z / t) tmp = 0 if z <= -3e+41: tmp = t_1 elif z <= 1.76e+31: tmp = y else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x * Float64(z / t)) tmp = 0.0 if (z <= -3e+41) tmp = t_1; elseif (z <= 1.76e+31) tmp = y; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x * (z / t); tmp = 0.0; if (z <= -3e+41) tmp = t_1; elseif (z <= 1.76e+31) tmp = y; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(z / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3e+41], t$95$1, If[LessEqual[z, 1.76e+31], y, t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{z}{t}\\
\mathbf{if}\;z \leq -3 \cdot 10^{+41}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.76 \cdot 10^{+31}:\\
\;\;\;\;y\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.9999999999999998e41 or 1.76e31 < z Initial program 74.0%
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--.f6449.3
Applied rewrites49.3%
Taylor expanded in x around inf
Applied rewrites34.4%
if -2.9999999999999998e41 < z < 1.76e31Initial program 61.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--.f6460.9
Applied rewrites60.9%
Taylor expanded in t around inf
Applied rewrites42.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.9%
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--.f6445.1
Applied rewrites45.1%
Taylor expanded in t around inf
Applied rewrites29.5%
(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 2024221
(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))))