
(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 17 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 (+ (/ (- y z) (/ (- z a) (- x t))) x))
(t_2 (+ (* (/ (- t x) (- a z)) (- y z)) x)))
(if (<= t_2 -2e-255)
t_1
(if (<= t_2 5e-278) (fma (fma t -1.0 x) (/ (- y a) z) t) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = ((y - z) / ((z - a) / (x - t))) + x;
double t_2 = (((t - x) / (a - z)) * (y - z)) + x;
double tmp;
if (t_2 <= -2e-255) {
tmp = t_1;
} else if (t_2 <= 5e-278) {
tmp = fma(fma(t, -1.0, x), ((y - a) / z), t);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(Float64(y - z) / Float64(Float64(z - a) / Float64(x - t))) + x) t_2 = Float64(Float64(Float64(Float64(t - x) / Float64(a - z)) * Float64(y - z)) + x) tmp = 0.0 if (t_2 <= -2e-255) tmp = t_1; elseif (t_2 <= 5e-278) tmp = fma(fma(t, -1.0, x), Float64(Float64(y - a) / z), 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[(N[(z - a), $MachinePrecision] / N[(x - t), $MachinePrecision]), $MachinePrecision]), $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, -2e-255], t$95$1, If[LessEqual[t$95$2, 5e-278], N[(N[(t * -1.0 + x), $MachinePrecision] * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y - z}{\frac{z - a}{x - t}} + x\\
t_2 := \frac{t - x}{a - z} \cdot \left(y - z\right) + x\\
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{-255}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{-278}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(t, -1, x\right), \frac{y - a}{z}, t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -2e-255 or 4.99999999999999985e-278 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 91.1%
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
un-div-invN/A
lower-/.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--.f6491.2
Applied rewrites91.2%
if -2e-255 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 4.99999999999999985e-278Initial program 6.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 rewrites93.4%
Final simplification91.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ (* (/ (- t x) (- a z)) (- y z)) x)))
(if (<= t_1 -2e-255)
t_1
(if (<= t_1 5e-278) (fma (fma t -1.0 x) (/ (- y a) z) t) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (((t - x) / (a - z)) * (y - z)) + x;
double tmp;
if (t_1 <= -2e-255) {
tmp = t_1;
} else if (t_1 <= 5e-278) {
tmp = fma(fma(t, -1.0, x), ((y - a) / z), t);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(Float64(Float64(t - x) / Float64(a - z)) * Float64(y - z)) + x) tmp = 0.0 if (t_1 <= -2e-255) tmp = t_1; elseif (t_1 <= 5e-278) tmp = fma(fma(t, -1.0, x), Float64(Float64(y - a) / z), t); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] * N[(y - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[t$95$1, -2e-255], t$95$1, If[LessEqual[t$95$1, 5e-278], N[(N[(t * -1.0 + x), $MachinePrecision] * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - x}{a - z} \cdot \left(y - z\right) + x\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{-255}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-278}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(t, -1, x\right), \frac{y - a}{z}, t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -2e-255 or 4.99999999999999985e-278 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 91.1%
if -2e-255 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 4.99999999999999985e-278Initial program 6.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 rewrites93.4%
Final simplification91.5%
(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 -2e-255)
t_1
(if (<= t_2 5e-278) (fma (fma t -1.0 x) (/ (- y a) z) 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 <= -2e-255) {
tmp = t_1;
} else if (t_2 <= 5e-278) {
tmp = fma(fma(t, -1.0, x), ((y - a) / z), 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 <= -2e-255) tmp = t_1; elseif (t_2 <= 5e-278) tmp = fma(fma(t, -1.0, x), Float64(Float64(y - a) / z), 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, -2e-255], t$95$1, If[LessEqual[t$95$2, 5e-278], N[(N[(t * -1.0 + x), $MachinePrecision] * N[(N[(y - a), $MachinePrecision] / z), $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 -2 \cdot 10^{-255}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{-278}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(t, -1, x\right), \frac{y - a}{z}, t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -2e-255 or 4.99999999999999985e-278 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 91.1%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6491.1
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--.f6491.1
Applied rewrites91.1%
if -2e-255 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 4.99999999999999985e-278Initial program 6.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 rewrites93.4%
Final simplification91.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (fma t -1.0 x) (/ (- y a) z) t)))
(if (<= z -6.2e-81)
t_1
(if (<= z 1.05e+33) (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(fma(t, -1.0, x), ((y - a) / z), t);
double tmp;
if (z <= -6.2e-81) {
tmp = t_1;
} else if (z <= 1.05e+33) {
tmp = fma(((y - z) / a), (t - x), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(fma(t, -1.0, x), Float64(Float64(y - a) / z), t) tmp = 0.0 if (z <= -6.2e-81) tmp = t_1; elseif (z <= 1.05e+33) 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[(t * -1.0 + x), $MachinePrecision] * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision]}, If[LessEqual[z, -6.2e-81], t$95$1, If[LessEqual[z, 1.05e+33], 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(\mathsf{fma}\left(t, -1, x\right), \frac{y - a}{z}, t\right)\\
\mathbf{if}\;z \leq -6.2 \cdot 10^{-81}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.05 \cdot 10^{+33}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y - z}{a}, t - x, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -6.19999999999999976e-81 or 1.05e33 < z Initial program 57.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 rewrites80.3%
if -6.19999999999999976e-81 < z < 1.05e33Initial program 95.7%
Taylor expanded in a around inf
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6482.3
Applied rewrites82.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (- t) (/ y z) t)))
(if (<= z -3.9e+112)
t_1
(if (<= z -1.8e-131)
(* (/ (- x t) z) y)
(if (<= z 2.5e+27) (* (/ t (- a z)) y) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(-t, (y / z), t);
double tmp;
if (z <= -3.9e+112) {
tmp = t_1;
} else if (z <= -1.8e-131) {
tmp = ((x - t) / z) * y;
} else if (z <= 2.5e+27) {
tmp = (t / (a - z)) * y;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(-t), Float64(y / z), t) tmp = 0.0 if (z <= -3.9e+112) tmp = t_1; elseif (z <= -1.8e-131) tmp = Float64(Float64(Float64(x - t) / z) * y); elseif (z <= 2.5e+27) tmp = Float64(Float64(t / Float64(a - z)) * y); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[((-t) * N[(y / z), $MachinePrecision] + t), $MachinePrecision]}, If[LessEqual[z, -3.9e+112], t$95$1, If[LessEqual[z, -1.8e-131], N[(N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[z, 2.5e+27], N[(N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-t, \frac{y}{z}, t\right)\\
\mathbf{if}\;z \leq -3.9 \cdot 10^{+112}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.8 \cdot 10^{-131}:\\
\;\;\;\;\frac{x - t}{z} \cdot y\\
\mathbf{elif}\;z \leq 2.5 \cdot 10^{+27}:\\
\;\;\;\;\frac{t}{a - z} \cdot y\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -3.89999999999999968e112 or 2.4999999999999999e27 < z Initial program 53.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 rewrites83.6%
Taylor expanded in t around 0
Applied rewrites26.2%
Taylor expanded in a around 0
Applied rewrites77.0%
Taylor expanded in t around inf
Applied rewrites59.8%
if -3.89999999999999968e112 < z < -1.8e-131Initial program 79.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 rewrites51.2%
Taylor expanded in y around inf
Applied rewrites37.5%
if -1.8e-131 < z < 2.4999999999999999e27Initial program 95.8%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6441.9
Applied rewrites41.9%
Taylor expanded in y around inf
Applied rewrites39.1%
Applied rewrites39.1%
Final simplification46.5%
(FPCore (x y z t a) :precision binary64 (if (<= z -6.2e-81) (fma (- x t) (/ y z) t) (if (<= z 1.05e+33) (fma (/ (- y z) a) (- t x) x) (fma (/ (- x t) z) y t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6.2e-81) {
tmp = fma((x - t), (y / z), t);
} else if (z <= 1.05e+33) {
tmp = fma(((y - z) / a), (t - x), x);
} else {
tmp = fma(((x - t) / z), y, t);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -6.2e-81) tmp = fma(Float64(x - t), Float64(y / z), t); elseif (z <= 1.05e+33) tmp = fma(Float64(Float64(y - z) / a), Float64(t - x), x); else tmp = fma(Float64(Float64(x - t) / z), y, t); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -6.2e-81], N[(N[(x - t), $MachinePrecision] * N[(y / z), $MachinePrecision] + t), $MachinePrecision], If[LessEqual[z, 1.05e+33], N[(N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision], N[(N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision] * y + t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.2 \cdot 10^{-81}:\\
\;\;\;\;\mathsf{fma}\left(x - t, \frac{y}{z}, t\right)\\
\mathbf{elif}\;z \leq 1.05 \cdot 10^{+33}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y - z}{a}, t - x, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x - t}{z}, y, t\right)\\
\end{array}
\end{array}
if z < -6.19999999999999976e-81Initial program 63.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 rewrites76.3%
Taylor expanded in t around 0
Applied rewrites35.1%
Taylor expanded in a around 0
Applied rewrites69.7%
if -6.19999999999999976e-81 < z < 1.05e33Initial program 95.7%
Taylor expanded in a around inf
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6482.3
Applied rewrites82.3%
if 1.05e33 < z Initial program 51.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 rewrites84.5%
Taylor expanded in a around 0
Applied rewrites80.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ (- t x) x)))
(if (<= z -5.3e+112)
t_1
(if (<= z -2.1e-131)
(* (/ x z) y)
(if (<= z 3.1e+31) (* (/ y a) t) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (t - x) + x;
double tmp;
if (z <= -5.3e+112) {
tmp = t_1;
} else if (z <= -2.1e-131) {
tmp = (x / z) * y;
} else if (z <= 3.1e+31) {
tmp = (y / a) * t;
} 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 <= (-5.3d+112)) then
tmp = t_1
else if (z <= (-2.1d-131)) then
tmp = (x / z) * y
else if (z <= 3.1d+31) then
tmp = (y / a) * t
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 <= -5.3e+112) {
tmp = t_1;
} else if (z <= -2.1e-131) {
tmp = (x / z) * y;
} else if (z <= 3.1e+31) {
tmp = (y / a) * t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (t - x) + x tmp = 0 if z <= -5.3e+112: tmp = t_1 elif z <= -2.1e-131: tmp = (x / z) * y elif z <= 3.1e+31: tmp = (y / a) * t 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 <= -5.3e+112) tmp = t_1; elseif (z <= -2.1e-131) tmp = Float64(Float64(x / z) * y); elseif (z <= 3.1e+31) tmp = Float64(Float64(y / a) * t); 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 <= -5.3e+112) tmp = t_1; elseif (z <= -2.1e-131) tmp = (x / z) * y; elseif (z <= 3.1e+31) tmp = (y / a) * t; 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, -5.3e+112], t$95$1, If[LessEqual[z, -2.1e-131], N[(N[(x / z), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[z, 3.1e+31], N[(N[(y / a), $MachinePrecision] * t), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(t - x\right) + x\\
\mathbf{if}\;z \leq -5.3 \cdot 10^{+112}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -2.1 \cdot 10^{-131}:\\
\;\;\;\;\frac{x}{z} \cdot y\\
\mathbf{elif}\;z \leq 3.1 \cdot 10^{+31}:\\
\;\;\;\;\frac{y}{a} \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -5.30000000000000018e112 or 3.1000000000000002e31 < z Initial program 53.0%
Taylor expanded in z around inf
lower--.f6437.4
Applied rewrites37.4%
if -5.30000000000000018e112 < z < -2.09999999999999997e-131Initial program 79.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 rewrites51.2%
Taylor expanded in t around 0
Applied rewrites30.9%
Taylor expanded in a around 0
Applied rewrites29.8%
if -2.09999999999999997e-131 < z < 3.1000000000000002e31Initial program 95.8%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6442.2
Applied rewrites42.2%
Taylor expanded in z around 0
Applied rewrites37.0%
Final simplification35.7%
(FPCore (x y z t a) :precision binary64 (if (<= z -6.2e-81) (fma (- x t) (/ y z) t) (if (<= z 6.6e+56) (fma (- t x) (/ y a) x) (fma (/ (- x t) z) y t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6.2e-81) {
tmp = fma((x - t), (y / z), t);
} else if (z <= 6.6e+56) {
tmp = fma((t - x), (y / a), x);
} else {
tmp = fma(((x - t) / z), y, t);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -6.2e-81) tmp = fma(Float64(x - t), Float64(y / z), t); elseif (z <= 6.6e+56) tmp = fma(Float64(t - x), Float64(y / a), x); else tmp = fma(Float64(Float64(x - t) / z), y, t); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -6.2e-81], N[(N[(x - t), $MachinePrecision] * N[(y / z), $MachinePrecision] + t), $MachinePrecision], If[LessEqual[z, 6.6e+56], N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision] + x), $MachinePrecision], N[(N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision] * y + t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.2 \cdot 10^{-81}:\\
\;\;\;\;\mathsf{fma}\left(x - t, \frac{y}{z}, t\right)\\
\mathbf{elif}\;z \leq 6.6 \cdot 10^{+56}:\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x - t}{z}, y, t\right)\\
\end{array}
\end{array}
if z < -6.19999999999999976e-81Initial program 63.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 rewrites76.3%
Taylor expanded in t around 0
Applied rewrites35.1%
Taylor expanded in a around 0
Applied rewrites69.7%
if -6.19999999999999976e-81 < z < 6.60000000000000004e56Initial program 95.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 rewrites25.8%
Applied rewrites25.8%
Taylor expanded in z around 0
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f6481.5
Applied rewrites81.5%
if 6.60000000000000004e56 < z Initial program 50.1%
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 rewrites85.6%
Taylor expanded in a around 0
Applied rewrites81.1%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (+ (* (/ t a) y) x))) (if (<= a -7.4e+111) t_1 (if (<= a 0.0006) (fma (- x t) (/ y z) t) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = ((t / a) * y) + x;
double tmp;
if (a <= -7.4e+111) {
tmp = t_1;
} else if (a <= 0.0006) {
tmp = fma((x - t), (y / z), t);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(Float64(t / a) * y) + x) tmp = 0.0 if (a <= -7.4e+111) tmp = t_1; elseif (a <= 0.0006) tmp = fma(Float64(x - t), Float64(y / z), t); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(t / a), $MachinePrecision] * y), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -7.4e+111], t$95$1, If[LessEqual[a, 0.0006], N[(N[(x - t), $MachinePrecision] * N[(y / z), $MachinePrecision] + t), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{a} \cdot y + x\\
\mathbf{if}\;a \leq -7.4 \cdot 10^{+111}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 0.0006:\\
\;\;\;\;\mathsf{fma}\left(x - t, \frac{y}{z}, t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -7.4000000000000005e111 or 5.99999999999999947e-4 < a Initial program 92.4%
Taylor expanded in z around inf
lower--.f649.8
Applied rewrites9.8%
Taylor expanded in z around 0
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f6468.6
Applied rewrites68.6%
Taylor expanded in t around inf
Applied rewrites72.7%
if -7.4000000000000005e111 < a < 5.99999999999999947e-4Initial program 67.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 rewrites72.7%
Taylor expanded in t around 0
Applied rewrites31.5%
Taylor expanded in a around 0
Applied rewrites70.9%
Final simplification71.5%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma (- t) (/ y z) t))) (if (<= z -4.7e+86) t_1 (if (<= z 2.4e+57) (+ (* (/ t a) y) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(-t, (y / z), t);
double tmp;
if (z <= -4.7e+86) {
tmp = t_1;
} else if (z <= 2.4e+57) {
tmp = ((t / a) * y) + x;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(-t), Float64(y / z), t) tmp = 0.0 if (z <= -4.7e+86) tmp = t_1; elseif (z <= 2.4e+57) tmp = Float64(Float64(Float64(t / a) * y) + x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[((-t) * N[(y / z), $MachinePrecision] + t), $MachinePrecision]}, If[LessEqual[z, -4.7e+86], t$95$1, If[LessEqual[z, 2.4e+57], N[(N[(N[(t / a), $MachinePrecision] * y), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-t, \frac{y}{z}, t\right)\\
\mathbf{if}\;z \leq -4.7 \cdot 10^{+86}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.4 \cdot 10^{+57}:\\
\;\;\;\;\frac{t}{a} \cdot y + x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -4.7000000000000002e86 or 2.40000000000000005e57 < z Initial program 53.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 rewrites86.5%
Taylor expanded in t around 0
Applied rewrites28.5%
Taylor expanded in a around 0
Applied rewrites80.3%
Taylor expanded in t around inf
Applied rewrites60.5%
if -4.7000000000000002e86 < z < 2.40000000000000005e57Initial program 91.7%
Taylor expanded in z around inf
lower--.f647.0
Applied rewrites7.0%
Taylor expanded in z around 0
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f6470.5
Applied rewrites70.5%
Taylor expanded in t around inf
Applied rewrites58.7%
Final simplification59.4%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* (/ (- y a) z) x))) (if (<= x -500000.0) t_1 (if (<= x 1.32e-72) (* (/ t (- a z)) y) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = ((y - a) / z) * x;
double tmp;
if (x <= -500000.0) {
tmp = t_1;
} else if (x <= 1.32e-72) {
tmp = (t / (a - z)) * 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 = ((y - a) / z) * x
if (x <= (-500000.0d0)) then
tmp = t_1
else if (x <= 1.32d-72) then
tmp = (t / (a - z)) * 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 = ((y - a) / z) * x;
double tmp;
if (x <= -500000.0) {
tmp = t_1;
} else if (x <= 1.32e-72) {
tmp = (t / (a - z)) * y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = ((y - a) / z) * x tmp = 0 if x <= -500000.0: tmp = t_1 elif x <= 1.32e-72: tmp = (t / (a - z)) * y else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(Float64(y - a) / z) * x) tmp = 0.0 if (x <= -500000.0) tmp = t_1; elseif (x <= 1.32e-72) tmp = Float64(Float64(t / Float64(a - z)) * y); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = ((y - a) / z) * x; tmp = 0.0; if (x <= -500000.0) tmp = t_1; elseif (x <= 1.32e-72) tmp = (t / (a - z)) * y; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[x, -500000.0], t$95$1, If[LessEqual[x, 1.32e-72], N[(N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y - a}{z} \cdot x\\
\mathbf{if}\;x \leq -500000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 1.32 \cdot 10^{-72}:\\
\;\;\;\;\frac{t}{a - z} \cdot y\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -5e5 or 1.32000000000000001e-72 < x Initial program 68.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 rewrites57.3%
Taylor expanded in t around 0
Applied rewrites37.1%
if -5e5 < x < 1.32000000000000001e-72Initial program 86.8%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6465.5
Applied rewrites65.5%
Taylor expanded in y around inf
Applied rewrites41.6%
Applied rewrites42.4%
Final simplification39.4%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* (/ (- x t) z) y))) (if (<= x -980000.0) t_1 (if (<= x 1.32e-72) (* (/ t (- a z)) y) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = ((x - t) / z) * y;
double tmp;
if (x <= -980000.0) {
tmp = t_1;
} else if (x <= 1.32e-72) {
tmp = (t / (a - z)) * 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 - t) / z) * y
if (x <= (-980000.0d0)) then
tmp = t_1
else if (x <= 1.32d-72) then
tmp = (t / (a - z)) * 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 - t) / z) * y;
double tmp;
if (x <= -980000.0) {
tmp = t_1;
} else if (x <= 1.32e-72) {
tmp = (t / (a - z)) * y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = ((x - t) / z) * y tmp = 0 if x <= -980000.0: tmp = t_1 elif x <= 1.32e-72: tmp = (t / (a - z)) * y 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 (x <= -980000.0) tmp = t_1; elseif (x <= 1.32e-72) tmp = Float64(Float64(t / Float64(a - z)) * y); 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 (x <= -980000.0) tmp = t_1; elseif (x <= 1.32e-72) tmp = (t / (a - z)) * y; 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[x, -980000.0], t$95$1, If[LessEqual[x, 1.32e-72], N[(N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x - t}{z} \cdot y\\
\mathbf{if}\;x \leq -980000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 1.32 \cdot 10^{-72}:\\
\;\;\;\;\frac{t}{a - z} \cdot y\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -9.8e5 or 1.32000000000000001e-72 < x Initial program 68.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 rewrites57.3%
Taylor expanded in y around inf
Applied rewrites33.1%
if -9.8e5 < x < 1.32000000000000001e-72Initial program 86.8%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6465.5
Applied rewrites65.5%
Taylor expanded in y around inf
Applied rewrites41.6%
Applied rewrites42.4%
Final simplification37.1%
(FPCore (x y z t a) :precision binary64 (if (<= x -19.0) (* (/ x z) y) (if (<= x 1.32e-72) (* (/ t (- a z)) y) (* (/ y z) x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -19.0) {
tmp = (x / z) * y;
} else if (x <= 1.32e-72) {
tmp = (t / (a - z)) * y;
} 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 (x <= (-19.0d0)) then
tmp = (x / z) * y
else if (x <= 1.32d-72) then
tmp = (t / (a - z)) * y
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 (x <= -19.0) {
tmp = (x / z) * y;
} else if (x <= 1.32e-72) {
tmp = (t / (a - z)) * y;
} else {
tmp = (y / z) * x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -19.0: tmp = (x / z) * y elif x <= 1.32e-72: tmp = (t / (a - z)) * y else: tmp = (y / z) * x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -19.0) tmp = Float64(Float64(x / z) * y); elseif (x <= 1.32e-72) tmp = Float64(Float64(t / Float64(a - z)) * y); else tmp = Float64(Float64(y / z) * x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -19.0) tmp = (x / z) * y; elseif (x <= 1.32e-72) tmp = (t / (a - z)) * y; else tmp = (y / z) * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -19.0], N[(N[(x / z), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[x, 1.32e-72], N[(N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], N[(N[(y / z), $MachinePrecision] * x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -19:\\
\;\;\;\;\frac{x}{z} \cdot y\\
\mathbf{elif}\;x \leq 1.32 \cdot 10^{-72}:\\
\;\;\;\;\frac{t}{a - z} \cdot y\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{z} \cdot x\\
\end{array}
\end{array}
if x < -19Initial program 60.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 rewrites58.1%
Taylor expanded in t around 0
Applied rewrites39.6%
Taylor expanded in a around 0
Applied rewrites31.4%
if -19 < x < 1.32000000000000001e-72Initial program 86.7%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6466.0
Applied rewrites66.0%
Taylor expanded in y around inf
Applied rewrites41.9%
Applied rewrites42.7%
if 1.32000000000000001e-72 < x Initial program 75.1%
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%
Taylor expanded in t around 0
Applied rewrites34.8%
Taylor expanded in a around 0
Applied rewrites32.7%
Final simplification36.6%
(FPCore (x y z t a) :precision binary64 (if (<= x -8.5) (* (/ x z) y) (if (<= x 1.32e-72) (* (/ y (- a z)) t) (* (/ y z) x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -8.5) {
tmp = (x / z) * y;
} else if (x <= 1.32e-72) {
tmp = (y / (a - z)) * t;
} 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 (x <= (-8.5d0)) then
tmp = (x / z) * y
else if (x <= 1.32d-72) then
tmp = (y / (a - z)) * t
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 (x <= -8.5) {
tmp = (x / z) * y;
} else if (x <= 1.32e-72) {
tmp = (y / (a - z)) * t;
} else {
tmp = (y / z) * x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -8.5: tmp = (x / z) * y elif x <= 1.32e-72: tmp = (y / (a - z)) * t else: tmp = (y / z) * x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -8.5) tmp = Float64(Float64(x / z) * y); elseif (x <= 1.32e-72) tmp = Float64(Float64(y / Float64(a - z)) * t); else tmp = Float64(Float64(y / z) * x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -8.5) tmp = (x / z) * y; elseif (x <= 1.32e-72) tmp = (y / (a - z)) * t; else tmp = (y / z) * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -8.5], N[(N[(x / z), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[x, 1.32e-72], N[(N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], N[(N[(y / z), $MachinePrecision] * x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -8.5:\\
\;\;\;\;\frac{x}{z} \cdot y\\
\mathbf{elif}\;x \leq 1.32 \cdot 10^{-72}:\\
\;\;\;\;\frac{y}{a - z} \cdot t\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{z} \cdot x\\
\end{array}
\end{array}
if x < -8.5Initial program 60.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 rewrites58.1%
Taylor expanded in t around 0
Applied rewrites39.6%
Taylor expanded in a around 0
Applied rewrites31.4%
if -8.5 < x < 1.32000000000000001e-72Initial program 86.7%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6466.0
Applied rewrites66.0%
Taylor expanded in y around inf
Applied rewrites41.9%
if 1.32000000000000001e-72 < x Initial program 75.1%
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%
Taylor expanded in t around 0
Applied rewrites34.8%
Taylor expanded in a around 0
Applied rewrites32.7%
Final simplification36.3%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (+ (- t x) x))) (if (<= z -2.3e+96) t_1 (if (<= z 3.1e+31) (* (/ y a) t) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (t - x) + x;
double tmp;
if (z <= -2.3e+96) {
tmp = t_1;
} else if (z <= 3.1e+31) {
tmp = (y / a) * t;
} 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 <= (-2.3d+96)) then
tmp = t_1
else if (z <= 3.1d+31) then
tmp = (y / a) * t
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 <= -2.3e+96) {
tmp = t_1;
} else if (z <= 3.1e+31) {
tmp = (y / a) * t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (t - x) + x tmp = 0 if z <= -2.3e+96: tmp = t_1 elif z <= 3.1e+31: tmp = (y / a) * t 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 <= -2.3e+96) tmp = t_1; elseif (z <= 3.1e+31) tmp = Float64(Float64(y / a) * t); 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 <= -2.3e+96) tmp = t_1; elseif (z <= 3.1e+31) tmp = (y / a) * t; 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, -2.3e+96], t$95$1, If[LessEqual[z, 3.1e+31], N[(N[(y / a), $MachinePrecision] * t), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(t - x\right) + x\\
\mathbf{if}\;z \leq -2.3 \cdot 10^{+96}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3.1 \cdot 10^{+31}:\\
\;\;\;\;\frac{y}{a} \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.30000000000000015e96 or 3.1000000000000002e31 < z Initial program 53.9%
Taylor expanded in z around inf
lower--.f6437.3
Applied rewrites37.3%
if -2.30000000000000015e96 < z < 3.1000000000000002e31Initial program 91.3%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6438.9
Applied rewrites38.9%
Taylor expanded in z around 0
Applied rewrites30.9%
Final simplification33.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 76.5%
Taylor expanded in z around inf
lower--.f6418.7
Applied rewrites18.7%
Final simplification18.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 76.5%
Taylor expanded in z around inf
lower--.f6418.7
Applied rewrites18.7%
Taylor expanded in t around 0
Applied rewrites2.9%
Final simplification2.9%
herbie shell --seed 2024270
(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)))))