
(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(Float64(y - z) * 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[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 16 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(Float64(y - z) * 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[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (/ (fma -1.0 t x) z) (- y a) t)))
(if (<= z -5.2e+191)
t_1
(if (<= z 9e+62) (+ (/ (- t x) (/ (- a z) (- y z))) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((fma(-1.0, t, x) / z), (y - a), t);
double tmp;
if (z <= -5.2e+191) {
tmp = t_1;
} else if (z <= 9e+62) {
tmp = ((t - x) / ((a - z) / (y - z))) + x;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(fma(-1.0, t, x) / z), Float64(y - a), t) tmp = 0.0 if (z <= -5.2e+191) tmp = t_1; elseif (z <= 9e+62) tmp = Float64(Float64(Float64(t - x) / Float64(Float64(a - z) / Float64(y - z))) + x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(-1.0 * t + x), $MachinePrecision] / z), $MachinePrecision] * N[(y - a), $MachinePrecision] + t), $MachinePrecision]}, If[LessEqual[z, -5.2e+191], t$95$1, If[LessEqual[z, 9e+62], N[(N[(N[(t - x), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{\mathsf{fma}\left(-1, t, x\right)}{z}, y - a, t\right)\\
\mathbf{if}\;z \leq -5.2 \cdot 10^{+191}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 9 \cdot 10^{+62}:\\
\;\;\;\;\frac{t - x}{\frac{a - z}{y - z}} + x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -5.2000000000000001e191 or 8.99999999999999997e62 < z Initial program 28.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
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites88.6%
if -5.2000000000000001e191 < z < 8.99999999999999997e62Initial program 83.2%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lift--.f64N/A
flip--N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f64N/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-/.f6490.6
Applied rewrites90.6%
lift-/.f64N/A
lift-/.f64N/A
associate-/l/N/A
lower-/.f64N/A
lift-/.f64N/A
frac-2negN/A
metadata-evalN/A
associate-*l/N/A
neg-mul-1N/A
frac-2negN/A
lower-/.f6493.6
Applied rewrites93.6%
Final simplification92.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ (/ (* (- y z) t) (- a z)) x)))
(if (<= z -8.2e+133)
(fma (/ x z) (- y a) t)
(if (<= z -2.3e-26)
t_1
(if (<= z 1.15e-193)
(fma (/ (- y z) a) (- t x) x)
(if (<= z 7.2e+62) t_1 (fma (- x t) (/ y z) t)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (((y - z) * t) / (a - z)) + x;
double tmp;
if (z <= -8.2e+133) {
tmp = fma((x / z), (y - a), t);
} else if (z <= -2.3e-26) {
tmp = t_1;
} else if (z <= 1.15e-193) {
tmp = fma(((y - z) / a), (t - x), x);
} else if (z <= 7.2e+62) {
tmp = t_1;
} else {
tmp = fma((x - t), (y / z), t);
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(Float64(Float64(y - z) * t) / Float64(a - z)) + x) tmp = 0.0 if (z <= -8.2e+133) tmp = fma(Float64(x / z), Float64(y - a), t); elseif (z <= -2.3e-26) tmp = t_1; elseif (z <= 1.15e-193) tmp = fma(Float64(Float64(y - z) / a), Float64(t - x), x); elseif (z <= 7.2e+62) tmp = t_1; else tmp = fma(Float64(x - t), Float64(y / z), t); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[z, -8.2e+133], N[(N[(x / z), $MachinePrecision] * N[(y - a), $MachinePrecision] + t), $MachinePrecision], If[LessEqual[z, -2.3e-26], t$95$1, If[LessEqual[z, 1.15e-193], N[(N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[z, 7.2e+62], t$95$1, N[(N[(x - t), $MachinePrecision] * N[(y / z), $MachinePrecision] + t), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\left(y - z\right) \cdot t}{a - z} + x\\
\mathbf{if}\;z \leq -8.2 \cdot 10^{+133}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x}{z}, y - a, t\right)\\
\mathbf{elif}\;z \leq -2.3 \cdot 10^{-26}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.15 \cdot 10^{-193}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y - z}{a}, t - x, x\right)\\
\mathbf{elif}\;z \leq 7.2 \cdot 10^{+62}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x - t, \frac{y}{z}, t\right)\\
\end{array}
\end{array}
if z < -8.20000000000000008e133Initial program 31.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
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites82.1%
Taylor expanded in x around inf
Applied rewrites79.8%
if -8.20000000000000008e133 < z < -2.30000000000000009e-26 or 1.15000000000000004e-193 < z < 7.2e62Initial program 82.0%
Taylor expanded in x around 0
*-commutativeN/A
lower-*.f64N/A
lower--.f6475.1
Applied rewrites75.1%
if -2.30000000000000009e-26 < z < 1.15000000000000004e-193Initial program 87.0%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lift--.f64N/A
flip--N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f64N/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-/.f6496.3
Applied rewrites96.3%
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--.f6487.7
Applied rewrites87.7%
if 7.2e62 < z Initial program 34.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
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites88.4%
Taylor expanded in a around 0
Applied rewrites84.0%
Applied rewrites86.3%
Final simplification82.0%
(FPCore (x y z t a)
:precision binary64
(if (<= z -3.4e+194)
(fma (/ x z) (- y a) t)
(if (<= z -3.8e+56)
(* (/ (- y z) (- a z)) t)
(if (<= z 9.2e+47)
(+ (/ (* (- t x) y) (- a z)) x)
(fma (- x t) (/ y z) t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.4e+194) {
tmp = fma((x / z), (y - a), t);
} else if (z <= -3.8e+56) {
tmp = ((y - z) / (a - z)) * t;
} else if (z <= 9.2e+47) {
tmp = (((t - x) * y) / (a - z)) + x;
} else {
tmp = fma((x - t), (y / z), t);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.4e+194) tmp = fma(Float64(x / z), Float64(y - a), t); elseif (z <= -3.8e+56) tmp = Float64(Float64(Float64(y - z) / Float64(a - z)) * t); elseif (z <= 9.2e+47) tmp = Float64(Float64(Float64(Float64(t - x) * y) / Float64(a - z)) + x); else tmp = fma(Float64(x - t), Float64(y / z), t); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.4e+194], N[(N[(x / z), $MachinePrecision] * N[(y - a), $MachinePrecision] + t), $MachinePrecision], If[LessEqual[z, -3.8e+56], N[(N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[z, 9.2e+47], N[(N[(N[(N[(t - x), $MachinePrecision] * y), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(N[(x - t), $MachinePrecision] * N[(y / z), $MachinePrecision] + t), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.4 \cdot 10^{+194}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x}{z}, y - a, t\right)\\
\mathbf{elif}\;z \leq -3.8 \cdot 10^{+56}:\\
\;\;\;\;\frac{y - z}{a - z} \cdot t\\
\mathbf{elif}\;z \leq 9.2 \cdot 10^{+47}:\\
\;\;\;\;\frac{\left(t - x\right) \cdot y}{a - z} + x\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x - t, \frac{y}{z}, t\right)\\
\end{array}
\end{array}
if z < -3.4000000000000001e194Initial program 14.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
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites88.3%
Taylor expanded in x around inf
Applied rewrites84.7%
if -3.4000000000000001e194 < z < -3.79999999999999996e56Initial program 63.8%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lift--.f64N/A
flip--N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f64N/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-/.f6471.6
Applied rewrites71.6%
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--.f6458.0
Applied rewrites58.0%
Applied rewrites69.2%
if -3.79999999999999996e56 < z < 9.1999999999999994e47Initial program 87.8%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6480.4
Applied rewrites80.4%
if 9.1999999999999994e47 < z Initial program 36.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
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites87.2%
Taylor expanded in a around 0
Applied rewrites81.4%
Applied rewrites83.6%
Final simplification80.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (/ (fma -1.0 t x) z) (- y a) t)))
(if (<= z -1.9e+110)
t_1
(if (<= z 3.5e+39) (+ (/ (* (- y z) (- t x)) (- a z)) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((fma(-1.0, t, x) / z), (y - a), t);
double tmp;
if (z <= -1.9e+110) {
tmp = t_1;
} else if (z <= 3.5e+39) {
tmp = (((y - z) * (t - x)) / (a - z)) + x;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(fma(-1.0, t, x) / z), Float64(y - a), t) tmp = 0.0 if (z <= -1.9e+110) tmp = t_1; elseif (z <= 3.5e+39) tmp = Float64(Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z)) + x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(-1.0 * t + x), $MachinePrecision] / z), $MachinePrecision] * N[(y - a), $MachinePrecision] + t), $MachinePrecision]}, If[LessEqual[z, -1.9e+110], t$95$1, If[LessEqual[z, 3.5e+39], N[(N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{\mathsf{fma}\left(-1, t, x\right)}{z}, y - a, t\right)\\
\mathbf{if}\;z \leq -1.9 \cdot 10^{+110}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3.5 \cdot 10^{+39}:\\
\;\;\;\;\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.89999999999999994e110 or 3.5000000000000002e39 < z Initial program 35.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
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites82.0%
if -1.89999999999999994e110 < z < 3.5000000000000002e39Initial program 87.4%
Final simplification85.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (/ (fma -1.0 t x) z) (- y a) t)))
(if (<= z -3.3e+109)
t_1
(if (<= z 6.2e+44) (+ (/ (* (- t x) y) (- a z)) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((fma(-1.0, t, x) / z), (y - a), t);
double tmp;
if (z <= -3.3e+109) {
tmp = t_1;
} else if (z <= 6.2e+44) {
tmp = (((t - x) * y) / (a - z)) + x;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(fma(-1.0, t, x) / z), Float64(y - a), t) tmp = 0.0 if (z <= -3.3e+109) tmp = t_1; elseif (z <= 6.2e+44) tmp = Float64(Float64(Float64(Float64(t - x) * y) / Float64(a - z)) + x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(-1.0 * t + x), $MachinePrecision] / z), $MachinePrecision] * N[(y - a), $MachinePrecision] + t), $MachinePrecision]}, If[LessEqual[z, -3.3e+109], t$95$1, If[LessEqual[z, 6.2e+44], N[(N[(N[(N[(t - x), $MachinePrecision] * y), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{\mathsf{fma}\left(-1, t, x\right)}{z}, y - a, t\right)\\
\mathbf{if}\;z \leq -3.3 \cdot 10^{+109}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 6.2 \cdot 10^{+44}:\\
\;\;\;\;\frac{\left(t - x\right) \cdot y}{a - z} + x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -3.2999999999999999e109 or 6.19999999999999991e44 < z Initial program 35.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
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites83.3%
if -3.2999999999999999e109 < z < 6.19999999999999991e44Initial program 86.4%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6477.6
Applied rewrites77.6%
Final simplification79.9%
(FPCore (x y z t a) :precision binary64 (if (<= a -6.2e-24) (fma (- y z) (/ (- t x) a) x) (if (<= a 0.0048) (fma (- x t) (/ y z) t) (fma (/ (- y z) a) (- t x) x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -6.2e-24) {
tmp = fma((y - z), ((t - x) / a), x);
} else if (a <= 0.0048) {
tmp = fma((x - t), (y / z), t);
} else {
tmp = fma(((y - z) / a), (t - x), x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (a <= -6.2e-24) tmp = fma(Float64(y - z), Float64(Float64(t - x) / a), x); elseif (a <= 0.0048) tmp = fma(Float64(x - t), Float64(y / z), t); else tmp = fma(Float64(Float64(y - z) / a), Float64(t - x), x); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -6.2e-24], N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[a, 0.0048], N[(N[(x - t), $MachinePrecision] * N[(y / z), $MachinePrecision] + t), $MachinePrecision], N[(N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -6.2 \cdot 10^{-24}:\\
\;\;\;\;\mathsf{fma}\left(y - z, \frac{t - x}{a}, x\right)\\
\mathbf{elif}\;a \leq 0.0048:\\
\;\;\;\;\mathsf{fma}\left(x - t, \frac{y}{z}, t\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y - z}{a}, t - x, x\right)\\
\end{array}
\end{array}
if a < -6.2000000000000001e-24Initial program 69.9%
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--.f6477.2
Applied rewrites77.2%
if -6.2000000000000001e-24 < a < 0.00479999999999999958Initial program 66.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
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites81.2%
Taylor expanded in a around 0
Applied rewrites79.7%
Applied rewrites82.2%
if 0.00479999999999999958 < a Initial program 63.4%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lift--.f64N/A
flip--N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f64N/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-/.f6485.1
Applied rewrites85.1%
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--.f6470.4
Applied rewrites70.4%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma (- y z) (/ (- t x) a) x))) (if (<= a -6.2e-24) t_1 (if (<= a 0.0048) (fma (- x t) (/ y z) 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 <= -6.2e-24) {
tmp = t_1;
} else if (a <= 0.0048) {
tmp = fma((x - t), (y / z), 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 <= -6.2e-24) tmp = t_1; elseif (a <= 0.0048) 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[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -6.2e-24], t$95$1, If[LessEqual[a, 0.0048], N[(N[(x - t), $MachinePrecision] * N[(y / z), $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 -6.2 \cdot 10^{-24}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 0.0048:\\
\;\;\;\;\mathsf{fma}\left(x - t, \frac{y}{z}, t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -6.2000000000000001e-24 or 0.00479999999999999958 < a Initial program 66.8%
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--.f6473.3
Applied rewrites73.3%
if -6.2000000000000001e-24 < a < 0.00479999999999999958Initial program 66.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
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites81.2%
Taylor expanded in a around 0
Applied rewrites79.7%
Applied rewrites82.2%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma (- x t) (/ y z) t))) (if (<= z -7e+14) t_1 (if (<= z 5.7e-61) (fma (/ (- t x) a) y x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((x - t), (y / z), t);
double tmp;
if (z <= -7e+14) {
tmp = t_1;
} else if (z <= 5.7e-61) {
tmp = fma(((t - x) / a), y, x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(x - t), Float64(y / z), t) tmp = 0.0 if (z <= -7e+14) tmp = t_1; elseif (z <= 5.7e-61) tmp = fma(Float64(Float64(t - x) / a), y, x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x - t), $MachinePrecision] * N[(y / z), $MachinePrecision] + t), $MachinePrecision]}, If[LessEqual[z, -7e+14], t$95$1, If[LessEqual[z, 5.7e-61], N[(N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] * y + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(x - t, \frac{y}{z}, t\right)\\
\mathbf{if}\;z \leq -7 \cdot 10^{+14}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 5.7 \cdot 10^{-61}:\\
\;\;\;\;\mathsf{fma}\left(\frac{t - x}{a}, y, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -7e14 or 5.70000000000000005e-61 < z Initial program 48.2%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites74.8%
Taylor expanded in a around 0
Applied rewrites68.6%
Applied rewrites71.4%
if -7e14 < z < 5.70000000000000005e-61Initial program 89.8%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6480.5
Applied rewrites80.5%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (+ (* (/ t a) y) x))) (if (<= a -8.2e-24) t_1 (if (<= a 0.265) (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 <= -8.2e-24) {
tmp = t_1;
} else if (a <= 0.265) {
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 <= -8.2e-24) tmp = t_1; elseif (a <= 0.265) 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, -8.2e-24], t$95$1, If[LessEqual[a, 0.265], 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 -8.2 \cdot 10^{-24}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 0.265:\\
\;\;\;\;\mathsf{fma}\left(x - t, \frac{y}{z}, t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -8.20000000000000029e-24 or 0.26500000000000001 < a Initial program 66.8%
Taylor expanded in a around inf
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6473.9
Applied rewrites73.9%
Taylor expanded in x around 0
Applied rewrites61.4%
Taylor expanded in y around inf
Applied rewrites63.5%
if -8.20000000000000029e-24 < a < 0.26500000000000001Initial program 66.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
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites81.2%
Taylor expanded in a around 0
Applied rewrites79.7%
Applied rewrites82.2%
Final simplification72.2%
(FPCore (x y z t a) :precision binary64 (if (<= z -2e+131) (fma (/ x z) (- a) t) (if (<= z 6600000.0) (+ (* (/ t a) y) x) (fma (/ (- t) z) y t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2e+131) {
tmp = fma((x / z), -a, t);
} else if (z <= 6600000.0) {
tmp = ((t / a) * y) + x;
} else {
tmp = fma((-t / z), y, t);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2e+131) tmp = fma(Float64(x / z), Float64(-a), t); elseif (z <= 6600000.0) tmp = Float64(Float64(Float64(t / a) * y) + x); else tmp = fma(Float64(Float64(-t) / z), y, t); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2e+131], N[(N[(x / z), $MachinePrecision] * (-a) + t), $MachinePrecision], If[LessEqual[z, 6600000.0], N[(N[(N[(t / a), $MachinePrecision] * y), $MachinePrecision] + x), $MachinePrecision], N[(N[((-t) / z), $MachinePrecision] * y + t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2 \cdot 10^{+131}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x}{z}, -a, t\right)\\
\mathbf{elif}\;z \leq 6600000:\\
\;\;\;\;\frac{t}{a} \cdot y + x\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{-t}{z}, y, t\right)\\
\end{array}
\end{array}
if z < -1.9999999999999998e131Initial program 31.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
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites82.1%
Taylor expanded in x around inf
Applied rewrites79.8%
Taylor expanded in y around 0
Applied rewrites66.9%
if -1.9999999999999998e131 < z < 6.6e6Initial program 85.3%
Taylor expanded in a around inf
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6474.3
Applied rewrites74.3%
Taylor expanded in x around 0
Applied rewrites61.1%
Taylor expanded in y around inf
Applied rewrites62.4%
if 6.6e6 < z Initial program 42.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
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites81.8%
Taylor expanded in a around 0
Applied rewrites76.6%
Taylor expanded in x around 0
Applied rewrites58.8%
Final simplification62.1%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* (/ (- x t) z) y))) (if (<= y -4.3e+40) t_1 (if (<= y 0.0041) (fma (/ x z) (- a) t) 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 <= -4.3e+40) {
tmp = t_1;
} else if (y <= 0.0041) {
tmp = fma((x / z), -a, t);
} 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 <= -4.3e+40) tmp = t_1; elseif (y <= 0.0041) tmp = fma(Float64(x / z), Float64(-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] / z), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[y, -4.3e+40], t$95$1, If[LessEqual[y, 0.0041], N[(N[(x / z), $MachinePrecision] * (-a) + t), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x - t}{z} \cdot y\\
\mathbf{if}\;y \leq -4.3 \cdot 10^{+40}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 0.0041:\\
\;\;\;\;\mathsf{fma}\left(\frac{x}{z}, -a, t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -4.3000000000000002e40 or 0.00410000000000000035 < y Initial program 67.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
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites58.4%
Taylor expanded in x around inf
Applied rewrites41.9%
Taylor expanded in y around inf
Applied rewrites46.5%
if -4.3000000000000002e40 < y < 0.00410000000000000035Initial program 65.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
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites49.4%
Taylor expanded in x around inf
Applied rewrites48.5%
Taylor expanded in y around 0
Applied rewrites46.5%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma (/ (- t) z) y t))) (if (<= t -8.3e-147) t_1 (if (<= t 4.5e-84) (* (/ (- y a) z) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((-t / z), y, t);
double tmp;
if (t <= -8.3e-147) {
tmp = t_1;
} else if (t <= 4.5e-84) {
tmp = ((y - a) / z) * x;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(Float64(-t) / z), y, t) tmp = 0.0 if (t <= -8.3e-147) tmp = t_1; elseif (t <= 4.5e-84) tmp = Float64(Float64(Float64(y - a) / z) * x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[((-t) / z), $MachinePrecision] * y + t), $MachinePrecision]}, If[LessEqual[t, -8.3e-147], t$95$1, If[LessEqual[t, 4.5e-84], N[(N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision] * x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{-t}{z}, y, t\right)\\
\mathbf{if}\;t \leq -8.3 \cdot 10^{-147}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 4.5 \cdot 10^{-84}:\\
\;\;\;\;\frac{y - a}{z} \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -8.3e-147 or 4.50000000000000016e-84 < t Initial program 65.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
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites58.3%
Taylor expanded in a around 0
Applied rewrites57.3%
Taylor expanded in x around 0
Applied rewrites52.2%
if -8.3e-147 < t < 4.50000000000000016e-84Initial program 68.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
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites44.8%
Taylor expanded in x around inf
Applied rewrites35.6%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma (/ (- t) z) y t))) (if (<= t -3e-147) t_1 (if (<= t 4.9e-121) (* (/ y z) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((-t / z), y, t);
double tmp;
if (t <= -3e-147) {
tmp = t_1;
} else if (t <= 4.9e-121) {
tmp = (y / z) * x;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(Float64(-t) / z), y, t) tmp = 0.0 if (t <= -3e-147) tmp = t_1; elseif (t <= 4.9e-121) tmp = Float64(Float64(y / z) * x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[((-t) / z), $MachinePrecision] * y + t), $MachinePrecision]}, If[LessEqual[t, -3e-147], t$95$1, If[LessEqual[t, 4.9e-121], N[(N[(y / z), $MachinePrecision] * x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{-t}{z}, y, t\right)\\
\mathbf{if}\;t \leq -3 \cdot 10^{-147}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 4.9 \cdot 10^{-121}:\\
\;\;\;\;\frac{y}{z} \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -3.0000000000000002e-147 or 4.9e-121 < t Initial program 65.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
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites56.8%
Taylor expanded in a around 0
Applied rewrites54.7%
Taylor expanded in x around 0
Applied rewrites49.6%
if -3.0000000000000002e-147 < t < 4.9e-121Initial program 68.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
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites46.3%
Taylor expanded in y around inf
Applied rewrites33.8%
Taylor expanded in x around inf
Applied rewrites32.0%
Applied rewrites34.4%
Final simplification45.1%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* (/ y z) x))) (if (<= y -5.6e-24) t_1 (if (<= y 6.3e-19) (+ (- 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 <= -5.6e-24) {
tmp = t_1;
} else if (y <= 6.3e-19) {
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 <= (-5.6d-24)) then
tmp = t_1
else if (y <= 6.3d-19) 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 <= -5.6e-24) {
tmp = t_1;
} else if (y <= 6.3e-19) {
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 <= -5.6e-24: tmp = t_1 elif y <= 6.3e-19: 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 <= -5.6e-24) tmp = t_1; elseif (y <= 6.3e-19) 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 <= -5.6e-24) tmp = t_1; elseif (y <= 6.3e-19) 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, -5.6e-24], t$95$1, If[LessEqual[y, 6.3e-19], 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 -5.6 \cdot 10^{-24}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 6.3 \cdot 10^{-19}:\\
\;\;\;\;\left(t - x\right) + x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -5.6000000000000003e-24 or 6.30000000000000018e-19 < y Initial program 67.2%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites56.6%
Taylor expanded in y around inf
Applied rewrites42.4%
Taylor expanded in x around inf
Applied rewrites28.7%
Applied rewrites31.3%
if -5.6000000000000003e-24 < y < 6.30000000000000018e-19Initial program 65.4%
Taylor expanded in z around inf
lower--.f6431.0
Applied rewrites31.0%
Final simplification31.2%
(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 66.4%
Taylor expanded in z around inf
lower--.f6420.7
Applied rewrites20.7%
Final simplification20.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 66.4%
Taylor expanded in z around inf
lower--.f6420.7
Applied rewrites20.7%
Taylor expanded in x around inf
Applied rewrites2.7%
Final simplification2.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- t (* (/ y z) (- t x)))))
(if (< z -1.2536131056095036e+188)
t_1
(if (< z 4.446702369113811e+64)
(+ x (/ (- y z) (/ (- a z) (- t x))))
t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t - ((y / z) * (t - x));
double tmp;
if (z < -1.2536131056095036e+188) {
tmp = t_1;
} else if (z < 4.446702369113811e+64) {
tmp = x + ((y - z) / ((a - z) / (t - 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 - ((y / z) * (t - x))
if (z < (-1.2536131056095036d+188)) then
tmp = t_1
else if (z < 4.446702369113811d+64) then
tmp = x + ((y - z) / ((a - z) / (t - 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 - ((y / z) * (t - x));
double tmp;
if (z < -1.2536131056095036e+188) {
tmp = t_1;
} else if (z < 4.446702369113811e+64) {
tmp = x + ((y - z) / ((a - z) / (t - x)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t - ((y / z) * (t - x)) tmp = 0 if z < -1.2536131056095036e+188: tmp = t_1 elif z < 4.446702369113811e+64: tmp = x + ((y - z) / ((a - z) / (t - x))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t - Float64(Float64(y / z) * Float64(t - x))) tmp = 0.0 if (z < -1.2536131056095036e+188) tmp = t_1; elseif (z < 4.446702369113811e+64) tmp = Float64(x + Float64(Float64(y - z) / Float64(Float64(a - z) / Float64(t - x)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t - ((y / z) * (t - x)); tmp = 0.0; if (z < -1.2536131056095036e+188) tmp = t_1; elseif (z < 4.446702369113811e+64) tmp = x + ((y - z) / ((a - z) / (t - x))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t - N[(N[(y / z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[z, -1.2536131056095036e+188], t$95$1, If[Less[z, 4.446702369113811e+64], N[(x + N[(N[(y - z), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t - \frac{y}{z} \cdot \left(t - x\right)\\
\mathbf{if}\;z < -1.2536131056095036 \cdot 10^{+188}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z < 4.446702369113811 \cdot 10^{+64}:\\
\;\;\;\;x + \frac{y - z}{\frac{a - z}{t - x}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
herbie shell --seed 2024332
(FPCore (x y z t a)
:name "Graphics.Rendering.Chart.Axis.Types:invLinMap from Chart-1.5.3"
:precision binary64
:alt
(! :herbie-platform default (if (< z -125361310560950360000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- t (* (/ y z) (- t x))) (if (< z 44467023691138110000000000000000000000000000000000000000000000000) (+ x (/ (- y z) (/ (- a z) (- t x)))) (- t (* (/ y z) (- t x))))))
(+ x (/ (* (- y z) (- t x)) (- a z))))