
(FPCore (x y z t a b) :precision binary64 (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))
double code(double x, double y, double z, double t, double a, double b) {
return ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
code = ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
def code(x, y, z, t, a, b): return ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / Float64(y + Float64(z * Float64(b - y)))) end
function tmp = code(x, y, z, t, a, b) tmp = ((x * y) + (z * (t - a))) / (y + (z * (b - y))); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 19 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))
double code(double x, double y, double z, double t, double a, double b) {
return ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
code = ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
def code(x, y, z, t, a, b): return ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / Float64(y + Float64(z * Float64(b - y)))) end
function tmp = code(x, y, z, t, a, b) tmp = ((x * y) + (z * (t - a))) / (y + (z * (b - y))); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}
\end{array}
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (- b y)))
(t_2 (/ (+ (* x y) (* z (- t a))) (+ y t_1)))
(t_3 (/ x (- 1.0 z)))
(t_4 (/ (- t a) (- b y))))
(if (<= t_2 (- INFINITY))
(fma z (/ (- t a) t_1) t_3)
(if (<= t_2 -5e-243)
t_2
(if (<= t_2 0.0)
(+
(/ (+ (/ (* x y) (- b y)) (/ (* y (- t a)) (* (- b y) (- y b)))) z)
t_4)
(if (<= t_2 2e+284)
t_2
(if (<= t_2 INFINITY)
(fma z (/ (- t a) (fma z (- b y) y)) t_3)
(- t_4 (/ (fma y (/ (- t a) (* (- b y) (- b y))) x) z)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (b - y);
double t_2 = ((x * y) + (z * (t - a))) / (y + t_1);
double t_3 = x / (1.0 - z);
double t_4 = (t - a) / (b - y);
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = fma(z, ((t - a) / t_1), t_3);
} else if (t_2 <= -5e-243) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = ((((x * y) / (b - y)) + ((y * (t - a)) / ((b - y) * (y - b)))) / z) + t_4;
} else if (t_2 <= 2e+284) {
tmp = t_2;
} else if (t_2 <= ((double) INFINITY)) {
tmp = fma(z, ((t - a) / fma(z, (b - y), y)), t_3);
} else {
tmp = t_4 - (fma(y, ((t - a) / ((b - y) * (b - y))), x) / z);
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(b - y)) t_2 = Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / Float64(y + t_1)) t_3 = Float64(x / Float64(1.0 - z)) t_4 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = fma(z, Float64(Float64(t - a) / t_1), t_3); elseif (t_2 <= -5e-243) tmp = t_2; elseif (t_2 <= 0.0) tmp = Float64(Float64(Float64(Float64(Float64(x * y) / Float64(b - y)) + Float64(Float64(y * Float64(t - a)) / Float64(Float64(b - y) * Float64(y - b)))) / z) + t_4); elseif (t_2 <= 2e+284) tmp = t_2; elseif (t_2 <= Inf) tmp = fma(z, Float64(Float64(t - a) / fma(z, Float64(b - y), y)), t_3); else tmp = Float64(t_4 - Float64(fma(y, Float64(Float64(t - a) / Float64(Float64(b - y) * Float64(b - y))), x) / z)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + t$95$1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(z * N[(N[(t - a), $MachinePrecision] / t$95$1), $MachinePrecision] + t$95$3), $MachinePrecision], If[LessEqual[t$95$2, -5e-243], t$95$2, If[LessEqual[t$95$2, 0.0], N[(N[(N[(N[(N[(x * y), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision] + N[(N[(y * N[(t - a), $MachinePrecision]), $MachinePrecision] / N[(N[(b - y), $MachinePrecision] * N[(y - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] + t$95$4), $MachinePrecision], If[LessEqual[t$95$2, 2e+284], t$95$2, If[LessEqual[t$95$2, Infinity], N[(z * N[(N[(t - a), $MachinePrecision] / N[(z * N[(b - y), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision] + t$95$3), $MachinePrecision], N[(t$95$4 - N[(N[(y * N[(N[(t - a), $MachinePrecision] / N[(N[(b - y), $MachinePrecision] * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(b - y\right)\\
t_2 := \frac{x \cdot y + z \cdot \left(t - a\right)}{y + t\_1}\\
t_3 := \frac{x}{1 - z}\\
t_4 := \frac{t - a}{b - y}\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{t - a}{t\_1}, t\_3\right)\\
\mathbf{elif}\;t\_2 \leq -5 \cdot 10^{-243}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;\frac{\frac{x \cdot y}{b - y} + \frac{y \cdot \left(t - a\right)}{\left(b - y\right) \cdot \left(y - b\right)}}{z} + t\_4\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+284}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{t - a}{\mathsf{fma}\left(z, b - y, y\right)}, t\_3\right)\\
\mathbf{else}:\\
\;\;\;\;t\_4 - \frac{\mathsf{fma}\left(y, \frac{t - a}{\left(b - y\right) \cdot \left(b - y\right)}, x\right)}{z}\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -inf.0Initial program 25.0%
Taylor expanded in x around 0
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
--lowering--.f6455.9
Simplified55.9%
Taylor expanded in y around inf
/-lowering-/.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f6494.7
Simplified94.7%
Taylor expanded in z around inf
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
--lowering--.f6494.7
Simplified94.7%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -5e-243 or 0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 2.00000000000000016e284Initial program 99.7%
if -5e-243 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 0.0Initial program 19.3%
Taylor expanded in x around 0
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
--lowering--.f6416.5
Simplified16.5%
Taylor expanded in z around -inf
associate--l+N/A
div-subN/A
+-lowering-+.f64N/A
Simplified82.0%
if 2.00000000000000016e284 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < +inf.0Initial program 17.8%
Taylor expanded in x around 0
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
--lowering--.f6448.5
Simplified48.5%
Taylor expanded in y around inf
/-lowering-/.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f6479.7
Simplified79.7%
if +inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 0.0%
Taylor expanded in x around 0
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
--lowering--.f642.6
Simplified2.6%
Taylor expanded in y around inf
/-lowering-/.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f6423.0
Simplified23.0%
Taylor expanded in z around -inf
associate--l+N/A
div-subN/A
+-lowering-+.f64N/A
Simplified92.0%
Final simplification94.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (- 1.0 z)))
(t_2 (* z (- b y)))
(t_3 (/ (+ (* x y) (* z (- t a))) (+ y t_2)))
(t_4
(-
(/ (- t a) (- b y))
(/ (fma y (/ (- t a) (* (- b y) (- b y))) x) z))))
(if (<= t_3 (- INFINITY))
(fma z (/ (- t a) t_2) t_1)
(if (<= t_3 -1e-280)
t_3
(if (<= t_3 0.0)
t_4
(if (<= t_3 2e+284)
t_3
(if (<= t_3 INFINITY)
(fma z (/ (- t a) (fma z (- b y) y)) t_1)
t_4)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (1.0 - z);
double t_2 = z * (b - y);
double t_3 = ((x * y) + (z * (t - a))) / (y + t_2);
double t_4 = ((t - a) / (b - y)) - (fma(y, ((t - a) / ((b - y) * (b - y))), x) / z);
double tmp;
if (t_3 <= -((double) INFINITY)) {
tmp = fma(z, ((t - a) / t_2), t_1);
} else if (t_3 <= -1e-280) {
tmp = t_3;
} else if (t_3 <= 0.0) {
tmp = t_4;
} else if (t_3 <= 2e+284) {
tmp = t_3;
} else if (t_3 <= ((double) INFINITY)) {
tmp = fma(z, ((t - a) / fma(z, (b - y), y)), t_1);
} else {
tmp = t_4;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(1.0 - z)) t_2 = Float64(z * Float64(b - y)) t_3 = Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / Float64(y + t_2)) t_4 = Float64(Float64(Float64(t - a) / Float64(b - y)) - Float64(fma(y, Float64(Float64(t - a) / Float64(Float64(b - y) * Float64(b - y))), x) / z)) tmp = 0.0 if (t_3 <= Float64(-Inf)) tmp = fma(z, Float64(Float64(t - a) / t_2), t_1); elseif (t_3 <= -1e-280) tmp = t_3; elseif (t_3 <= 0.0) tmp = t_4; elseif (t_3 <= 2e+284) tmp = t_3; elseif (t_3 <= Inf) tmp = fma(z, Float64(Float64(t - a) / fma(z, Float64(b - y), y)), t_1); else tmp = t_4; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + t$95$2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision] - N[(N[(y * N[(N[(t - a), $MachinePrecision] / N[(N[(b - y), $MachinePrecision] * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, (-Infinity)], N[(z * N[(N[(t - a), $MachinePrecision] / t$95$2), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[t$95$3, -1e-280], t$95$3, If[LessEqual[t$95$3, 0.0], t$95$4, If[LessEqual[t$95$3, 2e+284], t$95$3, If[LessEqual[t$95$3, Infinity], N[(z * N[(N[(t - a), $MachinePrecision] / N[(z * N[(b - y), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], t$95$4]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{1 - z}\\
t_2 := z \cdot \left(b - y\right)\\
t_3 := \frac{x \cdot y + z \cdot \left(t - a\right)}{y + t\_2}\\
t_4 := \frac{t - a}{b - y} - \frac{\mathsf{fma}\left(y, \frac{t - a}{\left(b - y\right) \cdot \left(b - y\right)}, x\right)}{z}\\
\mathbf{if}\;t\_3 \leq -\infty:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{t - a}{t\_2}, t\_1\right)\\
\mathbf{elif}\;t\_3 \leq -1 \cdot 10^{-280}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_3 \leq 0:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;t\_3 \leq 2 \cdot 10^{+284}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{t - a}{\mathsf{fma}\left(z, b - y, y\right)}, t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;t\_4\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -inf.0Initial program 25.0%
Taylor expanded in x around 0
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
--lowering--.f6455.9
Simplified55.9%
Taylor expanded in y around inf
/-lowering-/.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f6494.7
Simplified94.7%
Taylor expanded in z around inf
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
--lowering--.f6494.7
Simplified94.7%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -9.9999999999999996e-281 or 0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 2.00000000000000016e284Initial program 99.7%
if -9.9999999999999996e-281 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 0.0 or +inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 8.6%
Taylor expanded in x around 0
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
--lowering--.f649.9
Simplified9.9%
Taylor expanded in y around inf
/-lowering-/.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f6429.2
Simplified29.2%
Taylor expanded in z around -inf
associate--l+N/A
div-subN/A
+-lowering-+.f64N/A
Simplified82.1%
if 2.00000000000000016e284 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < +inf.0Initial program 17.8%
Taylor expanded in x around 0
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
--lowering--.f6448.5
Simplified48.5%
Taylor expanded in y around inf
/-lowering-/.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f6479.7
Simplified79.7%
Final simplification93.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (- 1.0 z)))
(t_2 (* z (- b y)))
(t_3 (/ (+ (* x y) (* z (- t a))) (+ y t_2)))
(t_4 (/ (- t a) (- b y))))
(if (<= t_3 (- INFINITY))
(fma z (/ (- t a) t_2) t_1)
(if (<= t_3 -5e-243)
t_3
(if (<= t_3 0.0)
t_4
(if (<= t_3 2e+284)
t_3
(if (<= t_3 INFINITY)
(fma z (/ (- t a) (fma z (- b y) y)) t_1)
t_4)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (1.0 - z);
double t_2 = z * (b - y);
double t_3 = ((x * y) + (z * (t - a))) / (y + t_2);
double t_4 = (t - a) / (b - y);
double tmp;
if (t_3 <= -((double) INFINITY)) {
tmp = fma(z, ((t - a) / t_2), t_1);
} else if (t_3 <= -5e-243) {
tmp = t_3;
} else if (t_3 <= 0.0) {
tmp = t_4;
} else if (t_3 <= 2e+284) {
tmp = t_3;
} else if (t_3 <= ((double) INFINITY)) {
tmp = fma(z, ((t - a) / fma(z, (b - y), y)), t_1);
} else {
tmp = t_4;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(1.0 - z)) t_2 = Float64(z * Float64(b - y)) t_3 = Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / Float64(y + t_2)) t_4 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (t_3 <= Float64(-Inf)) tmp = fma(z, Float64(Float64(t - a) / t_2), t_1); elseif (t_3 <= -5e-243) tmp = t_3; elseif (t_3 <= 0.0) tmp = t_4; elseif (t_3 <= 2e+284) tmp = t_3; elseif (t_3 <= Inf) tmp = fma(z, Float64(Float64(t - a) / fma(z, Float64(b - y), y)), t_1); else tmp = t_4; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + t$95$2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, (-Infinity)], N[(z * N[(N[(t - a), $MachinePrecision] / t$95$2), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[t$95$3, -5e-243], t$95$3, If[LessEqual[t$95$3, 0.0], t$95$4, If[LessEqual[t$95$3, 2e+284], t$95$3, If[LessEqual[t$95$3, Infinity], N[(z * N[(N[(t - a), $MachinePrecision] / N[(z * N[(b - y), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], t$95$4]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{1 - z}\\
t_2 := z \cdot \left(b - y\right)\\
t_3 := \frac{x \cdot y + z \cdot \left(t - a\right)}{y + t\_2}\\
t_4 := \frac{t - a}{b - y}\\
\mathbf{if}\;t\_3 \leq -\infty:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{t - a}{t\_2}, t\_1\right)\\
\mathbf{elif}\;t\_3 \leq -5 \cdot 10^{-243}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_3 \leq 0:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;t\_3 \leq 2 \cdot 10^{+284}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{t - a}{\mathsf{fma}\left(z, b - y, y\right)}, t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;t\_4\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -inf.0Initial program 25.0%
Taylor expanded in x around 0
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
--lowering--.f6455.9
Simplified55.9%
Taylor expanded in y around inf
/-lowering-/.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f6494.7
Simplified94.7%
Taylor expanded in z around inf
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
--lowering--.f6494.7
Simplified94.7%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -5e-243 or 0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 2.00000000000000016e284Initial program 99.7%
if -5e-243 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 0.0 or +inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 10.1%
Taylor expanded in z around inf
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6472.3
Simplified72.3%
if 2.00000000000000016e284 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < +inf.0Initial program 17.8%
Taylor expanded in x around 0
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
--lowering--.f6448.5
Simplified48.5%
Taylor expanded in y around inf
/-lowering-/.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f6479.7
Simplified79.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (- b y)))
(t_2 (/ (- t a) (- b y)))
(t_3 (/ (+ (* x y) (* z (- t a))) (+ y t_1)))
(t_4 (fma z (/ (- t a) t_1) (/ x (- 1.0 z)))))
(if (<= t_3 (- INFINITY))
t_4
(if (<= t_3 -5e-243)
t_3
(if (<= t_3 0.0)
t_2
(if (<= t_3 2e+284) t_3 (if (<= t_3 INFINITY) t_4 t_2)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (b - y);
double t_2 = (t - a) / (b - y);
double t_3 = ((x * y) + (z * (t - a))) / (y + t_1);
double t_4 = fma(z, ((t - a) / t_1), (x / (1.0 - z)));
double tmp;
if (t_3 <= -((double) INFINITY)) {
tmp = t_4;
} else if (t_3 <= -5e-243) {
tmp = t_3;
} else if (t_3 <= 0.0) {
tmp = t_2;
} else if (t_3 <= 2e+284) {
tmp = t_3;
} else if (t_3 <= ((double) INFINITY)) {
tmp = t_4;
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(b - y)) t_2 = Float64(Float64(t - a) / Float64(b - y)) t_3 = Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / Float64(y + t_1)) t_4 = fma(z, Float64(Float64(t - a) / t_1), Float64(x / Float64(1.0 - z))) tmp = 0.0 if (t_3 <= Float64(-Inf)) tmp = t_4; elseif (t_3 <= -5e-243) tmp = t_3; elseif (t_3 <= 0.0) tmp = t_2; elseif (t_3 <= 2e+284) tmp = t_3; elseif (t_3 <= Inf) tmp = t_4; else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + t$95$1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(z * N[(N[(t - a), $MachinePrecision] / t$95$1), $MachinePrecision] + N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, (-Infinity)], t$95$4, If[LessEqual[t$95$3, -5e-243], t$95$3, If[LessEqual[t$95$3, 0.0], t$95$2, If[LessEqual[t$95$3, 2e+284], t$95$3, If[LessEqual[t$95$3, Infinity], t$95$4, t$95$2]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(b - y\right)\\
t_2 := \frac{t - a}{b - y}\\
t_3 := \frac{x \cdot y + z \cdot \left(t - a\right)}{y + t\_1}\\
t_4 := \mathsf{fma}\left(z, \frac{t - a}{t\_1}, \frac{x}{1 - z}\right)\\
\mathbf{if}\;t\_3 \leq -\infty:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;t\_3 \leq -5 \cdot 10^{-243}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_3 \leq 0:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_3 \leq 2 \cdot 10^{+284}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;t\_4\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -inf.0 or 2.00000000000000016e284 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < +inf.0Initial program 21.8%
Taylor expanded in x around 0
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
--lowering--.f6452.6
Simplified52.6%
Taylor expanded in y around inf
/-lowering-/.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f6488.1
Simplified88.1%
Taylor expanded in z around inf
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
--lowering--.f6488.1
Simplified88.1%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -5e-243 or 0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 2.00000000000000016e284Initial program 99.7%
if -5e-243 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 0.0 or +inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 10.1%
Taylor expanded in z around inf
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6472.3
Simplified72.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y)))
(t_2 (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))
(t_3 (fma z (- b y) y)))
(if (<= t_2 (- INFINITY))
(fma z (/ (- t a) t_3) x)
(if (<= t_2 -5e-243)
t_2
(if (<= t_2 0.0)
t_1
(if (<= t_2 5e+137)
t_2
(if (<= t_2 INFINITY) (fma (- t a) (/ z t_3) x) t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double t_2 = ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
double t_3 = fma(z, (b - y), y);
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = fma(z, ((t - a) / t_3), x);
} else if (t_2 <= -5e-243) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = t_1;
} else if (t_2 <= 5e+137) {
tmp = t_2;
} else if (t_2 <= ((double) INFINITY)) {
tmp = fma((t - a), (z / t_3), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / Float64(b - y)) t_2 = Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / Float64(y + Float64(z * Float64(b - y)))) t_3 = fma(z, Float64(b - y), y) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = fma(z, Float64(Float64(t - a) / t_3), x); elseif (t_2 <= -5e-243) tmp = t_2; elseif (t_2 <= 0.0) tmp = t_1; elseif (t_2 <= 5e+137) tmp = t_2; elseif (t_2 <= Inf) tmp = fma(Float64(t - a), Float64(z / t_3), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(z * N[(b - y), $MachinePrecision] + y), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(z * N[(N[(t - a), $MachinePrecision] / t$95$3), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t$95$2, -5e-243], t$95$2, If[LessEqual[t$95$2, 0.0], t$95$1, If[LessEqual[t$95$2, 5e+137], t$95$2, If[LessEqual[t$95$2, Infinity], N[(N[(t - a), $MachinePrecision] * N[(z / t$95$3), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
t_2 := \frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\
t_3 := \mathsf{fma}\left(z, b - y, y\right)\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{t - a}{t\_3}, x\right)\\
\mathbf{elif}\;t\_2 \leq -5 \cdot 10^{-243}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+137}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;\mathsf{fma}\left(t - a, \frac{z}{t\_3}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -inf.0Initial program 25.0%
Taylor expanded in x around 0
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
--lowering--.f6455.9
Simplified55.9%
Taylor expanded in z around 0
Simplified84.9%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -5e-243 or 0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 5.0000000000000002e137Initial program 99.7%
if -5e-243 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 0.0 or +inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 10.1%
Taylor expanded in z around inf
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6472.3
Simplified72.3%
if 5.0000000000000002e137 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < +inf.0Initial program 46.5%
Taylor expanded in x around 0
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
--lowering--.f6451.0
Simplified51.0%
Taylor expanded in z around 0
Simplified63.3%
associate-*r/N/A
div-invN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
accelerator-lowering-fma.f64N/A
--lowering--.f6461.5
Applied egg-rr61.5%
un-div-invN/A
*-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
accelerator-lowering-fma.f64N/A
--lowering--.f6478.8
Applied egg-rr78.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -2.9e-24)
t_1
(if (<= z 2600000000000.0)
(fma (* z (- t a)) (/ 1.0 (fma z (- b y) y)) x)
t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -2.9e-24) {
tmp = t_1;
} else if (z <= 2600000000000.0) {
tmp = fma((z * (t - a)), (1.0 / fma(z, (b - y), y)), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -2.9e-24) tmp = t_1; elseif (z <= 2600000000000.0) tmp = fma(Float64(z * Float64(t - a)), Float64(1.0 / fma(z, Float64(b - y), y)), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.9e-24], t$95$1, If[LessEqual[z, 2600000000000.0], N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(z * N[(b - y), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -2.9 \cdot 10^{-24}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2600000000000:\\
\;\;\;\;\mathsf{fma}\left(z \cdot \left(t - a\right), \frac{1}{\mathsf{fma}\left(z, b - y, y\right)}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.8999999999999999e-24 or 2.6e12 < z Initial program 41.4%
Taylor expanded in z around inf
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6476.3
Simplified76.3%
if -2.8999999999999999e-24 < z < 2.6e12Initial program 84.0%
Taylor expanded in x around 0
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
--lowering--.f6475.9
Simplified75.9%
Taylor expanded in z around 0
Simplified78.5%
associate-*r/N/A
div-invN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
accelerator-lowering-fma.f64N/A
--lowering--.f6486.5
Applied egg-rr86.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -2.9e-24)
t_1
(if (<= z 1900000000000.0) (fma (- t a) (/ z (fma z (- b y) y)) x) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -2.9e-24) {
tmp = t_1;
} else if (z <= 1900000000000.0) {
tmp = fma((t - a), (z / fma(z, (b - y), y)), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -2.9e-24) tmp = t_1; elseif (z <= 1900000000000.0) tmp = fma(Float64(t - a), Float64(z / fma(z, Float64(b - y), y)), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.9e-24], t$95$1, If[LessEqual[z, 1900000000000.0], N[(N[(t - a), $MachinePrecision] * N[(z / N[(z * N[(b - y), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -2.9 \cdot 10^{-24}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1900000000000:\\
\;\;\;\;\mathsf{fma}\left(t - a, \frac{z}{\mathsf{fma}\left(z, b - y, y\right)}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.8999999999999999e-24 or 1.9e12 < z Initial program 41.4%
Taylor expanded in z around inf
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6476.3
Simplified76.3%
if -2.8999999999999999e-24 < z < 1.9e12Initial program 84.0%
Taylor expanded in x around 0
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
--lowering--.f6475.9
Simplified75.9%
Taylor expanded in z around 0
Simplified78.5%
associate-*r/N/A
div-invN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
accelerator-lowering-fma.f64N/A
--lowering--.f6486.5
Applied egg-rr86.5%
un-div-invN/A
*-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
accelerator-lowering-fma.f64N/A
--lowering--.f6483.8
Applied egg-rr83.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -2.9e-24)
t_1
(if (<= z 9000000000000.0) (fma z (/ (- t a) (fma z (- b y) y)) x) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -2.9e-24) {
tmp = t_1;
} else if (z <= 9000000000000.0) {
tmp = fma(z, ((t - a) / fma(z, (b - y), y)), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -2.9e-24) tmp = t_1; elseif (z <= 9000000000000.0) tmp = fma(z, Float64(Float64(t - a) / fma(z, Float64(b - y), y)), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.9e-24], t$95$1, If[LessEqual[z, 9000000000000.0], N[(z * N[(N[(t - a), $MachinePrecision] / N[(z * N[(b - y), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -2.9 \cdot 10^{-24}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 9000000000000:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{t - a}{\mathsf{fma}\left(z, b - y, y\right)}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.8999999999999999e-24 or 9e12 < z Initial program 41.4%
Taylor expanded in z around inf
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6476.3
Simplified76.3%
if -2.8999999999999999e-24 < z < 9e12Initial program 84.0%
Taylor expanded in x around 0
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
--lowering--.f6475.9
Simplified75.9%
Taylor expanded in z around 0
Simplified78.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -2.9e-24)
t_1
(if (<= z 0.72) (fma z (/ (- t a) (fma z b y)) x) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -2.9e-24) {
tmp = t_1;
} else if (z <= 0.72) {
tmp = fma(z, ((t - a) / fma(z, b, y)), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -2.9e-24) tmp = t_1; elseif (z <= 0.72) tmp = fma(z, Float64(Float64(t - a) / fma(z, b, y)), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.9e-24], t$95$1, If[LessEqual[z, 0.72], N[(z * N[(N[(t - a), $MachinePrecision] / N[(z * b + y), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -2.9 \cdot 10^{-24}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 0.72:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{t - a}{\mathsf{fma}\left(z, b, y\right)}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.8999999999999999e-24 or 0.71999999999999997 < z Initial program 41.8%
Taylor expanded in z around inf
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6476.4
Simplified76.4%
if -2.8999999999999999e-24 < z < 0.71999999999999997Initial program 83.8%
Taylor expanded in x around 0
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
--lowering--.f6475.8
Simplified75.8%
Taylor expanded in z around 0
Simplified78.3%
Taylor expanded in b around inf
Simplified77.9%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (/ (- t a) (- b y)))) (if (<= z -2.5e-38) t_1 (if (<= z 0.37) (fma z (/ (- t a) y) x) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -2.5e-38) {
tmp = t_1;
} else if (z <= 0.37) {
tmp = fma(z, ((t - a) / y), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -2.5e-38) tmp = t_1; elseif (z <= 0.37) tmp = fma(z, Float64(Float64(t - a) / y), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.5e-38], t$95$1, If[LessEqual[z, 0.37], N[(z * N[(N[(t - a), $MachinePrecision] / y), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -2.5 \cdot 10^{-38}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 0.37:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{t - a}{y}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.50000000000000017e-38 or 0.37 < z Initial program 42.0%
Taylor expanded in z around inf
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6476.0
Simplified76.0%
if -2.50000000000000017e-38 < z < 0.37Initial program 84.4%
Taylor expanded in z around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
associate--r+N/A
--lowering--.f64N/A
div-subN/A
/-lowering-/.f64N/A
--lowering--.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
div-subN/A
sub-negN/A
*-inversesN/A
metadata-evalN/A
+-lowering-+.f64N/A
/-lowering-/.f6465.2
Simplified65.2%
Taylor expanded in x around 0
div-subN/A
/-lowering-/.f64N/A
--lowering--.f6468.0
Simplified68.0%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (/ (- t a) (- b y)))) (if (<= z -2.5e-56) t_1 (if (<= z 9.6e-75) (fma z (/ t y) x) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -2.5e-56) {
tmp = t_1;
} else if (z <= 9.6e-75) {
tmp = fma(z, (t / y), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -2.5e-56) tmp = t_1; elseif (z <= 9.6e-75) tmp = fma(z, Float64(t / y), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.5e-56], t$95$1, If[LessEqual[z, 9.6e-75], N[(z * N[(t / y), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -2.5 \cdot 10^{-56}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 9.6 \cdot 10^{-75}:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{t}{y}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.49999999999999999e-56 or 9.60000000000000077e-75 < z Initial program 47.2%
Taylor expanded in z around inf
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6470.0
Simplified70.0%
if -2.49999999999999999e-56 < z < 9.60000000000000077e-75Initial program 85.6%
Taylor expanded in z around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
associate--r+N/A
--lowering--.f64N/A
div-subN/A
/-lowering-/.f64N/A
--lowering--.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
div-subN/A
sub-negN/A
*-inversesN/A
metadata-evalN/A
+-lowering-+.f64N/A
/-lowering-/.f6468.6
Simplified68.6%
Taylor expanded in t around inf
/-lowering-/.f6466.1
Simplified66.1%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (/ (- t a) (- b y)))) (if (<= z -1.8e-56) t_1 (if (<= z 4.8e-74) x t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -1.8e-56) {
tmp = t_1;
} else if (z <= 4.8e-74) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (t - a) / (b - y)
if (z <= (-1.8d-56)) then
tmp = t_1
else if (z <= 4.8d-74) then
tmp = 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 b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -1.8e-56) {
tmp = t_1;
} else if (z <= 4.8e-74) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) tmp = 0 if z <= -1.8e-56: tmp = t_1 elif z <= 4.8e-74: tmp = x else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -1.8e-56) tmp = t_1; elseif (z <= 4.8e-74) tmp = x; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t - a) / (b - y); tmp = 0.0; if (z <= -1.8e-56) tmp = t_1; elseif (z <= 4.8e-74) tmp = x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.8e-56], t$95$1, If[LessEqual[z, 4.8e-74], x, t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -1.8 \cdot 10^{-56}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 4.8 \cdot 10^{-74}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.79999999999999989e-56 or 4.7999999999999998e-74 < z Initial program 47.2%
Taylor expanded in z around inf
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6470.0
Simplified70.0%
if -1.79999999999999989e-56 < z < 4.7999999999999998e-74Initial program 85.6%
Taylor expanded in z around 0
Simplified59.9%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (/ x (- 1.0 z)))) (if (<= y -1.7e+25) t_1 (if (<= y 4.5e+47) (/ (- t a) b) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (1.0 - z);
double tmp;
if (y <= -1.7e+25) {
tmp = t_1;
} else if (y <= 4.5e+47) {
tmp = (t - a) / b;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x / (1.0d0 - z)
if (y <= (-1.7d+25)) then
tmp = t_1
else if (y <= 4.5d+47) then
tmp = (t - a) / b
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 b) {
double t_1 = x / (1.0 - z);
double tmp;
if (y <= -1.7e+25) {
tmp = t_1;
} else if (y <= 4.5e+47) {
tmp = (t - a) / b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (1.0 - z) tmp = 0 if y <= -1.7e+25: tmp = t_1 elif y <= 4.5e+47: tmp = (t - a) / b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(1.0 - z)) tmp = 0.0 if (y <= -1.7e+25) tmp = t_1; elseif (y <= 4.5e+47) tmp = Float64(Float64(t - a) / b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (1.0 - z); tmp = 0.0; if (y <= -1.7e+25) tmp = t_1; elseif (y <= 4.5e+47) tmp = (t - a) / b; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.7e+25], t$95$1, If[LessEqual[y, 4.5e+47], N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{1 - z}\\
\mathbf{if}\;y \leq -1.7 \cdot 10^{+25}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 4.5 \cdot 10^{+47}:\\
\;\;\;\;\frac{t - a}{b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.69999999999999992e25 or 4.49999999999999979e47 < y Initial program 44.8%
Taylor expanded in y around inf
/-lowering-/.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f6453.9
Simplified53.9%
if -1.69999999999999992e25 < y < 4.49999999999999979e47Initial program 76.6%
Taylor expanded in y around 0
/-lowering-/.f64N/A
--lowering--.f6456.9
Simplified56.9%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (/ t (- b y)))) (if (<= t -2.3e+109) t_1 (if (<= t 2.45e+91) (/ x (- 1.0 z)) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t / (b - y);
double tmp;
if (t <= -2.3e+109) {
tmp = t_1;
} else if (t <= 2.45e+91) {
tmp = x / (1.0 - z);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = t / (b - y)
if (t <= (-2.3d+109)) then
tmp = t_1
else if (t <= 2.45d+91) then
tmp = x / (1.0d0 - z)
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 b) {
double t_1 = t / (b - y);
double tmp;
if (t <= -2.3e+109) {
tmp = t_1;
} else if (t <= 2.45e+91) {
tmp = x / (1.0 - z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = t / (b - y) tmp = 0 if t <= -2.3e+109: tmp = t_1 elif t <= 2.45e+91: tmp = x / (1.0 - z) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(t / Float64(b - y)) tmp = 0.0 if (t <= -2.3e+109) tmp = t_1; elseif (t <= 2.45e+91) tmp = Float64(x / Float64(1.0 - z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = t / (b - y); tmp = 0.0; if (t <= -2.3e+109) tmp = t_1; elseif (t <= 2.45e+91) tmp = x / (1.0 - z); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.3e+109], t$95$1, If[LessEqual[t, 2.45e+91], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{b - y}\\
\mathbf{if}\;t \leq -2.3 \cdot 10^{+109}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.45 \cdot 10^{+91}:\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -2.3000000000000001e109 or 2.45000000000000015e91 < t Initial program 57.8%
Taylor expanded in z around inf
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6463.1
Simplified63.1%
Taylor expanded in t around inf
Simplified56.0%
if -2.3000000000000001e109 < t < 2.45000000000000015e91Initial program 62.6%
Taylor expanded in y around inf
/-lowering-/.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f6443.2
Simplified43.2%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (/ t (- b y)))) (if (<= z -4.1e-14) t_1 (if (<= z 0.225) x t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t / (b - y);
double tmp;
if (z <= -4.1e-14) {
tmp = t_1;
} else if (z <= 0.225) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = t / (b - y)
if (z <= (-4.1d-14)) then
tmp = t_1
else if (z <= 0.225d0) then
tmp = 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 b) {
double t_1 = t / (b - y);
double tmp;
if (z <= -4.1e-14) {
tmp = t_1;
} else if (z <= 0.225) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = t / (b - y) tmp = 0 if z <= -4.1e-14: tmp = t_1 elif z <= 0.225: tmp = x else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(t / Float64(b - y)) tmp = 0.0 if (z <= -4.1e-14) tmp = t_1; elseif (z <= 0.225) tmp = x; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = t / (b - y); tmp = 0.0; if (z <= -4.1e-14) tmp = t_1; elseif (z <= 0.225) tmp = x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.1e-14], t$95$1, If[LessEqual[z, 0.225], x, t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{b - y}\\
\mathbf{if}\;z \leq -4.1 \cdot 10^{-14}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 0.225:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -4.1000000000000002e-14 or 0.225000000000000006 < z Initial program 41.4%
Taylor expanded in z around inf
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6476.2
Simplified76.2%
Taylor expanded in t around inf
Simplified38.3%
if -4.1000000000000002e-14 < z < 0.225000000000000006Initial program 84.0%
Taylor expanded in z around 0
Simplified52.2%
(FPCore (x y z t a b) :precision binary64 (if (<= z -1.05e-8) (/ t b) (if (<= z 1900000000000.0) (fma z x x) (/ a (- 0.0 b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.05e-8) {
tmp = t / b;
} else if (z <= 1900000000000.0) {
tmp = fma(z, x, x);
} else {
tmp = a / (0.0 - b);
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -1.05e-8) tmp = Float64(t / b); elseif (z <= 1900000000000.0) tmp = fma(z, x, x); else tmp = Float64(a / Float64(0.0 - b)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1.05e-8], N[(t / b), $MachinePrecision], If[LessEqual[z, 1900000000000.0], N[(z * x + x), $MachinePrecision], N[(a / N[(0.0 - b), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.05 \cdot 10^{-8}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{elif}\;z \leq 1900000000000:\\
\;\;\;\;\mathsf{fma}\left(z, x, x\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{a}{0 - b}\\
\end{array}
\end{array}
if z < -1.04999999999999997e-8Initial program 43.7%
Taylor expanded in b around inf
/-lowering-/.f64N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f6427.4
Simplified27.4%
Taylor expanded in t around inf
/-lowering-/.f6427.9
Simplified27.9%
if -1.04999999999999997e-8 < z < 1.9e12Initial program 84.1%
Taylor expanded in z around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
associate--r+N/A
--lowering--.f64N/A
div-subN/A
/-lowering-/.f64N/A
--lowering--.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
div-subN/A
sub-negN/A
*-inversesN/A
metadata-evalN/A
+-lowering-+.f64N/A
/-lowering-/.f6463.9
Simplified63.9%
Taylor expanded in y around inf
Simplified51.8%
if 1.9e12 < z Initial program 37.7%
Taylor expanded in b around inf
/-lowering-/.f64N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f6425.1
Simplified25.1%
Taylor expanded in a around inf
mul-1-negN/A
distribute-neg-frac2N/A
mul-1-negN/A
/-lowering-/.f64N/A
mul-1-negN/A
neg-lowering-neg.f6432.4
Simplified32.4%
Final simplification40.2%
(FPCore (x y z t a b) :precision binary64 (if (<= z -2.1e-18) (/ t b) (if (<= z 1900000000000.0) (fma z x x) (/ t b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -2.1e-18) {
tmp = t / b;
} else if (z <= 1900000000000.0) {
tmp = fma(z, x, x);
} else {
tmp = t / b;
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -2.1e-18) tmp = Float64(t / b); elseif (z <= 1900000000000.0) tmp = fma(z, x, x); else tmp = Float64(t / b); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -2.1e-18], N[(t / b), $MachinePrecision], If[LessEqual[z, 1900000000000.0], N[(z * x + x), $MachinePrecision], N[(t / b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.1 \cdot 10^{-18}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{elif}\;z \leq 1900000000000:\\
\;\;\;\;\mathsf{fma}\left(z, x, x\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{b}\\
\end{array}
\end{array}
if z < -2.1e-18 or 1.9e12 < z Initial program 41.0%
Taylor expanded in b around inf
/-lowering-/.f64N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f6426.3
Simplified26.3%
Taylor expanded in t around inf
/-lowering-/.f6426.7
Simplified26.7%
if -2.1e-18 < z < 1.9e12Initial program 84.1%
Taylor expanded in z around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
associate--r+N/A
--lowering--.f64N/A
div-subN/A
/-lowering-/.f64N/A
--lowering--.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
div-subN/A
sub-negN/A
*-inversesN/A
metadata-evalN/A
+-lowering-+.f64N/A
/-lowering-/.f6463.9
Simplified63.9%
Taylor expanded in y around inf
Simplified51.8%
(FPCore (x y z t a b) :precision binary64 (fma z x x))
double code(double x, double y, double z, double t, double a, double b) {
return fma(z, x, x);
}
function code(x, y, z, t, a, b) return fma(z, x, x) end
code[x_, y_, z_, t_, a_, b_] := N[(z * x + x), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(z, x, x\right)
\end{array}
Initial program 61.2%
Taylor expanded in z around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
associate--r+N/A
--lowering--.f64N/A
div-subN/A
/-lowering-/.f64N/A
--lowering--.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
div-subN/A
sub-negN/A
*-inversesN/A
metadata-evalN/A
+-lowering-+.f64N/A
/-lowering-/.f6432.6
Simplified32.6%
Taylor expanded in y around inf
Simplified26.5%
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
return x;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
code = x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x;
}
def code(x, y, z, t, a, b): return x
function code(x, y, z, t, a, b) return x end
function tmp = code(x, y, z, t, a, b) tmp = x; end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 61.2%
Taylor expanded in z around 0
Simplified26.1%
(FPCore (x y z t a b) :precision binary64 (- (/ (+ (* z t) (* y x)) (+ y (* z (- b y)))) (/ a (+ (- b y) (/ y z)))))
double code(double x, double y, double z, double t, double a, double b) {
return (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z)));
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
code = (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z)))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z)));
}
def code(x, y, z, t, a, b): return (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z)))
function code(x, y, z, t, a, b) return Float64(Float64(Float64(Float64(z * t) + Float64(y * x)) / Float64(y + Float64(z * Float64(b - y)))) - Float64(a / Float64(Float64(b - y) + Float64(y / z)))) end
function tmp = code(x, y, z, t, a, b) tmp = (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z))); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(N[(z * t), $MachinePrecision] + N[(y * x), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a / N[(N[(b - y), $MachinePrecision] + N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{z \cdot t + y \cdot x}{y + z \cdot \left(b - y\right)} - \frac{a}{\left(b - y\right) + \frac{y}{z}}
\end{array}
herbie shell --seed 2024195
(FPCore (x y z t a b)
:name "Development.Shake.Progress:decay from shake-0.15.5"
:precision binary64
:alt
(! :herbie-platform default (- (/ (+ (* z t) (* y x)) (+ y (* z (- b y)))) (/ a (+ (- b y) (/ y z)))))
(/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))