
(FPCore (x y z t a) :precision binary64 (+ x (* (- y z) (/ (- t x) (- a z)))))
double code(double x, double y, double z, double t, double a) {
return x + ((y - z) * ((t - x) / (a - z)));
}
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 - z) * ((t - x) / (a - z)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y - z) * ((t - x) / (a - z)));
}
def code(x, y, z, t, a): return x + ((y - z) * ((t - x) / (a - z)))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y - z) * ((t - x) / (a - z))); 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]
\begin{array}{l}
\\
x + \left(y - z\right) \cdot \frac{t - x}{a - z}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 19 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (* (- y z) (/ (- t x) (- a z)))))
double code(double x, double y, double z, double t, double a) {
return x + ((y - z) * ((t - x) / (a - z)));
}
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 - z) * ((t - x) / (a - z)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y - z) * ((t - x) / (a - z)));
}
def code(x, y, z, t, a): return x + ((y - z) * ((t - x) / (a - z)))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y - z) * ((t - x) / (a - z))); 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]
\begin{array}{l}
\\
x + \left(y - z\right) \cdot \frac{t - x}{a - z}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (/ (- y z) (- a z)) (- t x) x))
(t_2 (+ (* (/ (- t x) (- a z)) (- y z)) x)))
(if (<= t_2 -4e-302) t_1 (if (<= t_2 2e-275) (fma (/ x z) (- y a) t) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(((y - z) / (a - z)), (t - x), x);
double t_2 = (((t - x) / (a - z)) * (y - z)) + x;
double tmp;
if (t_2 <= -4e-302) {
tmp = t_1;
} else if (t_2 <= 2e-275) {
tmp = fma((x / z), (y - a), t);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(Float64(y - z) / Float64(a - z)), Float64(t - x), x) t_2 = Float64(Float64(Float64(Float64(t - x) / Float64(a - z)) * Float64(y - z)) + x) tmp = 0.0 if (t_2 <= -4e-302) tmp = t_1; elseif (t_2 <= 2e-275) tmp = fma(Float64(x / z), Float64(y - a), t); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] * N[(y - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[t$95$2, -4e-302], t$95$1, If[LessEqual[t$95$2, 2e-275], N[(N[(x / z), $MachinePrecision] * N[(y - a), $MachinePrecision] + t), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)\\
t_2 := \frac{t - x}{a - z} \cdot \left(y - z\right) + x\\
\mathbf{if}\;t\_2 \leq -4 \cdot 10^{-302}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{-275}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x}{z}, y - a, t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -3.9999999999999999e-302 or 1.99999999999999987e-275 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 87.1%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
lift--.f64N/A
flip--N/A
clear-numN/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-fma.f64N/A
lower-/.f6493.7
Applied rewrites93.7%
if -3.9999999999999999e-302 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 1.99999999999999987e-275Initial program 3.4%
Taylor expanded in z 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 rewrites99.6%
Applied rewrites99.6%
Applied rewrites99.8%
Taylor expanded in x around inf
Applied rewrites99.8%
Final simplification94.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (/ (- x t) (- z a)) (- y z) x))
(t_2 (+ (* (/ (- t x) (- a z)) (- y z)) x)))
(if (<= t_2 -1e-110)
t_1
(if (<= t_2 2e-275) (fma (/ (- x t) z) (- y a) t) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(((x - t) / (z - a)), (y - z), x);
double t_2 = (((t - x) / (a - z)) * (y - z)) + x;
double tmp;
if (t_2 <= -1e-110) {
tmp = t_1;
} else if (t_2 <= 2e-275) {
tmp = fma(((x - t) / z), (y - a), t);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(Float64(x - t) / Float64(z - a)), Float64(y - z), x) t_2 = Float64(Float64(Float64(Float64(t - x) / Float64(a - z)) * Float64(y - z)) + x) tmp = 0.0 if (t_2 <= -1e-110) tmp = t_1; elseif (t_2 <= 2e-275) tmp = fma(Float64(Float64(x - t) / z), Float64(y - a), t); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(x - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision] * N[(y - z), $MachinePrecision] + x), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] * N[(y - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[t$95$2, -1e-110], t$95$1, If[LessEqual[t$95$2, 2e-275], N[(N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision] * N[(y - a), $MachinePrecision] + t), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{x - t}{z - a}, y - z, x\right)\\
t_2 := \frac{t - x}{a - z} \cdot \left(y - z\right) + x\\
\mathbf{if}\;t\_2 \leq -1 \cdot 10^{-110}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{-275}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x - t}{z}, y - a, t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -1.0000000000000001e-110 or 1.99999999999999987e-275 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 89.5%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6489.5
lift-/.f64N/A
frac-2negN/A
lower-/.f64N/A
neg-sub0N/A
lift--.f64N/A
sub-negN/A
+-commutativeN/A
associate--r+N/A
neg-sub0N/A
remove-double-negN/A
lower--.f64N/A
neg-sub0N/A
lift--.f64N/A
sub-negN/A
+-commutativeN/A
associate--r+N/A
neg-sub0N/A
remove-double-negN/A
lower--.f6489.5
Applied rewrites89.5%
if -1.0000000000000001e-110 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 1.99999999999999987e-275Initial program 14.7%
Taylor expanded in z 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 rewrites91.6%
Applied rewrites91.6%
Applied rewrites91.9%
Final simplification89.8%
(FPCore (x y z t a) :precision binary64 (if (<= (+ (* (/ (- t x) (- a z)) (- y z)) x) 1e+286) (+ (- t x) x) (* (/ t z) a)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (((((t - x) / (a - z)) * (y - z)) + x) <= 1e+286) {
tmp = (t - x) + x;
} else {
tmp = (t / z) * a;
}
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 - x) / (a - z)) * (y - z)) + x) <= 1d+286) then
tmp = (t - x) + x
else
tmp = (t / z) * a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (((((t - x) / (a - z)) * (y - z)) + x) <= 1e+286) {
tmp = (t - x) + x;
} else {
tmp = (t / z) * a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if ((((t - x) / (a - z)) * (y - z)) + x) <= 1e+286: tmp = (t - x) + x else: tmp = (t / z) * a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(Float64(Float64(Float64(t - x) / Float64(a - z)) * Float64(y - z)) + x) <= 1e+286) tmp = Float64(Float64(t - x) + x); else tmp = Float64(Float64(t / z) * a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (((((t - x) / (a - z)) * (y - z)) + x) <= 1e+286) tmp = (t - x) + x; else tmp = (t / z) * a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(N[(N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] * N[(y - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], 1e+286], N[(N[(t - x), $MachinePrecision] + x), $MachinePrecision], N[(N[(t / z), $MachinePrecision] * a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{t - x}{a - z} \cdot \left(y - z\right) + x \leq 10^{+286}:\\
\;\;\;\;\left(t - x\right) + x\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{z} \cdot a\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 1.00000000000000003e286Initial program 78.3%
Taylor expanded in z around inf
lower--.f6424.1
Applied rewrites24.1%
if 1.00000000000000003e286 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 82.9%
Taylor expanded in z 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 rewrites56.0%
Applied rewrites56.0%
Taylor expanded in a around inf
Applied rewrites27.8%
Taylor expanded in x around 0
Applied rewrites20.4%
Final simplification23.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (/ (- y a) z) (- x t) t)))
(if (<= z -7.5e-29)
t_1
(if (<= z 1.2e-41) (fma (/ (- y z) a) (- t x) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(((y - a) / z), (x - t), t);
double tmp;
if (z <= -7.5e-29) {
tmp = t_1;
} else if (z <= 1.2e-41) {
tmp = fma(((y - z) / a), (t - x), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(Float64(y - a) / z), Float64(x - t), t) tmp = 0.0 if (z <= -7.5e-29) tmp = t_1; elseif (z <= 1.2e-41) tmp = fma(Float64(Float64(y - z) / a), Float64(t - x), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision] * N[(x - t), $MachinePrecision] + t), $MachinePrecision]}, If[LessEqual[z, -7.5e-29], t$95$1, If[LessEqual[z, 1.2e-41], N[(N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{y - a}{z}, x - t, t\right)\\
\mathbf{if}\;z \leq -7.5 \cdot 10^{-29}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.2 \cdot 10^{-41}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y - z}{a}, t - x, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -7.50000000000000006e-29 or 1.20000000000000011e-41 < z Initial program 69.5%
Taylor expanded in z 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 rewrites76.7%
Applied rewrites76.7%
if -7.50000000000000006e-29 < z < 1.20000000000000011e-41Initial program 90.0%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
lift--.f64N/A
flip--N/A
clear-numN/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-fma.f64N/A
lower-/.f6497.1
Applied rewrites97.1%
Taylor expanded in a around inf
lower-/.f64N/A
lower--.f6482.1
Applied rewrites82.1%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma (/ (- y a) z) (- x t) t))) (if (<= z -7.2e-29) t_1 (if (<= z 1.2e-41) (fma (/ y a) (- t x) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(((y - a) / z), (x - t), t);
double tmp;
if (z <= -7.2e-29) {
tmp = t_1;
} else if (z <= 1.2e-41) {
tmp = fma((y / a), (t - x), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(Float64(y - a) / z), Float64(x - t), t) tmp = 0.0 if (z <= -7.2e-29) tmp = t_1; elseif (z <= 1.2e-41) tmp = fma(Float64(y / a), Float64(t - x), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision] * N[(x - t), $MachinePrecision] + t), $MachinePrecision]}, If[LessEqual[z, -7.2e-29], t$95$1, If[LessEqual[z, 1.2e-41], N[(N[(y / a), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{y - a}{z}, x - t, t\right)\\
\mathbf{if}\;z \leq -7.2 \cdot 10^{-29}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.2 \cdot 10^{-41}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{a}, t - x, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -7.19999999999999948e-29 or 1.20000000000000011e-41 < z Initial program 69.5%
Taylor expanded in z 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 rewrites76.7%
Applied rewrites76.7%
if -7.19999999999999948e-29 < z < 1.20000000000000011e-41Initial program 90.0%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
lift--.f64N/A
flip--N/A
clear-numN/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-fma.f64N/A
lower-/.f6497.1
Applied rewrites97.1%
Taylor expanded in z around 0
lower-/.f6479.5
Applied rewrites79.5%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma (/ (- x t) z) (- y a) t))) (if (<= z -8.8e-29) t_1 (if (<= z 1.25e-41) (fma (/ y a) (- t x) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(((x - t) / z), (y - a), t);
double tmp;
if (z <= -8.8e-29) {
tmp = t_1;
} else if (z <= 1.25e-41) {
tmp = fma((y / a), (t - x), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(Float64(x - t) / z), Float64(y - a), t) tmp = 0.0 if (z <= -8.8e-29) tmp = t_1; elseif (z <= 1.25e-41) tmp = fma(Float64(y / a), Float64(t - x), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision] * N[(y - a), $MachinePrecision] + t), $MachinePrecision]}, If[LessEqual[z, -8.8e-29], t$95$1, If[LessEqual[z, 1.25e-41], N[(N[(y / a), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{x - t}{z}, y - a, t\right)\\
\mathbf{if}\;z \leq -8.8 \cdot 10^{-29}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.25 \cdot 10^{-41}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{a}, t - x, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -8.79999999999999961e-29 or 1.2499999999999999e-41 < z Initial program 69.5%
Taylor expanded in z 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 rewrites76.7%
Applied rewrites76.7%
Applied rewrites75.0%
if -8.79999999999999961e-29 < z < 1.2499999999999999e-41Initial program 90.0%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
lift--.f64N/A
flip--N/A
clear-numN/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-fma.f64N/A
lower-/.f6497.1
Applied rewrites97.1%
Taylor expanded in z around 0
lower-/.f6479.5
Applied rewrites79.5%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma (- y z) (/ (- t x) a) x))) (if (<= a -2.55e-42) t_1 (if (<= a 2.45e-32) (fma (/ y z) (- x t) t) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((y - z), ((t - x) / a), x);
double tmp;
if (a <= -2.55e-42) {
tmp = t_1;
} else if (a <= 2.45e-32) {
tmp = fma((y / z), (x - t), t);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(y - z), Float64(Float64(t - x) / a), x) tmp = 0.0 if (a <= -2.55e-42) tmp = t_1; elseif (a <= 2.45e-32) tmp = fma(Float64(y / z), Float64(x - t), t); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -2.55e-42], t$95$1, If[LessEqual[a, 2.45e-32], N[(N[(y / z), $MachinePrecision] * N[(x - t), $MachinePrecision] + t), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(y - z, \frac{t - x}{a}, x\right)\\
\mathbf{if}\;a \leq -2.55 \cdot 10^{-42}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 2.45 \cdot 10^{-32}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{z}, x - t, t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -2.55e-42 or 2.4499999999999999e-32 < a Initial program 86.6%
Taylor expanded in a around inf
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6470.1
Applied rewrites70.1%
if -2.55e-42 < a < 2.4499999999999999e-32Initial program 69.6%
Taylor expanded in z 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 rewrites82.7%
Applied rewrites82.7%
Taylor expanded in y around inf
Applied rewrites78.7%
(FPCore (x y z t a) :precision binary64 (if (<= z -0.35) (fma (/ y z) (- x t) t) (if (<= z 5.5e-18) (fma (/ y a) (- t x) x) (fma (/ x z) (- y a) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -0.35) {
tmp = fma((y / z), (x - t), t);
} else if (z <= 5.5e-18) {
tmp = fma((y / a), (t - x), x);
} else {
tmp = fma((x / z), (y - a), t);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -0.35) tmp = fma(Float64(y / z), Float64(x - t), t); elseif (z <= 5.5e-18) tmp = fma(Float64(y / a), Float64(t - x), x); else tmp = fma(Float64(x / z), Float64(y - a), t); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -0.35], N[(N[(y / z), $MachinePrecision] * N[(x - t), $MachinePrecision] + t), $MachinePrecision], If[LessEqual[z, 5.5e-18], N[(N[(y / a), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision], N[(N[(x / z), $MachinePrecision] * N[(y - a), $MachinePrecision] + t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.35:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{z}, x - t, t\right)\\
\mathbf{elif}\;z \leq 5.5 \cdot 10^{-18}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{a}, t - x, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x}{z}, y - a, t\right)\\
\end{array}
\end{array}
if z < -0.34999999999999998Initial program 74.3%
Taylor expanded in z 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 rewrites72.4%
Applied rewrites72.4%
Taylor expanded in y around inf
Applied rewrites66.1%
if -0.34999999999999998 < z < 5.5e-18Initial program 88.5%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
lift--.f64N/A
flip--N/A
clear-numN/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-fma.f64N/A
lower-/.f6495.8
Applied rewrites95.8%
Taylor expanded in z around 0
lower-/.f6477.3
Applied rewrites77.3%
if 5.5e-18 < z Initial program 64.8%
Taylor expanded in z 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 rewrites80.8%
Applied rewrites80.8%
Applied rewrites80.4%
Taylor expanded in x around inf
Applied rewrites73.4%
(FPCore (x y z t a) :precision binary64 (if (<= z -0.35) (fma (/ y z) (- x t) t) (if (<= z 5.5e-18) (fma (/ (- t x) a) y x) (fma (/ x z) (- y a) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -0.35) {
tmp = fma((y / z), (x - t), t);
} else if (z <= 5.5e-18) {
tmp = fma(((t - x) / a), y, x);
} else {
tmp = fma((x / z), (y - a), t);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -0.35) tmp = fma(Float64(y / z), Float64(x - t), t); elseif (z <= 5.5e-18) tmp = fma(Float64(Float64(t - x) / a), y, x); else tmp = fma(Float64(x / z), Float64(y - a), t); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -0.35], N[(N[(y / z), $MachinePrecision] * N[(x - t), $MachinePrecision] + t), $MachinePrecision], If[LessEqual[z, 5.5e-18], N[(N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] * y + x), $MachinePrecision], N[(N[(x / z), $MachinePrecision] * N[(y - a), $MachinePrecision] + t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.35:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{z}, x - t, t\right)\\
\mathbf{elif}\;z \leq 5.5 \cdot 10^{-18}:\\
\;\;\;\;\mathsf{fma}\left(\frac{t - x}{a}, y, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x}{z}, y - a, t\right)\\
\end{array}
\end{array}
if z < -0.34999999999999998Initial program 74.3%
Taylor expanded in z 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 rewrites72.4%
Applied rewrites72.4%
Taylor expanded in y around inf
Applied rewrites66.1%
if -0.34999999999999998 < z < 5.5e-18Initial program 88.5%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6474.2
Applied rewrites74.2%
if 5.5e-18 < z Initial program 64.8%
Taylor expanded in z 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 rewrites80.8%
Applied rewrites80.8%
Applied rewrites80.4%
Taylor expanded in x around inf
Applied rewrites73.4%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.1e-53) (fma (/ y z) (- x t) t) (if (<= z 1.02e-44) (+ (/ (* t y) a) x) (fma (/ x z) (- y a) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.1e-53) {
tmp = fma((y / z), (x - t), t);
} else if (z <= 1.02e-44) {
tmp = ((t * y) / a) + x;
} else {
tmp = fma((x / z), (y - a), t);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.1e-53) tmp = fma(Float64(y / z), Float64(x - t), t); elseif (z <= 1.02e-44) tmp = Float64(Float64(Float64(t * y) / a) + x); else tmp = fma(Float64(x / z), Float64(y - a), t); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.1e-53], N[(N[(y / z), $MachinePrecision] * N[(x - t), $MachinePrecision] + t), $MachinePrecision], If[LessEqual[z, 1.02e-44], N[(N[(N[(t * y), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], N[(N[(x / z), $MachinePrecision] * N[(y - a), $MachinePrecision] + t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.1 \cdot 10^{-53}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{z}, x - t, t\right)\\
\mathbf{elif}\;z \leq 1.02 \cdot 10^{-44}:\\
\;\;\;\;\frac{t \cdot y}{a} + x\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x}{z}, y - a, t\right)\\
\end{array}
\end{array}
if z < -1.10000000000000009e-53Initial program 72.4%
Taylor expanded in z 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 rewrites69.9%
Applied rewrites69.9%
Taylor expanded in y around inf
Applied rewrites62.4%
if -1.10000000000000009e-53 < z < 1.0199999999999999e-44Initial program 91.3%
Taylor expanded in z around 0
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f6476.5
Applied rewrites76.5%
Taylor expanded in x around 0
Applied rewrites65.3%
if 1.0199999999999999e-44 < z Initial program 66.3%
Taylor expanded in z 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 rewrites81.7%
Applied rewrites81.7%
Applied rewrites81.3%
Taylor expanded in x around inf
Applied rewrites73.1%
Final simplification66.4%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma (/ x z) (- y a) t))) (if (<= z -8.8e-29) t_1 (if (<= z 1.02e-44) (+ (/ (* t y) a) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((x / z), (y - a), t);
double tmp;
if (z <= -8.8e-29) {
tmp = t_1;
} else if (z <= 1.02e-44) {
tmp = ((t * y) / a) + x;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(x / z), Float64(y - a), t) tmp = 0.0 if (z <= -8.8e-29) tmp = t_1; elseif (z <= 1.02e-44) tmp = Float64(Float64(Float64(t * y) / a) + x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x / z), $MachinePrecision] * N[(y - a), $MachinePrecision] + t), $MachinePrecision]}, If[LessEqual[z, -8.8e-29], t$95$1, If[LessEqual[z, 1.02e-44], N[(N[(N[(t * y), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{x}{z}, y - a, t\right)\\
\mathbf{if}\;z \leq -8.8 \cdot 10^{-29}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.02 \cdot 10^{-44}:\\
\;\;\;\;\frac{t \cdot y}{a} + x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -8.79999999999999961e-29 or 1.0199999999999999e-44 < z Initial program 69.5%
Taylor expanded in z 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 rewrites76.7%
Applied rewrites76.7%
Applied rewrites75.0%
Taylor expanded in x around inf
Applied rewrites67.5%
if -8.79999999999999961e-29 < z < 1.0199999999999999e-44Initial program 90.0%
Taylor expanded in z around 0
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f6474.9
Applied rewrites74.9%
Taylor expanded in x around 0
Applied rewrites64.4%
Final simplification66.1%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma (/ (- x t) z) y t))) (if (<= z -0.116) t_1 (if (<= z 1.85e-91) (+ (/ (* t y) a) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(((x - t) / z), y, t);
double tmp;
if (z <= -0.116) {
tmp = t_1;
} else if (z <= 1.85e-91) {
tmp = ((t * y) / a) + x;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(Float64(x - t) / z), y, t) tmp = 0.0 if (z <= -0.116) tmp = t_1; elseif (z <= 1.85e-91) tmp = Float64(Float64(Float64(t * y) / a) + x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision] * y + t), $MachinePrecision]}, If[LessEqual[z, -0.116], t$95$1, If[LessEqual[z, 1.85e-91], N[(N[(N[(t * y), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{x - t}{z}, y, t\right)\\
\mathbf{if}\;z \leq -0.116:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.85 \cdot 10^{-91}:\\
\;\;\;\;\frac{t \cdot y}{a} + x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -0.116000000000000006 or 1.8500000000000001e-91 < z Initial program 72.5%
Taylor expanded in z 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 rewrites74.6%
Taylor expanded in a around 0
Applied rewrites65.1%
if -0.116000000000000006 < z < 1.8500000000000001e-91Initial program 87.5%
Taylor expanded in z around 0
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f6473.3
Applied rewrites73.3%
Taylor expanded in x around 0
Applied rewrites65.3%
Final simplification65.2%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (+ (- t x) x))) (if (<= z -1.18e+110) t_1 (if (<= z 2.9e+66) (+ (/ (* t y) a) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (t - x) + x;
double tmp;
if (z <= -1.18e+110) {
tmp = t_1;
} else if (z <= 2.9e+66) {
tmp = ((t * y) / a) + 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 = (t - x) + x
if (z <= (-1.18d+110)) then
tmp = t_1
else if (z <= 2.9d+66) then
tmp = ((t * y) / a) + 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 = (t - x) + x;
double tmp;
if (z <= -1.18e+110) {
tmp = t_1;
} else if (z <= 2.9e+66) {
tmp = ((t * y) / a) + x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (t - x) + x tmp = 0 if z <= -1.18e+110: tmp = t_1 elif z <= 2.9e+66: tmp = ((t * y) / a) + x else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(t - x) + x) tmp = 0.0 if (z <= -1.18e+110) tmp = t_1; elseif (z <= 2.9e+66) tmp = Float64(Float64(Float64(t * y) / a) + x); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (t - x) + x; tmp = 0.0; if (z <= -1.18e+110) tmp = t_1; elseif (z <= 2.9e+66) tmp = ((t * y) / a) + x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(t - x), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[z, -1.18e+110], t$95$1, If[LessEqual[z, 2.9e+66], N[(N[(N[(t * y), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(t - x\right) + x\\
\mathbf{if}\;z \leq -1.18 \cdot 10^{+110}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.9 \cdot 10^{+66}:\\
\;\;\;\;\frac{t \cdot y}{a} + x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.1799999999999999e110 or 2.89999999999999986e66 < z Initial program 64.8%
Taylor expanded in z around inf
lower--.f6443.7
Applied rewrites43.7%
if -1.1799999999999999e110 < z < 2.89999999999999986e66Initial program 86.9%
Taylor expanded in z around 0
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f6463.6
Applied rewrites63.6%
Taylor expanded in x around 0
Applied rewrites55.2%
Final simplification51.1%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* (/ (- x t) z) y))) (if (<= y -1.3e+123) t_1 (if (<= y 1.95e-23) (+ (- t x) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = ((x - t) / z) * y;
double tmp;
if (y <= -1.3e+123) {
tmp = t_1;
} else if (y <= 1.95e-23) {
tmp = (t - x) + 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 - t) / z) * y
if (y <= (-1.3d+123)) then
tmp = t_1
else if (y <= 1.95d-23) then
tmp = (t - x) + 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 - t) / z) * y;
double tmp;
if (y <= -1.3e+123) {
tmp = t_1;
} else if (y <= 1.95e-23) {
tmp = (t - x) + x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = ((x - t) / z) * y tmp = 0 if y <= -1.3e+123: tmp = t_1 elif y <= 1.95e-23: tmp = (t - x) + x else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(Float64(x - t) / z) * y) tmp = 0.0 if (y <= -1.3e+123) tmp = t_1; elseif (y <= 1.95e-23) tmp = Float64(Float64(t - x) + x); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = ((x - t) / z) * y; tmp = 0.0; if (y <= -1.3e+123) tmp = t_1; elseif (y <= 1.95e-23) tmp = (t - x) + x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[y, -1.3e+123], t$95$1, If[LessEqual[y, 1.95e-23], N[(N[(t - x), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x - t}{z} \cdot y\\
\mathbf{if}\;y \leq -1.3 \cdot 10^{+123}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.95 \cdot 10^{-23}:\\
\;\;\;\;\left(t - x\right) + x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.29999999999999993e123 or 1.95e-23 < y Initial program 89.9%
Taylor expanded in z 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 rewrites56.1%
Taylor expanded in y around inf
Applied rewrites44.3%
if -1.29999999999999993e123 < y < 1.95e-23Initial program 69.4%
Taylor expanded in z around inf
lower--.f6431.7
Applied rewrites31.7%
Final simplification37.5%
(FPCore (x y z t a) :precision binary64 (if (<= y -5.2e+124) (* (/ y (- z)) t) (if (<= y 1.8e-23) (+ (- t x) x) (* (/ y z) x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -5.2e+124) {
tmp = (y / -z) * t;
} else if (y <= 1.8e-23) {
tmp = (t - x) + x;
} else {
tmp = (y / z) * x;
}
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 (y <= (-5.2d+124)) then
tmp = (y / -z) * t
else if (y <= 1.8d-23) then
tmp = (t - x) + x
else
tmp = (y / z) * x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -5.2e+124) {
tmp = (y / -z) * t;
} else if (y <= 1.8e-23) {
tmp = (t - x) + x;
} else {
tmp = (y / z) * x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -5.2e+124: tmp = (y / -z) * t elif y <= 1.8e-23: tmp = (t - x) + x else: tmp = (y / z) * x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -5.2e+124) tmp = Float64(Float64(y / Float64(-z)) * t); elseif (y <= 1.8e-23) tmp = Float64(Float64(t - x) + x); else tmp = Float64(Float64(y / z) * x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -5.2e+124) tmp = (y / -z) * t; elseif (y <= 1.8e-23) tmp = (t - x) + x; else tmp = (y / z) * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -5.2e+124], N[(N[(y / (-z)), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[y, 1.8e-23], N[(N[(t - x), $MachinePrecision] + x), $MachinePrecision], N[(N[(y / z), $MachinePrecision] * x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.2 \cdot 10^{+124}:\\
\;\;\;\;\frac{y}{-z} \cdot t\\
\mathbf{elif}\;y \leq 1.8 \cdot 10^{-23}:\\
\;\;\;\;\left(t - x\right) + x\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{z} \cdot x\\
\end{array}
\end{array}
if y < -5.2000000000000001e124Initial program 94.0%
Taylor expanded in z 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 rewrites60.2%
Applied rewrites60.2%
Taylor expanded in y around inf
Applied rewrites56.0%
Taylor expanded in x around 0
Applied rewrites36.7%
if -5.2000000000000001e124 < y < 1.7999999999999999e-23Initial program 69.4%
Taylor expanded in z around inf
lower--.f6431.7
Applied rewrites31.7%
if 1.7999999999999999e-23 < y Initial program 87.6%
Taylor expanded in z 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 rewrites53.8%
Applied rewrites53.8%
Taylor expanded in y around inf
Applied rewrites37.7%
Taylor expanded in x around inf
Applied rewrites27.0%
Final simplification31.2%
(FPCore (x y z t a) :precision binary64 (if (<= y -2.8e+131) (* (/ x z) y) (if (<= y 1.8e-23) (+ (- t x) x) (* (/ y z) x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -2.8e+131) {
tmp = (x / z) * y;
} else if (y <= 1.8e-23) {
tmp = (t - x) + x;
} else {
tmp = (y / z) * x;
}
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 (y <= (-2.8d+131)) then
tmp = (x / z) * y
else if (y <= 1.8d-23) then
tmp = (t - x) + x
else
tmp = (y / z) * x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -2.8e+131) {
tmp = (x / z) * y;
} else if (y <= 1.8e-23) {
tmp = (t - x) + x;
} else {
tmp = (y / z) * x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -2.8e+131: tmp = (x / z) * y elif y <= 1.8e-23: tmp = (t - x) + x else: tmp = (y / z) * x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -2.8e+131) tmp = Float64(Float64(x / z) * y); elseif (y <= 1.8e-23) tmp = Float64(Float64(t - x) + x); else tmp = Float64(Float64(y / z) * x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -2.8e+131) tmp = (x / z) * y; elseif (y <= 1.8e-23) tmp = (t - x) + x; else tmp = (y / z) * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -2.8e+131], N[(N[(x / z), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[y, 1.8e-23], N[(N[(t - x), $MachinePrecision] + x), $MachinePrecision], N[(N[(y / z), $MachinePrecision] * x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.8 \cdot 10^{+131}:\\
\;\;\;\;\frac{x}{z} \cdot y\\
\mathbf{elif}\;y \leq 1.8 \cdot 10^{-23}:\\
\;\;\;\;\left(t - x\right) + x\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{z} \cdot x\\
\end{array}
\end{array}
if y < -2.8000000000000001e131Initial program 93.9%
Taylor expanded in z 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 rewrites59.3%
Applied rewrites59.3%
Taylor expanded in y around inf
Applied rewrites54.9%
Taylor expanded in x around inf
Applied rewrites33.3%
if -2.8000000000000001e131 < y < 1.7999999999999999e-23Initial program 69.6%
Taylor expanded in z around inf
lower--.f6431.5
Applied rewrites31.5%
if 1.7999999999999999e-23 < y Initial program 87.6%
Taylor expanded in z 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 rewrites53.8%
Applied rewrites53.8%
Taylor expanded in y around inf
Applied rewrites37.7%
Taylor expanded in x around inf
Applied rewrites27.0%
Final simplification30.4%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* (/ y z) x))) (if (<= y -2.8e+131) t_1 (if (<= y 1.8e-23) (+ (- t x) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y / z) * x;
double tmp;
if (y <= -2.8e+131) {
tmp = t_1;
} else if (y <= 1.8e-23) {
tmp = (t - x) + 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 = (y / z) * x
if (y <= (-2.8d+131)) then
tmp = t_1
else if (y <= 1.8d-23) then
tmp = (t - x) + 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 = (y / z) * x;
double tmp;
if (y <= -2.8e+131) {
tmp = t_1;
} else if (y <= 1.8e-23) {
tmp = (t - x) + x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y / z) * x tmp = 0 if y <= -2.8e+131: tmp = t_1 elif y <= 1.8e-23: tmp = (t - x) + x else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y / z) * x) tmp = 0.0 if (y <= -2.8e+131) tmp = t_1; elseif (y <= 1.8e-23) tmp = Float64(Float64(t - x) + x); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y / z) * x; tmp = 0.0; if (y <= -2.8e+131) tmp = t_1; elseif (y <= 1.8e-23) tmp = (t - x) + x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y / z), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[y, -2.8e+131], t$95$1, If[LessEqual[y, 1.8e-23], N[(N[(t - x), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y}{z} \cdot x\\
\mathbf{if}\;y \leq -2.8 \cdot 10^{+131}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.8 \cdot 10^{-23}:\\
\;\;\;\;\left(t - x\right) + x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -2.8000000000000001e131 or 1.7999999999999999e-23 < y Initial program 89.9%
Taylor expanded in z 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 rewrites55.7%
Applied rewrites55.7%
Taylor expanded in y around inf
Applied rewrites43.8%
Taylor expanded in x around inf
Applied rewrites29.2%
if -2.8000000000000001e131 < y < 1.7999999999999999e-23Initial program 69.6%
Taylor expanded in z around inf
lower--.f6431.5
Applied rewrites31.5%
Final simplification30.4%
(FPCore (x y z t a) :precision binary64 (+ (- t x) x))
double code(double x, double y, double z, double t, double a) {
return (t - x) + x;
}
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 = (t - x) + x
end function
public static double code(double x, double y, double z, double t, double a) {
return (t - x) + x;
}
def code(x, y, z, t, a): return (t - x) + x
function code(x, y, z, t, a) return Float64(Float64(t - x) + x) end
function tmp = code(x, y, z, t, a) tmp = (t - x) + x; end
code[x_, y_, z_, t_, a_] := N[(N[(t - x), $MachinePrecision] + x), $MachinePrecision]
\begin{array}{l}
\\
\left(t - x\right) + x
\end{array}
Initial program 78.9%
Taylor expanded in z around inf
lower--.f6421.7
Applied rewrites21.7%
Final simplification21.7%
(FPCore (x y z t a) :precision binary64 (+ (- x) x))
double code(double x, double y, double z, double t, double a) {
return -x + x;
}
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 + x
end function
public static double code(double x, double y, double z, double t, double a) {
return -x + x;
}
def code(x, y, z, t, a): return -x + x
function code(x, y, z, t, a) return Float64(Float64(-x) + x) end
function tmp = code(x, y, z, t, a) tmp = -x + x; end
code[x_, y_, z_, t_, a_] := N[((-x) + x), $MachinePrecision]
\begin{array}{l}
\\
\left(-x\right) + x
\end{array}
Initial program 78.9%
Taylor expanded in z around inf
lower--.f6421.7
Applied rewrites21.7%
Taylor expanded in x around inf
Applied rewrites2.8%
Final simplification2.8%
herbie shell --seed 2024295
(FPCore (x y z t a)
:name "Numeric.Signal:interpolate from hsignal-0.2.7.1"
:precision binary64
(+ x (* (- y z) (/ (- t x) (- a z)))))