
(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 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(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 (+ x (/ (* (- y z) (- t x)) (- a z)))))
(if (<= t_1 -1e-307)
(fma (/ (- y z) (- a z)) (- t x) x)
(if (<= t_1 0.0)
(fma (/ (* (- t x) (- y a)) z) -1.0 t)
(fma (- (/ y (- a z)) (/ z (- a z))) (- t x) x)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((y - z) * (t - x)) / (a - z));
double tmp;
if (t_1 <= -1e-307) {
tmp = fma(((y - z) / (a - z)), (t - x), x);
} else if (t_1 <= 0.0) {
tmp = fma((((t - x) * (y - a)) / z), -1.0, t);
} else {
tmp = fma(((y / (a - z)) - (z / (a - z))), (t - x), x);
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z))) tmp = 0.0 if (t_1 <= -1e-307) tmp = fma(Float64(Float64(y - z) / Float64(a - z)), Float64(t - x), x); elseif (t_1 <= 0.0) tmp = fma(Float64(Float64(Float64(t - x) * Float64(y - a)) / z), -1.0, t); else tmp = fma(Float64(Float64(y / Float64(a - z)) - Float64(z / Float64(a - z))), Float64(t - x), x); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e-307], N[(N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t$95$1, 0.0], N[(N[(N[(N[(t - x), $MachinePrecision] * N[(y - a), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] * -1.0 + t), $MachinePrecision], N[(N[(N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision] - N[(z / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{-307}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;\mathsf{fma}\left(\frac{\left(t - x\right) \cdot \left(y - a\right)}{z}, -1, t\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{a - z} - \frac{z}{a - z}, t - x, x\right)\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -9.99999999999999909e-308Initial program 76.0%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6492.2
Applied rewrites92.2%
if -9.99999999999999909e-308 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 0.0Initial program 3.4%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f643.4
Applied rewrites3.4%
Taylor expanded in y around -inf
associate-*r*N/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower--.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f644.3
Applied rewrites4.3%
Taylor expanded in z around inf
associate--l+N/A
associate-*r/N/A
associate-*r/N/A
associate-*r*N/A
mul-1-negN/A
div-subN/A
mul-1-negN/A
associate-*r*N/A
distribute-lft-out--N/A
associate-*r/N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites99.9%
if 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) Initial program 75.8%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6492.4
Applied rewrites92.4%
lift-/.f64N/A
lift--.f64N/A
div-subN/A
lift-/.f64N/A
lower--.f64N/A
lower-/.f6492.4
Applied rewrites92.4%
Final simplification92.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ (* (- y z) (- t x)) (- a z)))))
(if (or (<= t_1 -1e-307) (not (<= t_1 0.0)))
(fma (/ (- y z) (- a z)) (- t x) x)
(fma (/ (* (- t x) (- y a)) z) -1.0 t))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((y - z) * (t - x)) / (a - z));
double tmp;
if ((t_1 <= -1e-307) || !(t_1 <= 0.0)) {
tmp = fma(((y - z) / (a - z)), (t - x), x);
} else {
tmp = fma((((t - x) * (y - a)) / z), -1.0, t);
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z))) tmp = 0.0 if ((t_1 <= -1e-307) || !(t_1 <= 0.0)) tmp = fma(Float64(Float64(y - z) / Float64(a - z)), Float64(t - x), x); else tmp = fma(Float64(Float64(Float64(t - x) * Float64(y - a)) / z), -1.0, t); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -1e-307], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision], N[(N[(N[(N[(t - x), $MachinePrecision] * N[(y - a), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] * -1.0 + t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{-307} \lor \neg \left(t\_1 \leq 0\right):\\
\;\;\;\;\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{\left(t - x\right) \cdot \left(y - a\right)}{z}, -1, t\right)\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -9.99999999999999909e-308 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) Initial program 75.9%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6492.3
Applied rewrites92.3%
if -9.99999999999999909e-308 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 0.0Initial program 3.4%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f643.4
Applied rewrites3.4%
Taylor expanded in y around -inf
associate-*r*N/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower--.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f644.3
Applied rewrites4.3%
Taylor expanded in z around inf
associate--l+N/A
associate-*r/N/A
associate-*r/N/A
associate-*r*N/A
mul-1-negN/A
div-subN/A
mul-1-negN/A
associate-*r*N/A
distribute-lft-out--N/A
associate-*r/N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites99.9%
Final simplification92.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ (* (- y z) (- t x)) (- a z)))))
(if (or (<= t_1 -1e-307) (not (<= t_1 0.0)))
(fma (/ (- y z) (- a z)) (- t x) x)
(fma (/ (- (- t x)) z) (- y a) t))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((y - z) * (t - x)) / (a - z));
double tmp;
if ((t_1 <= -1e-307) || !(t_1 <= 0.0)) {
tmp = fma(((y - z) / (a - z)), (t - x), x);
} else {
tmp = fma((-(t - x) / z), (y - a), t);
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z))) tmp = 0.0 if ((t_1 <= -1e-307) || !(t_1 <= 0.0)) tmp = fma(Float64(Float64(y - z) / Float64(a - z)), Float64(t - x), x); else tmp = fma(Float64(Float64(-Float64(t - x)) / z), Float64(y - a), t); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -1e-307], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision], N[(N[((-N[(t - x), $MachinePrecision]) / z), $MachinePrecision] * N[(y - a), $MachinePrecision] + t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{-307} \lor \neg \left(t\_1 \leq 0\right):\\
\;\;\;\;\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{-\left(t - x\right)}{z}, y - a, t\right)\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -9.99999999999999909e-308 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) Initial program 75.9%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6492.3
Applied rewrites92.3%
if -9.99999999999999909e-308 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 0.0Initial 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
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.6%
Final simplification91.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (/ (- x t) a) z x)))
(if (<= z -3.9e+86)
(fma 0.0 x t)
(if (<= z -8.5e-225)
t_1
(if (<= z 4.3e-29)
(* t (/ y (- a z)))
(if (<= z 7.5e+33) t_1 (fma 0.0 x t)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(((x - t) / a), z, x);
double tmp;
if (z <= -3.9e+86) {
tmp = fma(0.0, x, t);
} else if (z <= -8.5e-225) {
tmp = t_1;
} else if (z <= 4.3e-29) {
tmp = t * (y / (a - z));
} else if (z <= 7.5e+33) {
tmp = t_1;
} else {
tmp = fma(0.0, x, t);
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(Float64(x - t) / a), z, x) tmp = 0.0 if (z <= -3.9e+86) tmp = fma(0.0, x, t); elseif (z <= -8.5e-225) tmp = t_1; elseif (z <= 4.3e-29) tmp = Float64(t * Float64(y / Float64(a - z))); elseif (z <= 7.5e+33) tmp = t_1; else tmp = fma(0.0, x, t); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(x - t), $MachinePrecision] / a), $MachinePrecision] * z + x), $MachinePrecision]}, If[LessEqual[z, -3.9e+86], N[(0.0 * x + t), $MachinePrecision], If[LessEqual[z, -8.5e-225], t$95$1, If[LessEqual[z, 4.3e-29], N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.5e+33], t$95$1, N[(0.0 * x + t), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{x - t}{a}, z, x\right)\\
\mathbf{if}\;z \leq -3.9 \cdot 10^{+86}:\\
\;\;\;\;\mathsf{fma}\left(0, x, t\right)\\
\mathbf{elif}\;z \leq -8.5 \cdot 10^{-225}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 4.3 \cdot 10^{-29}:\\
\;\;\;\;t \cdot \frac{y}{a - z}\\
\mathbf{elif}\;z \leq 7.5 \cdot 10^{+33}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(0, x, t\right)\\
\end{array}
\end{array}
if z < -3.9000000000000002e86 or 7.50000000000000046e33 < z Initial program 45.4%
Taylor expanded in y around 0
+-commutativeN/A
mul-1-negN/A
*-commutativeN/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6454.8
Applied rewrites54.8%
Taylor expanded in z around inf
Applied rewrites56.7%
if -3.9000000000000002e86 < z < -8.4999999999999998e-225 or 4.2999999999999998e-29 < z < 7.50000000000000046e33Initial program 83.1%
Taylor expanded in y around 0
+-commutativeN/A
mul-1-negN/A
*-commutativeN/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6447.2
Applied rewrites47.2%
Taylor expanded in z around 0
Applied rewrites42.6%
if -8.4999999999999998e-225 < z < 4.2999999999999998e-29Initial program 85.5%
Taylor expanded in y 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--.f6468.7
Applied rewrites68.7%
Taylor expanded in x around 0
Applied rewrites51.4%
Final simplification50.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -2.35e-156) (not (<= a 7.5e-112))) (fma (/ (- t x) (- a z)) (- y z) x) (fma (/ (- (- t x)) z) (- y a) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.35e-156) || !(a <= 7.5e-112)) {
tmp = fma(((t - x) / (a - z)), (y - z), x);
} else {
tmp = fma((-(t - x) / z), (y - a), t);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -2.35e-156) || !(a <= 7.5e-112)) tmp = fma(Float64(Float64(t - x) / Float64(a - z)), Float64(y - z), x); else tmp = fma(Float64(Float64(-Float64(t - x)) / z), Float64(y - a), t); end return tmp end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -2.35e-156], N[Not[LessEqual[a, 7.5e-112]], $MachinePrecision]], N[(N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] * N[(y - z), $MachinePrecision] + x), $MachinePrecision], N[(N[((-N[(t - x), $MachinePrecision]) / z), $MachinePrecision] * N[(y - a), $MachinePrecision] + t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.35 \cdot 10^{-156} \lor \neg \left(a \leq 7.5 \cdot 10^{-112}\right):\\
\;\;\;\;\mathsf{fma}\left(\frac{t - x}{a - z}, y - z, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{-\left(t - x\right)}{z}, y - a, t\right)\\
\end{array}
\end{array}
if a < -2.35000000000000023e-156 or 7.5000000000000002e-112 < a Initial program 73.5%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6488.3
Applied rewrites88.3%
if -2.35000000000000023e-156 < a < 7.5000000000000002e-112Initial program 60.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
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 rewrites85.4%
Final simplification87.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -3.4e+86) (not (<= z 1.2e-13))) (fma (/ (- (- t x)) z) (- y a) t) (fma (/ y (- a z)) (- t x) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -3.4e+86) || !(z <= 1.2e-13)) {
tmp = fma((-(t - x) / z), (y - a), t);
} else {
tmp = fma((y / (a - z)), (t - x), x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -3.4e+86) || !(z <= 1.2e-13)) tmp = fma(Float64(Float64(-Float64(t - x)) / z), Float64(y - a), t); else tmp = fma(Float64(y / Float64(a - z)), Float64(t - x), x); end return tmp end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -3.4e+86], N[Not[LessEqual[z, 1.2e-13]], $MachinePrecision]], N[(N[((-N[(t - x), $MachinePrecision]) / z), $MachinePrecision] * N[(y - a), $MachinePrecision] + t), $MachinePrecision], N[(N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.4 \cdot 10^{+86} \lor \neg \left(z \leq 1.2 \cdot 10^{-13}\right):\\
\;\;\;\;\mathsf{fma}\left(\frac{-\left(t - x\right)}{z}, y - a, t\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{a - z}, t - x, x\right)\\
\end{array}
\end{array}
if z < -3.3999999999999998e86 or 1.1999999999999999e-13 < z Initial program 50.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 rewrites75.2%
if -3.3999999999999998e86 < z < 1.1999999999999999e-13Initial program 85.2%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6493.8
Applied rewrites93.8%
Taylor expanded in y around inf
lower-/.f64N/A
lower--.f6485.6
Applied rewrites85.6%
Final simplification80.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -4.25e+52) (not (<= z 5.1e+14))) (* (- y z) (/ t (- a z))) (fma (/ y (- a z)) (- t x) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -4.25e+52) || !(z <= 5.1e+14)) {
tmp = (y - z) * (t / (a - z));
} else {
tmp = fma((y / (a - z)), (t - x), x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -4.25e+52) || !(z <= 5.1e+14)) tmp = Float64(Float64(y - z) * Float64(t / Float64(a - z))); else tmp = fma(Float64(y / Float64(a - z)), Float64(t - x), x); end return tmp end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -4.25e+52], N[Not[LessEqual[z, 5.1e+14]], $MachinePrecision]], N[(N[(y - z), $MachinePrecision] * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.25 \cdot 10^{+52} \lor \neg \left(z \leq 5.1 \cdot 10^{+14}\right):\\
\;\;\;\;\left(y - z\right) \cdot \frac{t}{a - z}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{a - z}, t - x, x\right)\\
\end{array}
\end{array}
if z < -4.24999999999999997e52 or 5.1e14 < z Initial program 49.1%
Taylor expanded in x around 0
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6466.2
Applied rewrites66.2%
if -4.24999999999999997e52 < z < 5.1e14Initial program 83.9%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6491.5
Applied rewrites91.5%
Taylor expanded in y around inf
lower-/.f64N/A
lower--.f6483.4
Applied rewrites83.4%
Final simplification76.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -4.9) (not (<= a 1.06e+66))) (fma (- y z) (/ (- t x) a) x) (* (- y z) (/ t (- a z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -4.9) || !(a <= 1.06e+66)) {
tmp = fma((y - z), ((t - x) / a), x);
} else {
tmp = (y - z) * (t / (a - z));
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -4.9) || !(a <= 1.06e+66)) tmp = fma(Float64(y - z), Float64(Float64(t - x) / a), x); else tmp = Float64(Float64(y - z) * Float64(t / Float64(a - z))); end return tmp end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -4.9], N[Not[LessEqual[a, 1.06e+66]], $MachinePrecision]], N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], N[(N[(y - z), $MachinePrecision] * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.9 \lor \neg \left(a \leq 1.06 \cdot 10^{+66}\right):\\
\;\;\;\;\mathsf{fma}\left(y - z, \frac{t - x}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;\left(y - z\right) \cdot \frac{t}{a - z}\\
\end{array}
\end{array}
if a < -4.9000000000000004 or 1.06000000000000004e66 < a Initial program 74.7%
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--.f6485.7
Applied rewrites85.7%
if -4.9000000000000004 < a < 1.06000000000000004e66Initial program 66.3%
Taylor expanded in x around 0
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6462.4
Applied rewrites62.4%
Final simplification71.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -4.5e-80) (not (<= z 5e-122))) (* (- y z) (/ t (- a z))) (fma (/ y a) (- t x) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -4.5e-80) || !(z <= 5e-122)) {
tmp = (y - z) * (t / (a - z));
} else {
tmp = fma((y / a), (t - x), x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -4.5e-80) || !(z <= 5e-122)) tmp = Float64(Float64(y - z) * Float64(t / Float64(a - z))); else tmp = fma(Float64(y / a), Float64(t - x), x); end return tmp end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -4.5e-80], N[Not[LessEqual[z, 5e-122]], $MachinePrecision]], N[(N[(y - z), $MachinePrecision] * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y / a), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.5 \cdot 10^{-80} \lor \neg \left(z \leq 5 \cdot 10^{-122}\right):\\
\;\;\;\;\left(y - z\right) \cdot \frac{t}{a - z}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{a}, t - x, x\right)\\
\end{array}
\end{array}
if z < -4.5000000000000003e-80 or 4.9999999999999999e-122 < z Initial program 61.1%
Taylor expanded in x around 0
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6464.8
Applied rewrites64.8%
if -4.5000000000000003e-80 < z < 4.9999999999999999e-122Initial program 85.0%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6493.2
Applied rewrites93.2%
Taylor expanded in z around 0
lower-/.f6481.0
Applied rewrites81.0%
Final simplification70.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.75) (not (<= a 1.06e+66))) (fma (/ y a) (- t x) x) (* (- t) (/ (- y z) z))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.75) || !(a <= 1.06e+66)) {
tmp = fma((y / a), (t - x), x);
} else {
tmp = -t * ((y - z) / z);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.75) || !(a <= 1.06e+66)) tmp = fma(Float64(y / a), Float64(t - x), x); else tmp = Float64(Float64(-t) * Float64(Float64(y - z) / z)); end return tmp end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.75], N[Not[LessEqual[a, 1.06e+66]], $MachinePrecision]], N[(N[(y / a), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision], N[((-t) * N[(N[(y - z), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.75 \lor \neg \left(a \leq 1.06 \cdot 10^{+66}\right):\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{a}, t - x, x\right)\\
\mathbf{else}:\\
\;\;\;\;\left(-t\right) \cdot \frac{y - z}{z}\\
\end{array}
\end{array}
if a < -1.75 or 1.06000000000000004e66 < a Initial program 74.7%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6496.0
Applied rewrites96.0%
Taylor expanded in z around 0
lower-/.f6477.4
Applied rewrites77.4%
if -1.75 < a < 1.06000000000000004e66Initial program 66.3%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6477.1
Applied rewrites77.1%
Taylor expanded in x around 0
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6454.8
Applied rewrites54.8%
Taylor expanded in a around 0
Applied rewrites59.9%
Final simplification66.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -4.3e+52) (not (<= z 5.1e+14))) (* (- t) (/ z (- a z))) (fma (/ y a) (- t x) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -4.3e+52) || !(z <= 5.1e+14)) {
tmp = -t * (z / (a - z));
} else {
tmp = fma((y / a), (t - x), x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -4.3e+52) || !(z <= 5.1e+14)) tmp = Float64(Float64(-t) * Float64(z / Float64(a - z))); else tmp = fma(Float64(y / a), Float64(t - x), x); end return tmp end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -4.3e+52], N[Not[LessEqual[z, 5.1e+14]], $MachinePrecision]], N[((-t) * N[(z / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y / a), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.3 \cdot 10^{+52} \lor \neg \left(z \leq 5.1 \cdot 10^{+14}\right):\\
\;\;\;\;\left(-t\right) \cdot \frac{z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{a}, t - x, x\right)\\
\end{array}
\end{array}
if z < -4.3e52 or 5.1e14 < z Initial program 49.1%
Taylor expanded in y around 0
+-commutativeN/A
mul-1-negN/A
*-commutativeN/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6455.8
Applied rewrites55.8%
Taylor expanded in x around 0
Applied rewrites59.3%
if -4.3e52 < z < 5.1e14Initial program 83.9%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6491.5
Applied rewrites91.5%
Taylor expanded in z around 0
lower-/.f6466.7
Applied rewrites66.7%
Final simplification63.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -3.9e+86) (not (<= z 5.1e+14))) (fma 0.0 x t) (fma (/ y a) (- t x) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -3.9e+86) || !(z <= 5.1e+14)) {
tmp = fma(0.0, x, t);
} else {
tmp = fma((y / a), (t - x), x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -3.9e+86) || !(z <= 5.1e+14)) tmp = fma(0.0, x, t); else tmp = fma(Float64(y / a), Float64(t - x), x); end return tmp end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -3.9e+86], N[Not[LessEqual[z, 5.1e+14]], $MachinePrecision]], N[(0.0 * x + t), $MachinePrecision], N[(N[(y / a), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.9 \cdot 10^{+86} \lor \neg \left(z \leq 5.1 \cdot 10^{+14}\right):\\
\;\;\;\;\mathsf{fma}\left(0, x, t\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{a}, t - x, x\right)\\
\end{array}
\end{array}
if z < -3.9000000000000002e86 or 5.1e14 < z Initial program 48.0%
Taylor expanded in y around 0
+-commutativeN/A
mul-1-negN/A
*-commutativeN/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6455.0
Applied rewrites55.0%
Taylor expanded in z around inf
Applied rewrites55.0%
if -3.9000000000000002e86 < z < 5.1e14Initial program 83.7%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6491.7
Applied rewrites91.7%
Taylor expanded in z around 0
lower-/.f6465.6
Applied rewrites65.6%
Final simplification61.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -3.9e+86) (not (<= z 5.1e+14))) (fma 0.0 x t) (fma (/ (- t x) a) y x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -3.9e+86) || !(z <= 5.1e+14)) {
tmp = fma(0.0, x, t);
} else {
tmp = fma(((t - x) / a), y, x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -3.9e+86) || !(z <= 5.1e+14)) tmp = fma(0.0, x, t); else tmp = fma(Float64(Float64(t - x) / a), y, x); end return tmp end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -3.9e+86], N[Not[LessEqual[z, 5.1e+14]], $MachinePrecision]], N[(0.0 * x + t), $MachinePrecision], N[(N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] * y + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.9 \cdot 10^{+86} \lor \neg \left(z \leq 5.1 \cdot 10^{+14}\right):\\
\;\;\;\;\mathsf{fma}\left(0, x, t\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{t - x}{a}, y, x\right)\\
\end{array}
\end{array}
if z < -3.9000000000000002e86 or 5.1e14 < z Initial program 48.0%
Taylor expanded in y around 0
+-commutativeN/A
mul-1-negN/A
*-commutativeN/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6455.0
Applied rewrites55.0%
Taylor expanded in z around inf
Applied rewrites55.0%
if -3.9000000000000002e86 < z < 5.1e14Initial program 83.7%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6463.6
Applied rewrites63.6%
Final simplification60.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.8e+30) (not (<= z 2.1e-14))) (fma 0.0 x t) (* t (/ y (- a z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.8e+30) || !(z <= 2.1e-14)) {
tmp = fma(0.0, x, t);
} else {
tmp = t * (y / (a - z));
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.8e+30) || !(z <= 2.1e-14)) tmp = fma(0.0, x, t); else tmp = Float64(t * Float64(y / Float64(a - z))); end return tmp end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.8e+30], N[Not[LessEqual[z, 2.1e-14]], $MachinePrecision]], N[(0.0 * x + t), $MachinePrecision], N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.8 \cdot 10^{+30} \lor \neg \left(z \leq 2.1 \cdot 10^{-14}\right):\\
\;\;\;\;\mathsf{fma}\left(0, x, t\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y}{a - z}\\
\end{array}
\end{array}
if z < -1.8000000000000001e30 or 2.0999999999999999e-14 < z Initial program 52.0%
Taylor expanded in y around 0
+-commutativeN/A
mul-1-negN/A
*-commutativeN/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6454.6
Applied rewrites54.6%
Taylor expanded in z around inf
Applied rewrites48.6%
if -1.8000000000000001e30 < z < 2.0999999999999999e-14Initial program 86.2%
Taylor expanded in y 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--.f6461.4
Applied rewrites61.4%
Taylor expanded in x around 0
Applied rewrites43.7%
Final simplification46.1%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.05e-149) (+ x (* -1.0 (- t))) (if (<= z 1.62e-43) (* t (/ y a)) (fma 0.0 x t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.05e-149) {
tmp = x + (-1.0 * -t);
} else if (z <= 1.62e-43) {
tmp = t * (y / a);
} else {
tmp = fma(0.0, x, t);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.05e-149) tmp = Float64(x + Float64(-1.0 * Float64(-t))); elseif (z <= 1.62e-43) tmp = Float64(t * Float64(y / a)); else tmp = fma(0.0, x, t); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.05e-149], N[(x + N[(-1.0 * (-t)), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.62e-43], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], N[(0.0 * x + t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.05 \cdot 10^{-149}:\\
\;\;\;\;x + -1 \cdot \left(-t\right)\\
\mathbf{elif}\;z \leq 1.62 \cdot 10^{-43}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(0, x, t\right)\\
\end{array}
\end{array}
if z < -1.05000000000000005e-149Initial program 63.4%
Taylor expanded in z around inf
lower--.f6423.0
Applied rewrites23.0%
Taylor expanded in t around -inf
Applied rewrites24.1%
Taylor expanded in x around 0
Applied rewrites37.0%
if -1.05000000000000005e-149 < z < 1.6199999999999999e-43Initial program 86.4%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6496.2
Applied rewrites96.2%
Taylor expanded in x around 0
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6439.5
Applied rewrites39.5%
Taylor expanded in z around 0
Applied rewrites37.0%
if 1.6199999999999999e-43 < z Initial program 58.5%
Taylor expanded in y around 0
+-commutativeN/A
mul-1-negN/A
*-commutativeN/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6452.4
Applied rewrites52.4%
Taylor expanded in z around inf
Applied rewrites46.5%
Final simplification39.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -2.9e-90) (not (<= a 1.55e-58))) (+ x (* -1.0 (- t))) (fma 0.0 x t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.9e-90) || !(a <= 1.55e-58)) {
tmp = x + (-1.0 * -t);
} else {
tmp = fma(0.0, x, t);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -2.9e-90) || !(a <= 1.55e-58)) tmp = Float64(x + Float64(-1.0 * Float64(-t))); else tmp = fma(0.0, x, t); end return tmp end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -2.9e-90], N[Not[LessEqual[a, 1.55e-58]], $MachinePrecision]], N[(x + N[(-1.0 * (-t)), $MachinePrecision]), $MachinePrecision], N[(0.0 * x + t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.9 \cdot 10^{-90} \lor \neg \left(a \leq 1.55 \cdot 10^{-58}\right):\\
\;\;\;\;x + -1 \cdot \left(-t\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(0, x, t\right)\\
\end{array}
\end{array}
if a < -2.89999999999999983e-90 or 1.55e-58 < a Initial program 76.5%
Taylor expanded in z around inf
lower--.f6416.3
Applied rewrites16.3%
Taylor expanded in t around -inf
Applied rewrites16.3%
Taylor expanded in x around 0
Applied rewrites36.8%
if -2.89999999999999983e-90 < a < 1.55e-58Initial program 58.6%
Taylor expanded in y around 0
+-commutativeN/A
mul-1-negN/A
*-commutativeN/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6428.2
Applied rewrites28.2%
Taylor expanded in z around inf
Applied rewrites38.4%
Final simplification37.4%
(FPCore (x y z t a) :precision binary64 (+ x (* -1.0 (- t))))
double code(double x, double y, double z, double t, double a) {
return x + (-1.0 * -t);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + ((-1.0d0) * -t)
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (-1.0 * -t);
}
def code(x, y, z, t, a): return x + (-1.0 * -t)
function code(x, y, z, t, a) return Float64(x + Float64(-1.0 * Float64(-t))) end
function tmp = code(x, y, z, t, a) tmp = x + (-1.0 * -t); end
code[x_, y_, z_, t_, a_] := N[(x + N[(-1.0 * (-t)), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + -1 \cdot \left(-t\right)
\end{array}
Initial program 69.6%
Taylor expanded in z around inf
lower--.f6419.7
Applied rewrites19.7%
Taylor expanded in t around -inf
Applied rewrites20.1%
Taylor expanded in x around 0
Applied rewrites31.3%
(FPCore (x y z t a) :precision binary64 (+ x (- t x)))
double code(double x, double y, double z, double t, double a) {
return x + (t - 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 + (t - x)
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (t - x);
}
def code(x, y, z, t, a): return x + (t - x)
function code(x, y, z, t, a) return Float64(x + Float64(t - x)) end
function tmp = code(x, y, z, t, a) tmp = x + (t - x); end
code[x_, y_, z_, t_, a_] := N[(x + N[(t - x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(t - x\right)
\end{array}
Initial program 69.6%
Taylor expanded in z around inf
lower--.f6419.7
Applied rewrites19.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(x + Float64(-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}
\\
x + \left(-x\right)
\end{array}
Initial program 69.6%
Taylor expanded in z around inf
lower--.f6419.7
Applied rewrites19.7%
Taylor expanded in x around inf
Applied rewrites2.8%
(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 2024337
(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))))