
(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 20 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
(-
(/ (- t a) (- b y))
(/ (fma (- y) (/ x (- b y)) (* (/ y (pow (- b y) 2.0)) (- t a))) z)))
(t_2 (fma (- b y) z y))
(t_3 (/ (+ (* (- t a) z) (* y x)) (+ (* (- b y) z) y)))
(t_4 (* (fma (/ (- t a) x) (/ z t_2) (/ y t_2)) x)))
(if (<= t_3 (- INFINITY))
t_4
(if (<= t_3 -2e-214)
t_3
(if (<= t_3 0.0)
t_1
(if (<= t_3 2e+203) t_3 (if (<= t_3 INFINITY) t_4 t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((t - a) / (b - y)) - (fma(-y, (x / (b - y)), ((y / pow((b - y), 2.0)) * (t - a))) / z);
double t_2 = fma((b - y), z, y);
double t_3 = (((t - a) * z) + (y * x)) / (((b - y) * z) + y);
double t_4 = fma(((t - a) / x), (z / t_2), (y / t_2)) * x;
double tmp;
if (t_3 <= -((double) INFINITY)) {
tmp = t_4;
} else if (t_3 <= -2e-214) {
tmp = t_3;
} else if (t_3 <= 0.0) {
tmp = t_1;
} else if (t_3 <= 2e+203) {
tmp = t_3;
} else if (t_3 <= ((double) INFINITY)) {
tmp = t_4;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(t - a) / Float64(b - y)) - Float64(fma(Float64(-y), Float64(x / Float64(b - y)), Float64(Float64(y / (Float64(b - y) ^ 2.0)) * Float64(t - a))) / z)) t_2 = fma(Float64(b - y), z, y) t_3 = Float64(Float64(Float64(Float64(t - a) * z) + Float64(y * x)) / Float64(Float64(Float64(b - y) * z) + y)) t_4 = Float64(fma(Float64(Float64(t - a) / x), Float64(z / t_2), Float64(y / t_2)) * x) tmp = 0.0 if (t_3 <= Float64(-Inf)) tmp = t_4; elseif (t_3 <= -2e-214) tmp = t_3; elseif (t_3 <= 0.0) tmp = t_1; elseif (t_3 <= 2e+203) tmp = t_3; elseif (t_3 <= Inf) tmp = t_4; else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision] - N[(N[((-y) * N[(x / N[(b - y), $MachinePrecision]), $MachinePrecision] + N[(N[(y / N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b - y), $MachinePrecision] * z + y), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(N[(t - a), $MachinePrecision] * z), $MachinePrecision] + N[(y * x), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(b - y), $MachinePrecision] * z), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(N[(t - a), $MachinePrecision] / x), $MachinePrecision] * N[(z / t$95$2), $MachinePrecision] + N[(y / t$95$2), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[t$95$3, (-Infinity)], t$95$4, If[LessEqual[t$95$3, -2e-214], t$95$3, If[LessEqual[t$95$3, 0.0], t$95$1, If[LessEqual[t$95$3, 2e+203], t$95$3, If[LessEqual[t$95$3, Infinity], t$95$4, t$95$1]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y} - \frac{\mathsf{fma}\left(-y, \frac{x}{b - y}, \frac{y}{{\left(b - y\right)}^{2}} \cdot \left(t - a\right)\right)}{z}\\
t_2 := \mathsf{fma}\left(b - y, z, y\right)\\
t_3 := \frac{\left(t - a\right) \cdot z + y \cdot x}{\left(b - y\right) \cdot z + y}\\
t_4 := \mathsf{fma}\left(\frac{t - a}{x}, \frac{z}{t\_2}, \frac{y}{t\_2}\right) \cdot x\\
\mathbf{if}\;t\_3 \leq -\infty:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;t\_3 \leq -2 \cdot 10^{-214}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_3 \leq 0:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_3 \leq 2 \cdot 10^{+203}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;t\_4\\
\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.0 or 2e203 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < +inf.0Initial program 42.2%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites92.3%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -1.99999999999999983e-214 or 0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 2e203Initial program 99.5%
if -1.99999999999999983e-214 < (/.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 13.6%
Taylor expanded in z around inf
Applied rewrites96.7%
Final simplification97.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y)))
(t_2 (fma (- b y) z y))
(t_3 (/ (+ (* (- t a) z) (* y x)) (+ (* (- b y) z) y)))
(t_4 (* (fma (/ (- t a) x) (/ z t_2) (/ y t_2)) x)))
(if (<= t_3 (- INFINITY))
t_4
(if (<= t_3 -2e-214)
t_3
(if (<= t_3 0.0)
t_1
(if (<= t_3 2e+203) t_3 (if (<= t_3 INFINITY) t_4 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 = fma((b - y), z, y);
double t_3 = (((t - a) * z) + (y * x)) / (((b - y) * z) + y);
double t_4 = fma(((t - a) / x), (z / t_2), (y / t_2)) * x;
double tmp;
if (t_3 <= -((double) INFINITY)) {
tmp = t_4;
} else if (t_3 <= -2e-214) {
tmp = t_3;
} else if (t_3 <= 0.0) {
tmp = t_1;
} else if (t_3 <= 2e+203) {
tmp = t_3;
} else if (t_3 <= ((double) INFINITY)) {
tmp = t_4;
} 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 = fma(Float64(b - y), z, y) t_3 = Float64(Float64(Float64(Float64(t - a) * z) + Float64(y * x)) / Float64(Float64(Float64(b - y) * z) + y)) t_4 = Float64(fma(Float64(Float64(t - a) / x), Float64(z / t_2), Float64(y / t_2)) * x) tmp = 0.0 if (t_3 <= Float64(-Inf)) tmp = t_4; elseif (t_3 <= -2e-214) tmp = t_3; elseif (t_3 <= 0.0) tmp = t_1; elseif (t_3 <= 2e+203) tmp = t_3; elseif (t_3 <= Inf) tmp = t_4; 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[(b - y), $MachinePrecision] * z + y), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(N[(t - a), $MachinePrecision] * z), $MachinePrecision] + N[(y * x), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(b - y), $MachinePrecision] * z), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(N[(t - a), $MachinePrecision] / x), $MachinePrecision] * N[(z / t$95$2), $MachinePrecision] + N[(y / t$95$2), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[t$95$3, (-Infinity)], t$95$4, If[LessEqual[t$95$3, -2e-214], t$95$3, If[LessEqual[t$95$3, 0.0], t$95$1, If[LessEqual[t$95$3, 2e+203], t$95$3, If[LessEqual[t$95$3, Infinity], t$95$4, t$95$1]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
t_2 := \mathsf{fma}\left(b - y, z, y\right)\\
t_3 := \frac{\left(t - a\right) \cdot z + y \cdot x}{\left(b - y\right) \cdot z + y}\\
t_4 := \mathsf{fma}\left(\frac{t - a}{x}, \frac{z}{t\_2}, \frac{y}{t\_2}\right) \cdot x\\
\mathbf{if}\;t\_3 \leq -\infty:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;t\_3 \leq -2 \cdot 10^{-214}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_3 \leq 0:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_3 \leq 2 \cdot 10^{+203}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;t\_4\\
\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.0 or 2e203 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < +inf.0Initial program 42.2%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites92.3%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -1.99999999999999983e-214 or 0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 2e203Initial program 99.5%
if -1.99999999999999983e-214 < (/.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 13.6%
Taylor expanded in z around inf
lower-/.f64N/A
lower--.f64N/A
lower--.f6471.1
Applied rewrites71.1%
Final simplification91.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma (- b y) z y)) (t_2 (/ (- t a) (- b y))))
(if (<= z -1.1e+20)
t_2
(if (<= z -1.4e-50)
(* (/ (- t a) t_1) z)
(if (<= z 3.8e-197)
(* (/ y t_1) x)
(if (<= z 2500000000.0) (/ (fma t z (* y x)) t_1) t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma((b - y), z, y);
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -1.1e+20) {
tmp = t_2;
} else if (z <= -1.4e-50) {
tmp = ((t - a) / t_1) * z;
} else if (z <= 3.8e-197) {
tmp = (y / t_1) * x;
} else if (z <= 2500000000.0) {
tmp = fma(t, z, (y * x)) / t_1;
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = fma(Float64(b - y), z, y) t_2 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -1.1e+20) tmp = t_2; elseif (z <= -1.4e-50) tmp = Float64(Float64(Float64(t - a) / t_1) * z); elseif (z <= 3.8e-197) tmp = Float64(Float64(y / t_1) * x); elseif (z <= 2500000000.0) tmp = Float64(fma(t, z, Float64(y * x)) / t_1); else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(b - y), $MachinePrecision] * z + y), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.1e+20], t$95$2, If[LessEqual[z, -1.4e-50], N[(N[(N[(t - a), $MachinePrecision] / t$95$1), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[z, 3.8e-197], N[(N[(y / t$95$1), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[z, 2500000000.0], N[(N[(t * z + N[(y * x), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(b - y, z, y\right)\\
t_2 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -1.1 \cdot 10^{+20}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -1.4 \cdot 10^{-50}:\\
\;\;\;\;\frac{t - a}{t\_1} \cdot z\\
\mathbf{elif}\;z \leq 3.8 \cdot 10^{-197}:\\
\;\;\;\;\frac{y}{t\_1} \cdot x\\
\mathbf{elif}\;z \leq 2500000000:\\
\;\;\;\;\frac{\mathsf{fma}\left(t, z, y \cdot x\right)}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -1.1e20 or 2.5e9 < z Initial program 45.8%
Taylor expanded in z around inf
lower-/.f64N/A
lower--.f64N/A
lower--.f6481.5
Applied rewrites81.5%
if -1.1e20 < z < -1.3999999999999999e-50Initial program 94.5%
Taylor expanded in x around 0
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f6473.0
Applied rewrites73.0%
Applied rewrites77.9%
if -1.3999999999999999e-50 < z < 3.7999999999999999e-197Initial program 78.9%
Taylor expanded in x around inf
*-commutativeN/A
associate-*l/N/A
lower-*.f64N/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f6475.9
Applied rewrites75.9%
if 3.7999999999999999e-197 < z < 2.5e9Initial program 92.3%
Taylor expanded in a around 0
lower-/.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f6477.9
Applied rewrites77.9%
Final simplification79.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma (- b y) z y))
(t_2 (* (/ (- t a) t_1) z))
(t_3 (/ (- t a) (- b y))))
(if (<= z -1.1e+20)
t_3
(if (<= z -1.4e-50)
t_2
(if (<= z 2.4e-88) (* (/ y t_1) x) (if (<= z 7600000.0) t_2 t_3))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma((b - y), z, y);
double t_2 = ((t - a) / t_1) * z;
double t_3 = (t - a) / (b - y);
double tmp;
if (z <= -1.1e+20) {
tmp = t_3;
} else if (z <= -1.4e-50) {
tmp = t_2;
} else if (z <= 2.4e-88) {
tmp = (y / t_1) * x;
} else if (z <= 7600000.0) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = fma(Float64(b - y), z, y) t_2 = Float64(Float64(Float64(t - a) / t_1) * z) t_3 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -1.1e+20) tmp = t_3; elseif (z <= -1.4e-50) tmp = t_2; elseif (z <= 2.4e-88) tmp = Float64(Float64(y / t_1) * x); elseif (z <= 7600000.0) tmp = t_2; else tmp = t_3; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(b - y), $MachinePrecision] * z + y), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t - a), $MachinePrecision] / t$95$1), $MachinePrecision] * z), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.1e+20], t$95$3, If[LessEqual[z, -1.4e-50], t$95$2, If[LessEqual[z, 2.4e-88], N[(N[(y / t$95$1), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[z, 7600000.0], t$95$2, t$95$3]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(b - y, z, y\right)\\
t_2 := \frac{t - a}{t\_1} \cdot z\\
t_3 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -1.1 \cdot 10^{+20}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;z \leq -1.4 \cdot 10^{-50}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 2.4 \cdot 10^{-88}:\\
\;\;\;\;\frac{y}{t\_1} \cdot x\\
\mathbf{elif}\;z \leq 7600000:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if z < -1.1e20 or 7.6e6 < z Initial program 46.3%
Taylor expanded in z around inf
lower-/.f64N/A
lower--.f64N/A
lower--.f6480.9
Applied rewrites80.9%
if -1.1e20 < z < -1.3999999999999999e-50 or 2.4e-88 < z < 7.6e6Initial program 97.0%
Taylor expanded in x around 0
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f6472.2
Applied rewrites72.2%
Applied rewrites74.8%
if -1.3999999999999999e-50 < z < 2.4e-88Initial program 79.9%
Taylor expanded in x around inf
*-commutativeN/A
associate-*l/N/A
lower-*.f64N/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f6473.8
Applied rewrites73.8%
Final simplification77.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -2.8e+48)
t_1
(if (<= z 1.9e+66)
(/ (+ (* (- t a) z) (* y x)) (+ (* (- b y) z) y))
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.8e+48) {
tmp = t_1;
} else if (z <= 1.9e+66) {
tmp = (((t - a) * z) + (y * x)) / (((b - y) * z) + y);
} 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 <= (-2.8d+48)) then
tmp = t_1
else if (z <= 1.9d+66) then
tmp = (((t - a) * z) + (y * x)) / (((b - y) * z) + y)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -2.8e+48) {
tmp = t_1;
} else if (z <= 1.9e+66) {
tmp = (((t - a) * z) + (y * x)) / (((b - y) * z) + y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) tmp = 0 if z <= -2.8e+48: tmp = t_1 elif z <= 1.9e+66: tmp = (((t - a) * z) + (y * x)) / (((b - y) * z) + y) 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.8e+48) tmp = t_1; elseif (z <= 1.9e+66) tmp = Float64(Float64(Float64(Float64(t - a) * z) + Float64(y * x)) / Float64(Float64(Float64(b - y) * z) + y)); 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 <= -2.8e+48) tmp = t_1; elseif (z <= 1.9e+66) tmp = (((t - a) * z) + (y * x)) / (((b - y) * z) + y); 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, -2.8e+48], t$95$1, If[LessEqual[z, 1.9e+66], N[(N[(N[(N[(t - a), $MachinePrecision] * z), $MachinePrecision] + N[(y * x), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(b - y), $MachinePrecision] * z), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -2.8 \cdot 10^{+48}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.9 \cdot 10^{+66}:\\
\;\;\;\;\frac{\left(t - a\right) \cdot z + y \cdot x}{\left(b - y\right) \cdot z + y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.80000000000000012e48 or 1.9000000000000001e66 < z Initial program 38.6%
Taylor expanded in z around inf
lower-/.f64N/A
lower--.f64N/A
lower--.f6481.5
Applied rewrites81.5%
if -2.80000000000000012e48 < z < 1.9000000000000001e66Initial program 85.7%
Final simplification83.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -7.2e-37)
t_1
(if (<= z 1.25e-194)
(fma (- (+ (/ t y) x) (/ a y)) z x)
(if (<= z 2500000000.0) (/ (fma t z (* y x)) (fma (- b y) z y)) 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 <= -7.2e-37) {
tmp = t_1;
} else if (z <= 1.25e-194) {
tmp = fma((((t / y) + x) - (a / y)), z, x);
} else if (z <= 2500000000.0) {
tmp = fma(t, z, (y * x)) / fma((b - y), z, y);
} 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 <= -7.2e-37) tmp = t_1; elseif (z <= 1.25e-194) tmp = fma(Float64(Float64(Float64(t / y) + x) - Float64(a / y)), z, x); elseif (z <= 2500000000.0) tmp = Float64(fma(t, z, Float64(y * x)) / fma(Float64(b - y), z, y)); 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, -7.2e-37], t$95$1, If[LessEqual[z, 1.25e-194], N[(N[(N[(N[(t / y), $MachinePrecision] + x), $MachinePrecision] - N[(a / y), $MachinePrecision]), $MachinePrecision] * z + x), $MachinePrecision], If[LessEqual[z, 2500000000.0], N[(N[(t * z + N[(y * x), $MachinePrecision]), $MachinePrecision] / N[(N[(b - y), $MachinePrecision] * z + y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -7.2 \cdot 10^{-37}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.25 \cdot 10^{-194}:\\
\;\;\;\;\mathsf{fma}\left(\left(\frac{t}{y} + x\right) - \frac{a}{y}, z, x\right)\\
\mathbf{elif}\;z \leq 2500000000:\\
\;\;\;\;\frac{\mathsf{fma}\left(t, z, y \cdot x\right)}{\mathsf{fma}\left(b - y, z, y\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -7.20000000000000014e-37 or 2.5e9 < z Initial program 50.5%
Taylor expanded in z around inf
lower-/.f64N/A
lower--.f64N/A
lower--.f6478.6
Applied rewrites78.6%
if -7.20000000000000014e-37 < z < 1.2500000000000001e-194Initial program 80.2%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites83.4%
Taylor expanded in b around 0
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
*-commutativeN/A
lower-*.f6462.6
Applied rewrites62.6%
Taylor expanded in z around inf
Applied rewrites3.5%
Taylor expanded in z around 0
Applied rewrites77.4%
if 1.2500000000000001e-194 < z < 2.5e9Initial program 92.3%
Taylor expanded in a around 0
lower-/.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f6477.9
Applied rewrites77.9%
Final simplification78.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -1.15e-38)
t_1
(if (<= z -1.2e-46)
(* (/ (- t a) y) z)
(if (<= z 2.7e-88) (* (/ y (fma (- b y) z 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 <= -1.15e-38) {
tmp = t_1;
} else if (z <= -1.2e-46) {
tmp = ((t - a) / y) * z;
} else if (z <= 2.7e-88) {
tmp = (y / fma((b - y), z, 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 <= -1.15e-38) tmp = t_1; elseif (z <= -1.2e-46) tmp = Float64(Float64(Float64(t - a) / y) * z); elseif (z <= 2.7e-88) tmp = Float64(Float64(y / fma(Float64(b - y), z, 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, -1.15e-38], t$95$1, If[LessEqual[z, -1.2e-46], N[(N[(N[(t - a), $MachinePrecision] / y), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[z, 2.7e-88], N[(N[(y / N[(N[(b - y), $MachinePrecision] * z + 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 -1.15 \cdot 10^{-38}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.2 \cdot 10^{-46}:\\
\;\;\;\;\frac{t - a}{y} \cdot z\\
\mathbf{elif}\;z \leq 2.7 \cdot 10^{-88}:\\
\;\;\;\;\frac{y}{\mathsf{fma}\left(b - y, z, y\right)} \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.15000000000000001e-38 or 2.69999999999999995e-88 < z Initial program 56.9%
Taylor expanded in z around inf
lower-/.f64N/A
lower--.f64N/A
lower--.f6474.4
Applied rewrites74.4%
if -1.15000000000000001e-38 < z < -1.20000000000000007e-46Initial program 99.1%
Taylor expanded in x around 0
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f6476.2
Applied rewrites76.2%
Applied rewrites94.6%
Taylor expanded in z around 0
Applied rewrites94.6%
if -1.20000000000000007e-46 < z < 2.69999999999999995e-88Initial program 79.9%
Taylor expanded in x around inf
*-commutativeN/A
associate-*l/N/A
lower-*.f64N/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f6473.8
Applied rewrites73.8%
Final simplification74.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -1.15e-38)
t_1
(if (<= z -6.8e-47)
(* (/ (- t a) y) z)
(if (<= z 2.7e-88) (* 1.0 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.15e-38) {
tmp = t_1;
} else if (z <= -6.8e-47) {
tmp = ((t - a) / y) * z;
} else if (z <= 2.7e-88) {
tmp = 1.0 * 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.15d-38)) then
tmp = t_1
else if (z <= (-6.8d-47)) then
tmp = ((t - a) / y) * z
else if (z <= 2.7d-88) then
tmp = 1.0d0 * 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.15e-38) {
tmp = t_1;
} else if (z <= -6.8e-47) {
tmp = ((t - a) / y) * z;
} else if (z <= 2.7e-88) {
tmp = 1.0 * 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.15e-38: tmp = t_1 elif z <= -6.8e-47: tmp = ((t - a) / y) * z elif z <= 2.7e-88: tmp = 1.0 * 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.15e-38) tmp = t_1; elseif (z <= -6.8e-47) tmp = Float64(Float64(Float64(t - a) / y) * z); elseif (z <= 2.7e-88) tmp = Float64(1.0 * 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.15e-38) tmp = t_1; elseif (z <= -6.8e-47) tmp = ((t - a) / y) * z; elseif (z <= 2.7e-88) tmp = 1.0 * 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.15e-38], t$95$1, If[LessEqual[z, -6.8e-47], N[(N[(N[(t - a), $MachinePrecision] / y), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[z, 2.7e-88], N[(1.0 * x), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -1.15 \cdot 10^{-38}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -6.8 \cdot 10^{-47}:\\
\;\;\;\;\frac{t - a}{y} \cdot z\\
\mathbf{elif}\;z \leq 2.7 \cdot 10^{-88}:\\
\;\;\;\;1 \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.15000000000000001e-38 or 2.69999999999999995e-88 < z Initial program 56.9%
Taylor expanded in z around inf
lower-/.f64N/A
lower--.f64N/A
lower--.f6474.4
Applied rewrites74.4%
if -1.15000000000000001e-38 < z < -6.8000000000000003e-47Initial program 99.1%
Taylor expanded in x around 0
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f6476.2
Applied rewrites76.2%
Applied rewrites94.6%
Taylor expanded in z around 0
Applied rewrites94.6%
if -6.8000000000000003e-47 < z < 2.69999999999999995e-88Initial program 79.9%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites84.7%
Taylor expanded in z around 0
Applied rewrites66.2%
Final simplification71.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -3e-38)
t_1
(if (<= z -1.4e-50)
(/ (* (- t a) z) y)
(if (<= z 2.7e-88) (* 1.0 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 <= -3e-38) {
tmp = t_1;
} else if (z <= -1.4e-50) {
tmp = ((t - a) * z) / y;
} else if (z <= 2.7e-88) {
tmp = 1.0 * 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 <= (-3d-38)) then
tmp = t_1
else if (z <= (-1.4d-50)) then
tmp = ((t - a) * z) / y
else if (z <= 2.7d-88) then
tmp = 1.0d0 * 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 <= -3e-38) {
tmp = t_1;
} else if (z <= -1.4e-50) {
tmp = ((t - a) * z) / y;
} else if (z <= 2.7e-88) {
tmp = 1.0 * 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 <= -3e-38: tmp = t_1 elif z <= -1.4e-50: tmp = ((t - a) * z) / y elif z <= 2.7e-88: tmp = 1.0 * 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 <= -3e-38) tmp = t_1; elseif (z <= -1.4e-50) tmp = Float64(Float64(Float64(t - a) * z) / y); elseif (z <= 2.7e-88) tmp = Float64(1.0 * 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 <= -3e-38) tmp = t_1; elseif (z <= -1.4e-50) tmp = ((t - a) * z) / y; elseif (z <= 2.7e-88) tmp = 1.0 * 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, -3e-38], t$95$1, If[LessEqual[z, -1.4e-50], N[(N[(N[(t - a), $MachinePrecision] * z), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[z, 2.7e-88], N[(1.0 * x), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -3 \cdot 10^{-38}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.4 \cdot 10^{-50}:\\
\;\;\;\;\frac{\left(t - a\right) \cdot z}{y}\\
\mathbf{elif}\;z \leq 2.7 \cdot 10^{-88}:\\
\;\;\;\;1 \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.99999999999999989e-38 or 2.69999999999999995e-88 < z Initial program 56.9%
Taylor expanded in z around inf
lower-/.f64N/A
lower--.f64N/A
lower--.f6474.4
Applied rewrites74.4%
if -2.99999999999999989e-38 < z < -1.3999999999999999e-50Initial program 99.1%
Taylor expanded in x around 0
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f6476.2
Applied rewrites76.2%
Taylor expanded in z around 0
Applied rewrites94.3%
if -1.3999999999999999e-50 < z < 2.69999999999999995e-88Initial program 79.9%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites84.7%
Taylor expanded in z around 0
Applied rewrites66.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ t (- b y))))
(if (<= z -3.2e-47)
t_1
(if (<= z 2.7e-88) (* 1.0 x) (if (<= z 5.8e+174) t_1 (/ (- a t) y))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t / (b - y);
double tmp;
if (z <= -3.2e-47) {
tmp = t_1;
} else if (z <= 2.7e-88) {
tmp = 1.0 * x;
} else if (z <= 5.8e+174) {
tmp = t_1;
} else {
tmp = (a - t) / y;
}
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 <= (-3.2d-47)) then
tmp = t_1
else if (z <= 2.7d-88) then
tmp = 1.0d0 * x
else if (z <= 5.8d+174) then
tmp = t_1
else
tmp = (a - t) / y
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 <= -3.2e-47) {
tmp = t_1;
} else if (z <= 2.7e-88) {
tmp = 1.0 * x;
} else if (z <= 5.8e+174) {
tmp = t_1;
} else {
tmp = (a - t) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = t / (b - y) tmp = 0 if z <= -3.2e-47: tmp = t_1 elif z <= 2.7e-88: tmp = 1.0 * x elif z <= 5.8e+174: tmp = t_1 else: tmp = (a - t) / y return tmp
function code(x, y, z, t, a, b) t_1 = Float64(t / Float64(b - y)) tmp = 0.0 if (z <= -3.2e-47) tmp = t_1; elseif (z <= 2.7e-88) tmp = Float64(1.0 * x); elseif (z <= 5.8e+174) tmp = t_1; else tmp = Float64(Float64(a - t) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = t / (b - y); tmp = 0.0; if (z <= -3.2e-47) tmp = t_1; elseif (z <= 2.7e-88) tmp = 1.0 * x; elseif (z <= 5.8e+174) tmp = t_1; else tmp = (a - t) / y; 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, -3.2e-47], t$95$1, If[LessEqual[z, 2.7e-88], N[(1.0 * x), $MachinePrecision], If[LessEqual[z, 5.8e+174], t$95$1, N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{b - y}\\
\mathbf{if}\;z \leq -3.2 \cdot 10^{-47}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.7 \cdot 10^{-88}:\\
\;\;\;\;1 \cdot x\\
\mathbf{elif}\;z \leq 5.8 \cdot 10^{+174}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{a - t}{y}\\
\end{array}
\end{array}
if z < -3.1999999999999999e-47 or 2.69999999999999995e-88 < z < 5.7999999999999999e174Initial program 62.4%
Taylor expanded in t around inf
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f6434.9
Applied rewrites34.9%
Taylor expanded in z around inf
Applied rewrites42.0%
if -3.1999999999999999e-47 < z < 2.69999999999999995e-88Initial program 79.9%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites84.7%
Taylor expanded in z around 0
Applied rewrites66.2%
if 5.7999999999999999e174 < z Initial program 32.2%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites44.8%
Taylor expanded in b around 0
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
*-commutativeN/A
lower-*.f6424.0
Applied rewrites24.0%
Taylor expanded in z around inf
Applied rewrites65.6%
Taylor expanded in a around 0
Applied rewrites65.6%
(FPCore (x y z t a b) :precision binary64 (if (<= z -3.2e-47) (/ t b) (if (<= z 2.7e-88) (* 1.0 x) (if (<= z 5.8e+174) (/ t b) (/ a y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -3.2e-47) {
tmp = t / b;
} else if (z <= 2.7e-88) {
tmp = 1.0 * x;
} else if (z <= 5.8e+174) {
tmp = t / b;
} else {
tmp = a / y;
}
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) :: tmp
if (z <= (-3.2d-47)) then
tmp = t / b
else if (z <= 2.7d-88) then
tmp = 1.0d0 * x
else if (z <= 5.8d+174) then
tmp = t / b
else
tmp = a / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -3.2e-47) {
tmp = t / b;
} else if (z <= 2.7e-88) {
tmp = 1.0 * x;
} else if (z <= 5.8e+174) {
tmp = t / b;
} else {
tmp = a / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -3.2e-47: tmp = t / b elif z <= 2.7e-88: tmp = 1.0 * x elif z <= 5.8e+174: tmp = t / b else: tmp = a / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -3.2e-47) tmp = Float64(t / b); elseif (z <= 2.7e-88) tmp = Float64(1.0 * x); elseif (z <= 5.8e+174) tmp = Float64(t / b); else tmp = Float64(a / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -3.2e-47) tmp = t / b; elseif (z <= 2.7e-88) tmp = 1.0 * x; elseif (z <= 5.8e+174) tmp = t / b; else tmp = a / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -3.2e-47], N[(t / b), $MachinePrecision], If[LessEqual[z, 2.7e-88], N[(1.0 * x), $MachinePrecision], If[LessEqual[z, 5.8e+174], N[(t / b), $MachinePrecision], N[(a / y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.2 \cdot 10^{-47}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{elif}\;z \leq 2.7 \cdot 10^{-88}:\\
\;\;\;\;1 \cdot x\\
\mathbf{elif}\;z \leq 5.8 \cdot 10^{+174}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{a}{y}\\
\end{array}
\end{array}
if z < -3.1999999999999999e-47 or 2.69999999999999995e-88 < z < 5.7999999999999999e174Initial program 62.4%
Taylor expanded in b around inf
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-*.f6439.8
Applied rewrites39.8%
Taylor expanded in t around inf
Applied rewrites32.8%
if -3.1999999999999999e-47 < z < 2.69999999999999995e-88Initial program 79.9%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites84.7%
Taylor expanded in z around 0
Applied rewrites66.2%
if 5.7999999999999999e174 < z Initial program 32.2%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites44.8%
Taylor expanded in b around 0
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
*-commutativeN/A
lower-*.f6424.0
Applied rewrites24.0%
Taylor expanded in z around inf
Applied rewrites65.6%
Taylor expanded in a around inf
Applied rewrites45.1%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (/ (- t a) (- b y)))) (if (<= z -1.3e-47) t_1 (if (<= z 2.7e-88) (* 1.0 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.3e-47) {
tmp = t_1;
} else if (z <= 2.7e-88) {
tmp = 1.0 * 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.3d-47)) then
tmp = t_1
else if (z <= 2.7d-88) then
tmp = 1.0d0 * 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.3e-47) {
tmp = t_1;
} else if (z <= 2.7e-88) {
tmp = 1.0 * 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.3e-47: tmp = t_1 elif z <= 2.7e-88: tmp = 1.0 * 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.3e-47) tmp = t_1; elseif (z <= 2.7e-88) tmp = Float64(1.0 * 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.3e-47) tmp = t_1; elseif (z <= 2.7e-88) tmp = 1.0 * 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.3e-47], t$95$1, If[LessEqual[z, 2.7e-88], N[(1.0 * x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -1.3 \cdot 10^{-47}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.7 \cdot 10^{-88}:\\
\;\;\;\;1 \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.3e-47 or 2.69999999999999995e-88 < z Initial program 58.2%
Taylor expanded in z around inf
lower-/.f64N/A
lower--.f64N/A
lower--.f6472.4
Applied rewrites72.4%
if -1.3e-47 < z < 2.69999999999999995e-88Initial program 79.9%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites84.7%
Taylor expanded in z around 0
Applied rewrites66.2%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (/ x (- 1.0 z)))) (if (<= y -2.55e-30) t_1 (if (<= y 2.1e-19) (/ (- 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 <= -2.55e-30) {
tmp = t_1;
} else if (y <= 2.1e-19) {
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 <= (-2.55d-30)) then
tmp = t_1
else if (y <= 2.1d-19) 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 <= -2.55e-30) {
tmp = t_1;
} else if (y <= 2.1e-19) {
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 <= -2.55e-30: tmp = t_1 elif y <= 2.1e-19: 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 <= -2.55e-30) tmp = t_1; elseif (y <= 2.1e-19) 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 <= -2.55e-30) tmp = t_1; elseif (y <= 2.1e-19) 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, -2.55e-30], t$95$1, If[LessEqual[y, 2.1e-19], 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 -2.55 \cdot 10^{-30}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 2.1 \cdot 10^{-19}:\\
\;\;\;\;\frac{t - a}{b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -2.54999999999999986e-30 or 2.0999999999999999e-19 < y Initial program 55.2%
Taylor expanded in y around inf
lower-/.f64N/A
mul-1-negN/A
unsub-negN/A
lower--.f6458.6
Applied rewrites58.6%
if -2.54999999999999986e-30 < y < 2.0999999999999999e-19Initial program 78.2%
Taylor expanded in y around 0
lower-/.f64N/A
lower--.f6467.8
Applied rewrites67.8%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (/ x (- 1.0 z)))) (if (<= y -9.5e+55) t_1 (if (<= y 7.2e-17) (/ t (- b y)) 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 <= -9.5e+55) {
tmp = t_1;
} else if (y <= 7.2e-17) {
tmp = t / (b - y);
} 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 <= (-9.5d+55)) then
tmp = t_1
else if (y <= 7.2d-17) then
tmp = t / (b - y)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (1.0 - z);
double tmp;
if (y <= -9.5e+55) {
tmp = t_1;
} else if (y <= 7.2e-17) {
tmp = t / (b - y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (1.0 - z) tmp = 0 if y <= -9.5e+55: tmp = t_1 elif y <= 7.2e-17: tmp = t / (b - y) 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 <= -9.5e+55) tmp = t_1; elseif (y <= 7.2e-17) tmp = Float64(t / Float64(b - y)); 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 <= -9.5e+55) tmp = t_1; elseif (y <= 7.2e-17) tmp = t / (b - y); 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, -9.5e+55], t$95$1, If[LessEqual[y, 7.2e-17], N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{1 - z}\\
\mathbf{if}\;y \leq -9.5 \cdot 10^{+55}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 7.2 \cdot 10^{-17}:\\
\;\;\;\;\frac{t}{b - y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -9.49999999999999989e55 or 7.1999999999999999e-17 < y Initial program 52.5%
Taylor expanded in y around inf
lower-/.f64N/A
mul-1-negN/A
unsub-negN/A
lower--.f6462.9
Applied rewrites62.9%
if -9.49999999999999989e55 < y < 7.1999999999999999e-17Initial program 78.0%
Taylor expanded in t around inf
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f6440.6
Applied rewrites40.6%
Taylor expanded in z around inf
Applied rewrites45.8%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (/ t (- b y)))) (if (<= z -3.2e-47) t_1 (if (<= z 2.7e-88) (* 1.0 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 <= -3.2e-47) {
tmp = t_1;
} else if (z <= 2.7e-88) {
tmp = 1.0 * 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 <= (-3.2d-47)) then
tmp = t_1
else if (z <= 2.7d-88) then
tmp = 1.0d0 * 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 <= -3.2e-47) {
tmp = t_1;
} else if (z <= 2.7e-88) {
tmp = 1.0 * x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = t / (b - y) tmp = 0 if z <= -3.2e-47: tmp = t_1 elif z <= 2.7e-88: tmp = 1.0 * 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 <= -3.2e-47) tmp = t_1; elseif (z <= 2.7e-88) tmp = Float64(1.0 * 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 <= -3.2e-47) tmp = t_1; elseif (z <= 2.7e-88) tmp = 1.0 * 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, -3.2e-47], t$95$1, If[LessEqual[z, 2.7e-88], N[(1.0 * x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{b - y}\\
\mathbf{if}\;z \leq -3.2 \cdot 10^{-47}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.7 \cdot 10^{-88}:\\
\;\;\;\;1 \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -3.1999999999999999e-47 or 2.69999999999999995e-88 < z Initial program 58.2%
Taylor expanded in t around inf
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f6434.5
Applied rewrites34.5%
Taylor expanded in z around inf
Applied rewrites42.4%
if -3.1999999999999999e-47 < z < 2.69999999999999995e-88Initial program 79.9%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites84.7%
Taylor expanded in z around 0
Applied rewrites66.2%
(FPCore (x y z t a b) :precision binary64 (if (<= z -0.125) (/ a y) (if (<= z 8.5e-10) (* (+ 1.0 z) x) (/ a y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -0.125) {
tmp = a / y;
} else if (z <= 8.5e-10) {
tmp = (1.0 + z) * x;
} else {
tmp = a / y;
}
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) :: tmp
if (z <= (-0.125d0)) then
tmp = a / y
else if (z <= 8.5d-10) then
tmp = (1.0d0 + z) * x
else
tmp = a / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -0.125) {
tmp = a / y;
} else if (z <= 8.5e-10) {
tmp = (1.0 + z) * x;
} else {
tmp = a / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -0.125: tmp = a / y elif z <= 8.5e-10: tmp = (1.0 + z) * x else: tmp = a / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -0.125) tmp = Float64(a / y); elseif (z <= 8.5e-10) tmp = Float64(Float64(1.0 + z) * x); else tmp = Float64(a / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -0.125) tmp = a / y; elseif (z <= 8.5e-10) tmp = (1.0 + z) * x; else tmp = a / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -0.125], N[(a / y), $MachinePrecision], If[LessEqual[z, 8.5e-10], N[(N[(1.0 + z), $MachinePrecision] * x), $MachinePrecision], N[(a / y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.125:\\
\;\;\;\;\frac{a}{y}\\
\mathbf{elif}\;z \leq 8.5 \cdot 10^{-10}:\\
\;\;\;\;\left(1 + z\right) \cdot x\\
\mathbf{else}:\\
\;\;\;\;\frac{a}{y}\\
\end{array}
\end{array}
if z < -0.125 or 8.4999999999999996e-10 < z Initial program 49.8%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites58.6%
Taylor expanded in b around 0
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
*-commutativeN/A
lower-*.f6427.6
Applied rewrites27.6%
Taylor expanded in z around inf
Applied rewrites37.9%
Taylor expanded in a around inf
Applied rewrites22.8%
if -0.125 < z < 8.4999999999999996e-10Initial program 84.0%
Taylor expanded in y around inf
lower-/.f64N/A
mul-1-negN/A
unsub-negN/A
lower--.f6455.5
Applied rewrites55.5%
Taylor expanded in z around 0
Applied rewrites55.3%
Applied rewrites55.3%
(FPCore (x y z t a b) :precision binary64 (* (+ 1.0 z) x))
double code(double x, double y, double z, double t, double a, double b) {
return (1.0 + z) * 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 = (1.0d0 + z) * x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (1.0 + z) * x;
}
def code(x, y, z, t, a, b): return (1.0 + z) * x
function code(x, y, z, t, a, b) return Float64(Float64(1.0 + z) * x) end
function tmp = code(x, y, z, t, a, b) tmp = (1.0 + z) * x; end
code[x_, y_, z_, t_, a_, b_] := N[(N[(1.0 + z), $MachinePrecision] * x), $MachinePrecision]
\begin{array}{l}
\\
\left(1 + z\right) \cdot x
\end{array}
Initial program 65.8%
Taylor expanded in y around inf
lower-/.f64N/A
mul-1-negN/A
unsub-negN/A
lower--.f6436.9
Applied rewrites36.9%
Taylor expanded in z around 0
Applied rewrites29.0%
Applied rewrites29.0%
(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 65.8%
Taylor expanded in y around inf
lower-/.f64N/A
mul-1-negN/A
unsub-negN/A
lower--.f6436.9
Applied rewrites36.9%
Taylor expanded in z around 0
Applied rewrites29.0%
(FPCore (x y z t a b) :precision binary64 (* 1.0 x))
double code(double x, double y, double z, double t, double a, double b) {
return 1.0 * 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 = 1.0d0 * x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return 1.0 * x;
}
def code(x, y, z, t, a, b): return 1.0 * x
function code(x, y, z, t, a, b) return Float64(1.0 * x) end
function tmp = code(x, y, z, t, a, b) tmp = 1.0 * x; end
code[x_, y_, z_, t_, a_, b_] := N[(1.0 * x), $MachinePrecision]
\begin{array}{l}
\\
1 \cdot x
\end{array}
Initial program 65.8%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites69.2%
Taylor expanded in z around 0
Applied rewrites27.6%
(FPCore (x y z t a b) :precision binary64 (* z x))
double code(double x, double y, double z, double t, double a, double b) {
return z * 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 = z * x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return z * x;
}
def code(x, y, z, t, a, b): return z * x
function code(x, y, z, t, a, b) return Float64(z * x) end
function tmp = code(x, y, z, t, a, b) tmp = z * x; end
code[x_, y_, z_, t_, a_, b_] := N[(z * x), $MachinePrecision]
\begin{array}{l}
\\
z \cdot x
\end{array}
Initial program 65.8%
Taylor expanded in y around inf
lower-/.f64N/A
mul-1-negN/A
unsub-negN/A
lower--.f6436.9
Applied rewrites36.9%
Taylor expanded in z around 0
Applied rewrites29.0%
Taylor expanded in z around inf
Applied rewrites5.2%
Final simplification5.2%
(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 2024249
(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)))))