
(FPCore (x y z t a b) :precision binary64 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t))))
double code(double x, double y, double z, double t, double a, double b) {
return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
}
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 + 1.0d0) + ((y * b) / t))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
}
def code(x, y, z, t, a, b): return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t))
function code(x, y, z, t, a, b) return Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))) end
function tmp = code(x, y, z, t, a, b) tmp = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t)); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 18 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t))))
double code(double x, double y, double z, double t, double a, double b) {
return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
}
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 + 1.0d0) + ((y * b) / t))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
}
def code(x, y, z, t, a, b): return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t))
function code(x, y, z, t, a, b) return Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))) end
function tmp = code(x, y, z, t, a, b) tmp = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t)); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}
\end{array}
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t))))
(t_2 (+ (fma y (/ b t) a) 1.0)))
(if (<= t_1 -1e+156)
(fma (/ y t) (/ z t_2) (/ x t_2))
(if (<= t_1 -5e-271)
t_1
(if (<= t_1 -2e-307)
(/ (+ x (* y (/ z t))) (+ a 1.0))
(if (<= t_1 0.0)
(+
(/ (+ (/ (* x t) b) (/ (* t (* z (- -1.0 a))) (pow b 2.0))) y)
(/ z b))
(if (<= t_1 5e+304) t_1 (/ z b))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
double t_2 = fma(y, (b / t), a) + 1.0;
double tmp;
if (t_1 <= -1e+156) {
tmp = fma((y / t), (z / t_2), (x / t_2));
} else if (t_1 <= -5e-271) {
tmp = t_1;
} else if (t_1 <= -2e-307) {
tmp = (x + (y * (z / t))) / (a + 1.0);
} else if (t_1 <= 0.0) {
tmp = ((((x * t) / b) + ((t * (z * (-1.0 - a))) / pow(b, 2.0))) / y) + (z / b);
} else if (t_1 <= 5e+304) {
tmp = t_1;
} else {
tmp = z / b;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))) t_2 = Float64(fma(y, Float64(b / t), a) + 1.0) tmp = 0.0 if (t_1 <= -1e+156) tmp = fma(Float64(y / t), Float64(z / t_2), Float64(x / t_2)); elseif (t_1 <= -5e-271) tmp = t_1; elseif (t_1 <= -2e-307) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(a + 1.0)); elseif (t_1 <= 0.0) tmp = Float64(Float64(Float64(Float64(Float64(x * t) / b) + Float64(Float64(t * Float64(z * Float64(-1.0 - a))) / (b ^ 2.0))) / y) + Float64(z / b)); elseif (t_1 <= 5e+304) tmp = t_1; else tmp = Float64(z / b); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y * N[(b / t), $MachinePrecision] + a), $MachinePrecision] + 1.0), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+156], N[(N[(y / t), $MachinePrecision] * N[(z / t$95$2), $MachinePrecision] + N[(x / t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -5e-271], t$95$1, If[LessEqual[t$95$1, -2e-307], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 0.0], N[(N[(N[(N[(N[(x * t), $MachinePrecision] / b), $MachinePrecision] + N[(N[(t * N[(z * N[(-1.0 - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Power[b, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision] + N[(z / b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+304], t$95$1, N[(z / b), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\
t_2 := \mathsf{fma}\left(y, \frac{b}{t}, a\right) + 1\\
\mathbf{if}\;t_1 \leq -1 \cdot 10^{+156}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{t}, \frac{z}{t_2}, \frac{x}{t_2}\right)\\
\mathbf{elif}\;t_1 \leq -5 \cdot 10^{-271}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_1 \leq -2 \cdot 10^{-307}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + 1}\\
\mathbf{elif}\;t_1 \leq 0:\\
\;\;\;\;\frac{\frac{x \cdot t}{b} + \frac{t \cdot \left(z \cdot \left(-1 - a\right)\right)}{{b}^{2}}}{y} + \frac{z}{b}\\
\mathbf{elif}\;t_1 \leq 5 \cdot 10^{+304}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -9.9999999999999998e155Initial program 77.4%
*-commutative77.4%
associate-*l/81.8%
associate-+l+81.8%
associate-*r/81.8%
*-commutative81.8%
Simplified81.8%
Taylor expanded in x around 0 81.8%
+-commutative81.8%
times-frac99.9%
fma-def99.9%
associate-*r/95.0%
+-commutative95.0%
associate-*r/99.9%
associate-*l/99.9%
*-commutative99.9%
fma-def99.9%
associate-*r/99.8%
+-commutative99.8%
associate-*r/99.9%
associate-*l/99.9%
*-commutative99.9%
fma-def99.9%
Simplified99.9%
if -9.9999999999999998e155 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -5.0000000000000002e-271 or -0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 4.9999999999999997e304Initial program 99.1%
if -5.0000000000000002e-271 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -1.99999999999999982e-307Initial program 84.8%
*-commutative84.8%
associate-*l/99.7%
associate-+l+99.7%
associate-*r/84.4%
*-commutative84.4%
Simplified84.4%
Taylor expanded in b around 0 84.8%
*-commutative84.8%
associate-*l/99.7%
Applied egg-rr99.7%
if -1.99999999999999982e-307 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -0.0Initial program 52.3%
*-commutative52.3%
associate-*l/52.2%
associate-+l+52.2%
associate-*r/56.5%
*-commutative56.5%
Simplified56.5%
Taylor expanded in y around -inf 76.5%
if 4.9999999999999997e304 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) Initial program 7.3%
*-commutative7.3%
associate-*l/18.7%
associate-+l+18.7%
associate-*r/35.3%
*-commutative35.3%
Simplified35.3%
Taylor expanded in t around 0 87.0%
Final simplification93.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t)))))
(if (<= t_1 (- INFINITY))
(/ z (* t (/ (+ a (fma y (/ b t) 1.0)) y)))
(if (<= t_1 -5e-271)
t_1
(if (<= t_1 -2e-307)
(/ (+ x (* y (/ z t))) (+ a 1.0))
(if (<= t_1 0.0)
(+
(/ (+ (/ (* x t) b) (/ (* t (* z (- -1.0 a))) (pow b 2.0))) y)
(/ z b))
(if (<= t_1 5e+304) t_1 (/ z b))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = z / (t * ((a + fma(y, (b / t), 1.0)) / y));
} else if (t_1 <= -5e-271) {
tmp = t_1;
} else if (t_1 <= -2e-307) {
tmp = (x + (y * (z / t))) / (a + 1.0);
} else if (t_1 <= 0.0) {
tmp = ((((x * t) / b) + ((t * (z * (-1.0 - a))) / pow(b, 2.0))) / y) + (z / b);
} else if (t_1 <= 5e+304) {
tmp = t_1;
} else {
tmp = z / b;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(z / Float64(t * Float64(Float64(a + fma(y, Float64(b / t), 1.0)) / y))); elseif (t_1 <= -5e-271) tmp = t_1; elseif (t_1 <= -2e-307) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(a + 1.0)); elseif (t_1 <= 0.0) tmp = Float64(Float64(Float64(Float64(Float64(x * t) / b) + Float64(Float64(t * Float64(z * Float64(-1.0 - a))) / (b ^ 2.0))) / y) + Float64(z / b)); elseif (t_1 <= 5e+304) tmp = t_1; else tmp = Float64(z / b); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(z / N[(t * N[(N[(a + N[(y * N[(b / t), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -5e-271], t$95$1, If[LessEqual[t$95$1, -2e-307], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 0.0], N[(N[(N[(N[(N[(x * t), $MachinePrecision] / b), $MachinePrecision] + N[(N[(t * N[(z * N[(-1.0 - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Power[b, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision] + N[(z / b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+304], t$95$1, N[(z / b), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\
\mathbf{if}\;t_1 \leq -\infty:\\
\;\;\;\;\frac{z}{t \cdot \frac{a + \mathsf{fma}\left(y, \frac{b}{t}, 1\right)}{y}}\\
\mathbf{elif}\;t_1 \leq -5 \cdot 10^{-271}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_1 \leq -2 \cdot 10^{-307}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + 1}\\
\mathbf{elif}\;t_1 \leq 0:\\
\;\;\;\;\frac{\frac{x \cdot t}{b} + \frac{t \cdot \left(z \cdot \left(-1 - a\right)\right)}{{b}^{2}}}{y} + \frac{z}{b}\\
\mathbf{elif}\;t_1 \leq 5 \cdot 10^{+304}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -inf.0Initial program 52.8%
*-commutative52.8%
associate-*l/71.8%
associate-+l+71.8%
associate-*r/71.8%
*-commutative71.8%
Simplified71.8%
Taylor expanded in x around 0 62.1%
*-commutative62.1%
times-frac81.0%
associate-*r/71.2%
+-commutative71.2%
associate-*r/81.0%
associate-*l/81.0%
*-commutative81.0%
fma-def81.0%
Simplified81.0%
*-commutative81.0%
clear-num81.0%
frac-times99.8%
*-un-lft-identity99.8%
fma-udef99.8%
*-commutative99.8%
associate-/r/90.0%
associate-+r+90.0%
+-commutative90.0%
+-commutative90.0%
associate-/r/99.8%
*-commutative99.8%
fma-def99.8%
Applied egg-rr99.8%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -5.0000000000000002e-271 or -0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 4.9999999999999997e304Initial program 99.2%
if -5.0000000000000002e-271 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -1.99999999999999982e-307Initial program 84.8%
*-commutative84.8%
associate-*l/99.7%
associate-+l+99.7%
associate-*r/84.4%
*-commutative84.4%
Simplified84.4%
Taylor expanded in b around 0 84.8%
*-commutative84.8%
associate-*l/99.7%
Applied egg-rr99.7%
if -1.99999999999999982e-307 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -0.0Initial program 52.3%
*-commutative52.3%
associate-*l/52.2%
associate-+l+52.2%
associate-*r/56.5%
*-commutative56.5%
Simplified56.5%
Taylor expanded in y around -inf 76.5%
if 4.9999999999999997e304 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) Initial program 7.3%
*-commutative7.3%
associate-*l/18.7%
associate-+l+18.7%
associate-*r/35.3%
*-commutative35.3%
Simplified35.3%
Taylor expanded in t around 0 87.0%
Final simplification93.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t)))))
(if (<= t_1 (- INFINITY))
(/ z (* t (/ (+ a (fma y (/ b t) 1.0)) y)))
(if (<= t_1 -5e-271)
t_1
(if (<= t_1 -2e-307)
(/ (+ x (* y (/ z t))) (+ a 1.0))
(if (or (<= t_1 0.0) (not (<= t_1 5e+304))) (/ z b) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = z / (t * ((a + fma(y, (b / t), 1.0)) / y));
} else if (t_1 <= -5e-271) {
tmp = t_1;
} else if (t_1 <= -2e-307) {
tmp = (x + (y * (z / t))) / (a + 1.0);
} else if ((t_1 <= 0.0) || !(t_1 <= 5e+304)) {
tmp = z / b;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(z / Float64(t * Float64(Float64(a + fma(y, Float64(b / t), 1.0)) / y))); elseif (t_1 <= -5e-271) tmp = t_1; elseif (t_1 <= -2e-307) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(a + 1.0)); elseif ((t_1 <= 0.0) || !(t_1 <= 5e+304)) tmp = Float64(z / b); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(z / N[(t * N[(N[(a + N[(y * N[(b / t), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -5e-271], t$95$1, If[LessEqual[t$95$1, -2e-307], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t$95$1, 0.0], N[Not[LessEqual[t$95$1, 5e+304]], $MachinePrecision]], N[(z / b), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\
\mathbf{if}\;t_1 \leq -\infty:\\
\;\;\;\;\frac{z}{t \cdot \frac{a + \mathsf{fma}\left(y, \frac{b}{t}, 1\right)}{y}}\\
\mathbf{elif}\;t_1 \leq -5 \cdot 10^{-271}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_1 \leq -2 \cdot 10^{-307}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + 1}\\
\mathbf{elif}\;t_1 \leq 0 \lor \neg \left(t_1 \leq 5 \cdot 10^{+304}\right):\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -inf.0Initial program 52.8%
*-commutative52.8%
associate-*l/71.8%
associate-+l+71.8%
associate-*r/71.8%
*-commutative71.8%
Simplified71.8%
Taylor expanded in x around 0 62.1%
*-commutative62.1%
times-frac81.0%
associate-*r/71.2%
+-commutative71.2%
associate-*r/81.0%
associate-*l/81.0%
*-commutative81.0%
fma-def81.0%
Simplified81.0%
*-commutative81.0%
clear-num81.0%
frac-times99.8%
*-un-lft-identity99.8%
fma-udef99.8%
*-commutative99.8%
associate-/r/90.0%
associate-+r+90.0%
+-commutative90.0%
+-commutative90.0%
associate-/r/99.8%
*-commutative99.8%
fma-def99.8%
Applied egg-rr99.8%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -5.0000000000000002e-271 or -0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 4.9999999999999997e304Initial program 99.2%
if -5.0000000000000002e-271 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -1.99999999999999982e-307Initial program 84.8%
*-commutative84.8%
associate-*l/99.7%
associate-+l+99.7%
associate-*r/84.4%
*-commutative84.4%
Simplified84.4%
Taylor expanded in b around 0 84.8%
*-commutative84.8%
associate-*l/99.7%
Applied egg-rr99.7%
if -1.99999999999999982e-307 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -0.0 or 4.9999999999999997e304 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) Initial program 31.9%
*-commutative31.9%
associate-*l/37.0%
associate-+l+37.0%
associate-*r/46.9%
*-commutative46.9%
Simplified46.9%
Taylor expanded in t around 0 79.0%
Final simplification93.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t)))))
(if (or (<= t_1 -2e-307) (and (not (<= t_1 0.0)) (<= t_1 5e+304)))
t_1
(/ z b))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
double tmp;
if ((t_1 <= -2e-307) || (!(t_1 <= 0.0) && (t_1 <= 5e+304))) {
tmp = t_1;
} else {
tmp = z / b;
}
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 + ((y * z) / t)) / ((a + 1.0d0) + ((y * b) / t))
if ((t_1 <= (-2d-307)) .or. (.not. (t_1 <= 0.0d0)) .and. (t_1 <= 5d+304)) then
tmp = t_1
else
tmp = z / b
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 + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
double tmp;
if ((t_1 <= -2e-307) || (!(t_1 <= 0.0) && (t_1 <= 5e+304))) {
tmp = t_1;
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t)) tmp = 0 if (t_1 <= -2e-307) or (not (t_1 <= 0.0) and (t_1 <= 5e+304)): tmp = t_1 else: tmp = z / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))) tmp = 0.0 if ((t_1 <= -2e-307) || (!(t_1 <= 0.0) && (t_1 <= 5e+304))) tmp = t_1; else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t)); tmp = 0.0; if ((t_1 <= -2e-307) || (~((t_1 <= 0.0)) && (t_1 <= 5e+304))) tmp = t_1; else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -2e-307], And[N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision], LessEqual[t$95$1, 5e+304]]], t$95$1, N[(z / b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\
\mathbf{if}\;t_1 \leq -2 \cdot 10^{-307} \lor \neg \left(t_1 \leq 0\right) \land t_1 \leq 5 \cdot 10^{+304}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -1.99999999999999982e-307 or -0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 4.9999999999999997e304Initial program 96.1%
if -1.99999999999999982e-307 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -0.0 or 4.9999999999999997e304 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) Initial program 31.9%
*-commutative31.9%
associate-*l/37.0%
associate-+l+37.0%
associate-*r/46.9%
*-commutative46.9%
Simplified46.9%
Taylor expanded in t around 0 79.0%
Final simplification91.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t)))))
(if (<= t_1 -2e-307)
(/ (+ x (/ y (/ t z))) (+ a (+ (* (* y b) (/ 1.0 t)) 1.0)))
(if (or (<= t_1 0.0) (not (<= t_1 5e+304))) (/ z b) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
double tmp;
if (t_1 <= -2e-307) {
tmp = (x + (y / (t / z))) / (a + (((y * b) * (1.0 / t)) + 1.0));
} else if ((t_1 <= 0.0) || !(t_1 <= 5e+304)) {
tmp = z / 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 + ((y * z) / t)) / ((a + 1.0d0) + ((y * b) / t))
if (t_1 <= (-2d-307)) then
tmp = (x + (y / (t / z))) / (a + (((y * b) * (1.0d0 / t)) + 1.0d0))
else if ((t_1 <= 0.0d0) .or. (.not. (t_1 <= 5d+304))) then
tmp = z / 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 + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
double tmp;
if (t_1 <= -2e-307) {
tmp = (x + (y / (t / z))) / (a + (((y * b) * (1.0 / t)) + 1.0));
} else if ((t_1 <= 0.0) || !(t_1 <= 5e+304)) {
tmp = z / b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t)) tmp = 0 if t_1 <= -2e-307: tmp = (x + (y / (t / z))) / (a + (((y * b) * (1.0 / t)) + 1.0)) elif (t_1 <= 0.0) or not (t_1 <= 5e+304): tmp = z / b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))) tmp = 0.0 if (t_1 <= -2e-307) tmp = Float64(Float64(x + Float64(y / Float64(t / z))) / Float64(a + Float64(Float64(Float64(y * b) * Float64(1.0 / t)) + 1.0))); elseif ((t_1 <= 0.0) || !(t_1 <= 5e+304)) tmp = Float64(z / b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t)); tmp = 0.0; if (t_1 <= -2e-307) tmp = (x + (y / (t / z))) / (a + (((y * b) * (1.0 / t)) + 1.0)); elseif ((t_1 <= 0.0) || ~((t_1 <= 5e+304))) tmp = z / b; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e-307], N[(N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + N[(N[(N[(y * b), $MachinePrecision] * N[(1.0 / t), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t$95$1, 0.0], N[Not[LessEqual[t$95$1, 5e+304]], $MachinePrecision]], N[(z / b), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\
\mathbf{if}\;t_1 \leq -2 \cdot 10^{-307}:\\
\;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{a + \left(\left(y \cdot b\right) \cdot \frac{1}{t} + 1\right)}\\
\mathbf{elif}\;t_1 \leq 0 \lor \neg \left(t_1 \leq 5 \cdot 10^{+304}\right):\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -1.99999999999999982e-307Initial program 93.3%
associate-/l*94.8%
associate-*l/91.3%
*-commutative91.3%
cancel-sign-sub91.3%
*-commutative91.3%
associate-*l/94.8%
associate-+r-94.8%
associate-*l/91.3%
*-commutative91.3%
cancel-sign-sub91.3%
*-commutative91.3%
associate-*l/94.8%
*-commutative94.8%
associate-/l*90.6%
Simplified90.6%
associate-/r/90.4%
associate-*l/94.8%
*-commutative94.8%
div-inv94.8%
Applied egg-rr94.8%
if -1.99999999999999982e-307 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -0.0 or 4.9999999999999997e304 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) Initial program 31.9%
*-commutative31.9%
associate-*l/37.0%
associate-+l+37.0%
associate-*r/46.9%
*-commutative46.9%
Simplified46.9%
Taylor expanded in t around 0 79.0%
if -0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 4.9999999999999997e304Initial program 98.8%
Final simplification91.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (+ (/ (* y b) t) 1.0))) (t_2 (* (/ y t) (/ z (+ a 1.0)))))
(if (<= y -31000.0)
(/ z b)
(if (<= y -3.7e-20)
t_1
(if (<= y -3.6e-82)
t_2
(if (<= y -7.7e-144)
t_1
(if (<= y 2.75e-38)
(/ x (+ a 1.0))
(if (<= y 880.0) t_2 (if (<= y 5.8e+148) t_1 (/ z b))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (((y * b) / t) + 1.0);
double t_2 = (y / t) * (z / (a + 1.0));
double tmp;
if (y <= -31000.0) {
tmp = z / b;
} else if (y <= -3.7e-20) {
tmp = t_1;
} else if (y <= -3.6e-82) {
tmp = t_2;
} else if (y <= -7.7e-144) {
tmp = t_1;
} else if (y <= 2.75e-38) {
tmp = x / (a + 1.0);
} else if (y <= 880.0) {
tmp = t_2;
} else if (y <= 5.8e+148) {
tmp = t_1;
} else {
tmp = z / b;
}
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) :: t_2
real(8) :: tmp
t_1 = x / (((y * b) / t) + 1.0d0)
t_2 = (y / t) * (z / (a + 1.0d0))
if (y <= (-31000.0d0)) then
tmp = z / b
else if (y <= (-3.7d-20)) then
tmp = t_1
else if (y <= (-3.6d-82)) then
tmp = t_2
else if (y <= (-7.7d-144)) then
tmp = t_1
else if (y <= 2.75d-38) then
tmp = x / (a + 1.0d0)
else if (y <= 880.0d0) then
tmp = t_2
else if (y <= 5.8d+148) then
tmp = t_1
else
tmp = z / b
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 / (((y * b) / t) + 1.0);
double t_2 = (y / t) * (z / (a + 1.0));
double tmp;
if (y <= -31000.0) {
tmp = z / b;
} else if (y <= -3.7e-20) {
tmp = t_1;
} else if (y <= -3.6e-82) {
tmp = t_2;
} else if (y <= -7.7e-144) {
tmp = t_1;
} else if (y <= 2.75e-38) {
tmp = x / (a + 1.0);
} else if (y <= 880.0) {
tmp = t_2;
} else if (y <= 5.8e+148) {
tmp = t_1;
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (((y * b) / t) + 1.0) t_2 = (y / t) * (z / (a + 1.0)) tmp = 0 if y <= -31000.0: tmp = z / b elif y <= -3.7e-20: tmp = t_1 elif y <= -3.6e-82: tmp = t_2 elif y <= -7.7e-144: tmp = t_1 elif y <= 2.75e-38: tmp = x / (a + 1.0) elif y <= 880.0: tmp = t_2 elif y <= 5.8e+148: tmp = t_1 else: tmp = z / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(Float64(Float64(y * b) / t) + 1.0)) t_2 = Float64(Float64(y / t) * Float64(z / Float64(a + 1.0))) tmp = 0.0 if (y <= -31000.0) tmp = Float64(z / b); elseif (y <= -3.7e-20) tmp = t_1; elseif (y <= -3.6e-82) tmp = t_2; elseif (y <= -7.7e-144) tmp = t_1; elseif (y <= 2.75e-38) tmp = Float64(x / Float64(a + 1.0)); elseif (y <= 880.0) tmp = t_2; elseif (y <= 5.8e+148) tmp = t_1; else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (((y * b) / t) + 1.0); t_2 = (y / t) * (z / (a + 1.0)); tmp = 0.0; if (y <= -31000.0) tmp = z / b; elseif (y <= -3.7e-20) tmp = t_1; elseif (y <= -3.6e-82) tmp = t_2; elseif (y <= -7.7e-144) tmp = t_1; elseif (y <= 2.75e-38) tmp = x / (a + 1.0); elseif (y <= 880.0) tmp = t_2; elseif (y <= 5.8e+148) tmp = t_1; else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y / t), $MachinePrecision] * N[(z / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -31000.0], N[(z / b), $MachinePrecision], If[LessEqual[y, -3.7e-20], t$95$1, If[LessEqual[y, -3.6e-82], t$95$2, If[LessEqual[y, -7.7e-144], t$95$1, If[LessEqual[y, 2.75e-38], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 880.0], t$95$2, If[LessEqual[y, 5.8e+148], t$95$1, N[(z / b), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{\frac{y \cdot b}{t} + 1}\\
t_2 := \frac{y}{t} \cdot \frac{z}{a + 1}\\
\mathbf{if}\;y \leq -31000:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;y \leq -3.7 \cdot 10^{-20}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -3.6 \cdot 10^{-82}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -7.7 \cdot 10^{-144}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 2.75 \cdot 10^{-38}:\\
\;\;\;\;\frac{x}{a + 1}\\
\mathbf{elif}\;y \leq 880:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 5.8 \cdot 10^{+148}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if y < -31000 or 5.7999999999999999e148 < y Initial program 46.3%
*-commutative46.3%
associate-*l/52.6%
associate-+l+52.6%
associate-*r/59.8%
*-commutative59.8%
Simplified59.8%
Taylor expanded in t around 0 65.6%
if -31000 < y < -3.7000000000000001e-20 or -3.59999999999999998e-82 < y < -7.70000000000000007e-144 or 880 < y < 5.7999999999999999e148Initial program 91.5%
*-commutative91.5%
associate-*l/89.4%
associate-+l+89.4%
associate-*r/91.4%
*-commutative91.4%
Simplified91.4%
Taylor expanded in x around inf 67.9%
Taylor expanded in a around 0 60.1%
if -3.7000000000000001e-20 < y < -3.59999999999999998e-82 or 2.75000000000000003e-38 < y < 880Initial program 90.8%
*-commutative90.8%
associate-*l/90.8%
associate-+l+90.8%
associate-*r/86.5%
*-commutative86.5%
Simplified86.5%
Taylor expanded in x around 0 72.3%
*-commutative72.3%
times-frac65.8%
associate-*r/65.7%
+-commutative65.7%
associate-*r/65.8%
associate-*l/63.7%
*-commutative63.7%
fma-def63.7%
Simplified63.7%
Taylor expanded in t around inf 52.1%
times-frac52.3%
Simplified52.3%
if -7.70000000000000007e-144 < y < 2.75000000000000003e-38Initial program 95.8%
*-commutative95.8%
associate-*l/89.7%
associate-+l+89.7%
associate-*r/84.6%
*-commutative84.6%
Simplified84.6%
Taylor expanded in t around inf 73.1%
Final simplification66.2%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -8e+238)
(* (/ z t) (/ y (+ (+ a (* y (/ b t))) 1.0)))
(if (or (<= y -2.9e+107) (not (<= y 5.2e+121)))
(/ z b)
(/ (+ x (* z (/ y t))) (+ a (+ (/ b (/ t y)) 1.0))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -8e+238) {
tmp = (z / t) * (y / ((a + (y * (b / t))) + 1.0));
} else if ((y <= -2.9e+107) || !(y <= 5.2e+121)) {
tmp = z / b;
} else {
tmp = (x + (z * (y / t))) / (a + ((b / (t / y)) + 1.0));
}
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 (y <= (-8d+238)) then
tmp = (z / t) * (y / ((a + (y * (b / t))) + 1.0d0))
else if ((y <= (-2.9d+107)) .or. (.not. (y <= 5.2d+121))) then
tmp = z / b
else
tmp = (x + (z * (y / t))) / (a + ((b / (t / y)) + 1.0d0))
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 (y <= -8e+238) {
tmp = (z / t) * (y / ((a + (y * (b / t))) + 1.0));
} else if ((y <= -2.9e+107) || !(y <= 5.2e+121)) {
tmp = z / b;
} else {
tmp = (x + (z * (y / t))) / (a + ((b / (t / y)) + 1.0));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -8e+238: tmp = (z / t) * (y / ((a + (y * (b / t))) + 1.0)) elif (y <= -2.9e+107) or not (y <= 5.2e+121): tmp = z / b else: tmp = (x + (z * (y / t))) / (a + ((b / (t / y)) + 1.0)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -8e+238) tmp = Float64(Float64(z / t) * Float64(y / Float64(Float64(a + Float64(y * Float64(b / t))) + 1.0))); elseif ((y <= -2.9e+107) || !(y <= 5.2e+121)) tmp = Float64(z / b); else tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(a + Float64(Float64(b / Float64(t / y)) + 1.0))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -8e+238) tmp = (z / t) * (y / ((a + (y * (b / t))) + 1.0)); elseif ((y <= -2.9e+107) || ~((y <= 5.2e+121))) tmp = z / b; else tmp = (x + (z * (y / t))) / (a + ((b / (t / y)) + 1.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -8e+238], N[(N[(z / t), $MachinePrecision] * N[(y / N[(N[(a + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -2.9e+107], N[Not[LessEqual[y, 5.2e+121]], $MachinePrecision]], N[(z / b), $MachinePrecision], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + N[(N[(b / N[(t / y), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8 \cdot 10^{+238}:\\
\;\;\;\;\frac{z}{t} \cdot \frac{y}{\left(a + y \cdot \frac{b}{t}\right) + 1}\\
\mathbf{elif}\;y \leq -2.9 \cdot 10^{+107} \lor \neg \left(y \leq 5.2 \cdot 10^{+121}\right):\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + \left(\frac{b}{\frac{t}{y}} + 1\right)}\\
\end{array}
\end{array}
if y < -8.0000000000000004e238Initial program 65.9%
*-commutative65.9%
associate-*l/82.1%
associate-+l+82.1%
associate-*r/82.1%
*-commutative82.1%
Simplified82.1%
Taylor expanded in x around 0 56.7%
*-commutative56.7%
times-frac81.8%
associate-*r/46.4%
+-commutative46.4%
associate-*r/81.8%
associate-*l/81.8%
*-commutative81.8%
fma-def81.8%
Simplified81.8%
fma-udef81.8%
Applied egg-rr81.8%
if -8.0000000000000004e238 < y < -2.89999999999999988e107 or 5.1999999999999998e121 < y Initial program 40.3%
*-commutative40.3%
associate-*l/44.9%
associate-+l+44.9%
associate-*r/54.8%
*-commutative54.8%
Simplified54.8%
Taylor expanded in t around 0 77.3%
if -2.89999999999999988e107 < y < 5.1999999999999998e121Initial program 91.2%
associate-/l*88.1%
associate-*l/88.1%
*-commutative88.1%
cancel-sign-sub88.1%
*-commutative88.1%
associate-*l/88.1%
associate-+r-88.1%
associate-*l/88.1%
*-commutative88.1%
cancel-sign-sub88.1%
*-commutative88.1%
associate-*l/88.1%
*-commutative88.1%
associate-/l*87.7%
Simplified87.7%
associate-/r/91.3%
Applied egg-rr91.3%
Final simplification87.2%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -8e+238)
(/ (+ x (* y (/ z t))) (+ a (+ (* y (/ b t)) 1.0)))
(if (or (<= y -2.3e+108) (not (<= y 9e+120)))
(/ z b)
(/ (+ x (* z (/ y t))) (+ a (+ (/ b (/ t y)) 1.0))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -8e+238) {
tmp = (x + (y * (z / t))) / (a + ((y * (b / t)) + 1.0));
} else if ((y <= -2.3e+108) || !(y <= 9e+120)) {
tmp = z / b;
} else {
tmp = (x + (z * (y / t))) / (a + ((b / (t / y)) + 1.0));
}
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 (y <= (-8d+238)) then
tmp = (x + (y * (z / t))) / (a + ((y * (b / t)) + 1.0d0))
else if ((y <= (-2.3d+108)) .or. (.not. (y <= 9d+120))) then
tmp = z / b
else
tmp = (x + (z * (y / t))) / (a + ((b / (t / y)) + 1.0d0))
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 (y <= -8e+238) {
tmp = (x + (y * (z / t))) / (a + ((y * (b / t)) + 1.0));
} else if ((y <= -2.3e+108) || !(y <= 9e+120)) {
tmp = z / b;
} else {
tmp = (x + (z * (y / t))) / (a + ((b / (t / y)) + 1.0));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -8e+238: tmp = (x + (y * (z / t))) / (a + ((y * (b / t)) + 1.0)) elif (y <= -2.3e+108) or not (y <= 9e+120): tmp = z / b else: tmp = (x + (z * (y / t))) / (a + ((b / (t / y)) + 1.0)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -8e+238) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(a + Float64(Float64(y * Float64(b / t)) + 1.0))); elseif ((y <= -2.3e+108) || !(y <= 9e+120)) tmp = Float64(z / b); else tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(a + Float64(Float64(b / Float64(t / y)) + 1.0))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -8e+238) tmp = (x + (y * (z / t))) / (a + ((y * (b / t)) + 1.0)); elseif ((y <= -2.3e+108) || ~((y <= 9e+120))) tmp = z / b; else tmp = (x + (z * (y / t))) / (a + ((b / (t / y)) + 1.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -8e+238], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + N[(N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -2.3e+108], N[Not[LessEqual[y, 9e+120]], $MachinePrecision]], N[(z / b), $MachinePrecision], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + N[(N[(b / N[(t / y), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8 \cdot 10^{+238}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + \left(y \cdot \frac{b}{t} + 1\right)}\\
\mathbf{elif}\;y \leq -2.3 \cdot 10^{+108} \lor \neg \left(y \leq 9 \cdot 10^{+120}\right):\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + \left(\frac{b}{\frac{t}{y}} + 1\right)}\\
\end{array}
\end{array}
if y < -8.0000000000000004e238Initial program 65.9%
*-commutative65.9%
associate-*l/82.1%
associate-+l+82.1%
associate-*r/82.1%
*-commutative82.1%
Simplified82.1%
if -8.0000000000000004e238 < y < -2.2999999999999999e108 or 8.99999999999999953e120 < y Initial program 40.3%
*-commutative40.3%
associate-*l/44.9%
associate-+l+44.9%
associate-*r/54.8%
*-commutative54.8%
Simplified54.8%
Taylor expanded in t around 0 77.3%
if -2.2999999999999999e108 < y < 8.99999999999999953e120Initial program 91.2%
associate-/l*88.1%
associate-*l/88.1%
*-commutative88.1%
cancel-sign-sub88.1%
*-commutative88.1%
associate-*l/88.1%
associate-+r-88.1%
associate-*l/88.1%
*-commutative88.1%
cancel-sign-sub88.1%
*-commutative88.1%
associate-*l/88.1%
*-commutative88.1%
associate-/l*87.7%
Simplified87.7%
associate-/r/91.3%
Applied egg-rr91.3%
Final simplification87.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (/ (* y z) t)) (+ a 1.0))))
(if (<= y -7.8e+238)
(* (/ z t) (/ y (+ (+ a (* y (/ b t))) 1.0)))
(if (<= y -9.2e+78)
(/ z b)
(if (<= y 6.2e-241)
t_1
(if (<= y 6.2e-33)
(/ x (+ (+ a (/ (* y b) t)) 1.0))
(if (<= y 6.5e+76) t_1 (/ z b))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + ((y * z) / t)) / (a + 1.0);
double tmp;
if (y <= -7.8e+238) {
tmp = (z / t) * (y / ((a + (y * (b / t))) + 1.0));
} else if (y <= -9.2e+78) {
tmp = z / b;
} else if (y <= 6.2e-241) {
tmp = t_1;
} else if (y <= 6.2e-33) {
tmp = x / ((a + ((y * b) / t)) + 1.0);
} else if (y <= 6.5e+76) {
tmp = t_1;
} else {
tmp = z / b;
}
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 + ((y * z) / t)) / (a + 1.0d0)
if (y <= (-7.8d+238)) then
tmp = (z / t) * (y / ((a + (y * (b / t))) + 1.0d0))
else if (y <= (-9.2d+78)) then
tmp = z / b
else if (y <= 6.2d-241) then
tmp = t_1
else if (y <= 6.2d-33) then
tmp = x / ((a + ((y * b) / t)) + 1.0d0)
else if (y <= 6.5d+76) then
tmp = t_1
else
tmp = z / b
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 + ((y * z) / t)) / (a + 1.0);
double tmp;
if (y <= -7.8e+238) {
tmp = (z / t) * (y / ((a + (y * (b / t))) + 1.0));
} else if (y <= -9.2e+78) {
tmp = z / b;
} else if (y <= 6.2e-241) {
tmp = t_1;
} else if (y <= 6.2e-33) {
tmp = x / ((a + ((y * b) / t)) + 1.0);
} else if (y <= 6.5e+76) {
tmp = t_1;
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + ((y * z) / t)) / (a + 1.0) tmp = 0 if y <= -7.8e+238: tmp = (z / t) * (y / ((a + (y * (b / t))) + 1.0)) elif y <= -9.2e+78: tmp = z / b elif y <= 6.2e-241: tmp = t_1 elif y <= 6.2e-33: tmp = x / ((a + ((y * b) / t)) + 1.0) elif y <= 6.5e+76: tmp = t_1 else: tmp = z / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(a + 1.0)) tmp = 0.0 if (y <= -7.8e+238) tmp = Float64(Float64(z / t) * Float64(y / Float64(Float64(a + Float64(y * Float64(b / t))) + 1.0))); elseif (y <= -9.2e+78) tmp = Float64(z / b); elseif (y <= 6.2e-241) tmp = t_1; elseif (y <= 6.2e-33) tmp = Float64(x / Float64(Float64(a + Float64(Float64(y * b) / t)) + 1.0)); elseif (y <= 6.5e+76) tmp = t_1; else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x + ((y * z) / t)) / (a + 1.0); tmp = 0.0; if (y <= -7.8e+238) tmp = (z / t) * (y / ((a + (y * (b / t))) + 1.0)); elseif (y <= -9.2e+78) tmp = z / b; elseif (y <= 6.2e-241) tmp = t_1; elseif (y <= 6.2e-33) tmp = x / ((a + ((y * b) / t)) + 1.0); elseif (y <= 6.5e+76) tmp = t_1; else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -7.8e+238], N[(N[(z / t), $MachinePrecision] * N[(y / N[(N[(a + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -9.2e+78], N[(z / b), $MachinePrecision], If[LessEqual[y, 6.2e-241], t$95$1, If[LessEqual[y, 6.2e-33], N[(x / N[(N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.5e+76], t$95$1, N[(z / b), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + \frac{y \cdot z}{t}}{a + 1}\\
\mathbf{if}\;y \leq -7.8 \cdot 10^{+238}:\\
\;\;\;\;\frac{z}{t} \cdot \frac{y}{\left(a + y \cdot \frac{b}{t}\right) + 1}\\
\mathbf{elif}\;y \leq -9.2 \cdot 10^{+78}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;y \leq 6.2 \cdot 10^{-241}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 6.2 \cdot 10^{-33}:\\
\;\;\;\;\frac{x}{\left(a + \frac{y \cdot b}{t}\right) + 1}\\
\mathbf{elif}\;y \leq 6.5 \cdot 10^{+76}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if y < -7.79999999999999986e238Initial program 65.9%
*-commutative65.9%
associate-*l/82.1%
associate-+l+82.1%
associate-*r/82.1%
*-commutative82.1%
Simplified82.1%
Taylor expanded in x around 0 56.7%
*-commutative56.7%
times-frac81.8%
associate-*r/46.4%
+-commutative46.4%
associate-*r/81.8%
associate-*l/81.8%
*-commutative81.8%
fma-def81.8%
Simplified81.8%
fma-udef81.8%
Applied egg-rr81.8%
if -7.79999999999999986e238 < y < -9.2000000000000008e78 or 6.5000000000000005e76 < y Initial program 42.3%
*-commutative42.3%
associate-*l/47.7%
associate-+l+47.7%
associate-*r/57.7%
*-commutative57.7%
Simplified57.7%
Taylor expanded in t around 0 72.3%
if -9.2000000000000008e78 < y < 6.1999999999999998e-241 or 6.19999999999999994e-33 < y < 6.5000000000000005e76Initial program 92.6%
*-commutative92.6%
associate-*l/89.2%
associate-+l+89.2%
associate-*r/87.6%
*-commutative87.6%
Simplified87.6%
Taylor expanded in b around 0 76.0%
if 6.1999999999999998e-241 < y < 6.19999999999999994e-33Initial program 94.0%
*-commutative94.0%
associate-*l/88.4%
associate-+l+88.4%
associate-*r/80.7%
*-commutative80.7%
Simplified80.7%
Taylor expanded in x around inf 74.7%
Final simplification74.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (+ (+ a (* b (/ y t))) 1.0))))
(if (<= y -1.5e+102)
(/ z b)
(if (<= y 1.4e-32)
t_1
(if (<= y 0.0025)
(* (/ y t) (/ z (+ a 1.0)))
(if (<= y 4.5e+115) t_1 (/ z b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / ((a + (b * (y / t))) + 1.0);
double tmp;
if (y <= -1.5e+102) {
tmp = z / b;
} else if (y <= 1.4e-32) {
tmp = t_1;
} else if (y <= 0.0025) {
tmp = (y / t) * (z / (a + 1.0));
} else if (y <= 4.5e+115) {
tmp = t_1;
} else {
tmp = z / b;
}
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 / ((a + (b * (y / t))) + 1.0d0)
if (y <= (-1.5d+102)) then
tmp = z / b
else if (y <= 1.4d-32) then
tmp = t_1
else if (y <= 0.0025d0) then
tmp = (y / t) * (z / (a + 1.0d0))
else if (y <= 4.5d+115) then
tmp = t_1
else
tmp = z / b
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 / ((a + (b * (y / t))) + 1.0);
double tmp;
if (y <= -1.5e+102) {
tmp = z / b;
} else if (y <= 1.4e-32) {
tmp = t_1;
} else if (y <= 0.0025) {
tmp = (y / t) * (z / (a + 1.0));
} else if (y <= 4.5e+115) {
tmp = t_1;
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / ((a + (b * (y / t))) + 1.0) tmp = 0 if y <= -1.5e+102: tmp = z / b elif y <= 1.4e-32: tmp = t_1 elif y <= 0.0025: tmp = (y / t) * (z / (a + 1.0)) elif y <= 4.5e+115: tmp = t_1 else: tmp = z / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(Float64(a + Float64(b * Float64(y / t))) + 1.0)) tmp = 0.0 if (y <= -1.5e+102) tmp = Float64(z / b); elseif (y <= 1.4e-32) tmp = t_1; elseif (y <= 0.0025) tmp = Float64(Float64(y / t) * Float64(z / Float64(a + 1.0))); elseif (y <= 4.5e+115) tmp = t_1; else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / ((a + (b * (y / t))) + 1.0); tmp = 0.0; if (y <= -1.5e+102) tmp = z / b; elseif (y <= 1.4e-32) tmp = t_1; elseif (y <= 0.0025) tmp = (y / t) * (z / (a + 1.0)); elseif (y <= 4.5e+115) tmp = t_1; else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(N[(a + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.5e+102], N[(z / b), $MachinePrecision], If[LessEqual[y, 1.4e-32], t$95$1, If[LessEqual[y, 0.0025], N[(N[(y / t), $MachinePrecision] * N[(z / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.5e+115], t$95$1, N[(z / b), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{\left(a + b \cdot \frac{y}{t}\right) + 1}\\
\mathbf{if}\;y \leq -1.5 \cdot 10^{+102}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;y \leq 1.4 \cdot 10^{-32}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 0.0025:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{a + 1}\\
\mathbf{elif}\;y \leq 4.5 \cdot 10^{+115}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if y < -1.4999999999999999e102 or 4.49999999999999963e115 < y Initial program 43.9%
*-commutative43.9%
associate-*l/50.1%
associate-+l+50.1%
associate-*r/58.6%
*-commutative58.6%
Simplified58.6%
Taylor expanded in t around 0 71.9%
if -1.4999999999999999e102 < y < 1.3999999999999999e-32 or 0.00250000000000000005 < y < 4.49999999999999963e115Initial program 90.8%
*-commutative90.8%
associate-*l/87.3%
associate-+l+87.3%
associate-*r/84.4%
*-commutative84.4%
Simplified84.4%
Taylor expanded in x around inf 69.4%
associate-*r/70.0%
Simplified70.0%
if 1.3999999999999999e-32 < y < 0.00250000000000000005Initial program 99.5%
*-commutative99.5%
associate-*l/99.8%
associate-+l+99.8%
associate-*r/99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in x around 0 81.6%
*-commutative81.6%
times-frac81.6%
associate-*r/81.4%
+-commutative81.4%
associate-*r/81.6%
associate-*l/81.6%
*-commutative81.6%
fma-def81.6%
Simplified81.6%
Taylor expanded in t around inf 71.2%
times-frac71.4%
Simplified71.4%
Final simplification70.6%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -2.3e+95)
(/ z b)
(if (<= y 1.85e-34)
(/ x (+ (+ a (/ (* y b) t)) 1.0))
(if (<= y 0.0025)
(* (/ y t) (/ z (+ a 1.0)))
(if (<= y 6.2e+118) (/ x (+ (+ a (* b (/ y t))) 1.0)) (/ z b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -2.3e+95) {
tmp = z / b;
} else if (y <= 1.85e-34) {
tmp = x / ((a + ((y * b) / t)) + 1.0);
} else if (y <= 0.0025) {
tmp = (y / t) * (z / (a + 1.0));
} else if (y <= 6.2e+118) {
tmp = x / ((a + (b * (y / t))) + 1.0);
} else {
tmp = z / b;
}
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 (y <= (-2.3d+95)) then
tmp = z / b
else if (y <= 1.85d-34) then
tmp = x / ((a + ((y * b) / t)) + 1.0d0)
else if (y <= 0.0025d0) then
tmp = (y / t) * (z / (a + 1.0d0))
else if (y <= 6.2d+118) then
tmp = x / ((a + (b * (y / t))) + 1.0d0)
else
tmp = z / b
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 (y <= -2.3e+95) {
tmp = z / b;
} else if (y <= 1.85e-34) {
tmp = x / ((a + ((y * b) / t)) + 1.0);
} else if (y <= 0.0025) {
tmp = (y / t) * (z / (a + 1.0));
} else if (y <= 6.2e+118) {
tmp = x / ((a + (b * (y / t))) + 1.0);
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -2.3e+95: tmp = z / b elif y <= 1.85e-34: tmp = x / ((a + ((y * b) / t)) + 1.0) elif y <= 0.0025: tmp = (y / t) * (z / (a + 1.0)) elif y <= 6.2e+118: tmp = x / ((a + (b * (y / t))) + 1.0) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -2.3e+95) tmp = Float64(z / b); elseif (y <= 1.85e-34) tmp = Float64(x / Float64(Float64(a + Float64(Float64(y * b) / t)) + 1.0)); elseif (y <= 0.0025) tmp = Float64(Float64(y / t) * Float64(z / Float64(a + 1.0))); elseif (y <= 6.2e+118) tmp = Float64(x / Float64(Float64(a + Float64(b * Float64(y / t))) + 1.0)); else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -2.3e+95) tmp = z / b; elseif (y <= 1.85e-34) tmp = x / ((a + ((y * b) / t)) + 1.0); elseif (y <= 0.0025) tmp = (y / t) * (z / (a + 1.0)); elseif (y <= 6.2e+118) tmp = x / ((a + (b * (y / t))) + 1.0); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -2.3e+95], N[(z / b), $MachinePrecision], If[LessEqual[y, 1.85e-34], N[(x / N[(N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 0.0025], N[(N[(y / t), $MachinePrecision] * N[(z / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.2e+118], N[(x / N[(N[(a + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.3 \cdot 10^{+95}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;y \leq 1.85 \cdot 10^{-34}:\\
\;\;\;\;\frac{x}{\left(a + \frac{y \cdot b}{t}\right) + 1}\\
\mathbf{elif}\;y \leq 0.0025:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{a + 1}\\
\mathbf{elif}\;y \leq 6.2 \cdot 10^{+118}:\\
\;\;\;\;\frac{x}{\left(a + b \cdot \frac{y}{t}\right) + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if y < -2.29999999999999997e95 or 6.19999999999999973e118 < y Initial program 43.9%
*-commutative43.9%
associate-*l/50.1%
associate-+l+50.1%
associate-*r/58.6%
*-commutative58.6%
Simplified58.6%
Taylor expanded in t around 0 71.9%
if -2.29999999999999997e95 < y < 1.84999999999999994e-34Initial program 91.7%
*-commutative91.7%
associate-*l/87.8%
associate-+l+87.8%
associate-*r/84.0%
*-commutative84.0%
Simplified84.0%
Taylor expanded in x around inf 71.4%
if 1.84999999999999994e-34 < y < 0.00250000000000000005Initial program 99.5%
*-commutative99.5%
associate-*l/99.8%
associate-+l+99.8%
associate-*r/99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in x around 0 81.6%
*-commutative81.6%
times-frac81.6%
associate-*r/81.4%
+-commutative81.4%
associate-*r/81.6%
associate-*l/81.6%
*-commutative81.6%
fma-def81.6%
Simplified81.6%
Taylor expanded in t around inf 71.2%
times-frac71.4%
Simplified71.4%
if 0.00250000000000000005 < y < 6.19999999999999973e118Initial program 82.9%
*-commutative82.9%
associate-*l/82.6%
associate-+l+82.6%
associate-*r/88.5%
*-commutative88.5%
Simplified88.5%
Taylor expanded in x around inf 51.6%
associate-*r/57.4%
Simplified57.4%
Final simplification70.6%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -2.45e+94)
(/ z b)
(if (<= y 1.85e-32)
(/ x (+ (+ a (/ (* y b) t)) 1.0))
(if (<= y 0.0025)
(* (/ y t) (/ z (+ a 1.0)))
(if (<= y 5.8e+148) (/ x (+ a (+ (* y (/ b t)) 1.0))) (/ z b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -2.45e+94) {
tmp = z / b;
} else if (y <= 1.85e-32) {
tmp = x / ((a + ((y * b) / t)) + 1.0);
} else if (y <= 0.0025) {
tmp = (y / t) * (z / (a + 1.0));
} else if (y <= 5.8e+148) {
tmp = x / (a + ((y * (b / t)) + 1.0));
} else {
tmp = z / b;
}
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 (y <= (-2.45d+94)) then
tmp = z / b
else if (y <= 1.85d-32) then
tmp = x / ((a + ((y * b) / t)) + 1.0d0)
else if (y <= 0.0025d0) then
tmp = (y / t) * (z / (a + 1.0d0))
else if (y <= 5.8d+148) then
tmp = x / (a + ((y * (b / t)) + 1.0d0))
else
tmp = z / b
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 (y <= -2.45e+94) {
tmp = z / b;
} else if (y <= 1.85e-32) {
tmp = x / ((a + ((y * b) / t)) + 1.0);
} else if (y <= 0.0025) {
tmp = (y / t) * (z / (a + 1.0));
} else if (y <= 5.8e+148) {
tmp = x / (a + ((y * (b / t)) + 1.0));
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -2.45e+94: tmp = z / b elif y <= 1.85e-32: tmp = x / ((a + ((y * b) / t)) + 1.0) elif y <= 0.0025: tmp = (y / t) * (z / (a + 1.0)) elif y <= 5.8e+148: tmp = x / (a + ((y * (b / t)) + 1.0)) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -2.45e+94) tmp = Float64(z / b); elseif (y <= 1.85e-32) tmp = Float64(x / Float64(Float64(a + Float64(Float64(y * b) / t)) + 1.0)); elseif (y <= 0.0025) tmp = Float64(Float64(y / t) * Float64(z / Float64(a + 1.0))); elseif (y <= 5.8e+148) tmp = Float64(x / Float64(a + Float64(Float64(y * Float64(b / t)) + 1.0))); else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -2.45e+94) tmp = z / b; elseif (y <= 1.85e-32) tmp = x / ((a + ((y * b) / t)) + 1.0); elseif (y <= 0.0025) tmp = (y / t) * (z / (a + 1.0)); elseif (y <= 5.8e+148) tmp = x / (a + ((y * (b / t)) + 1.0)); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -2.45e+94], N[(z / b), $MachinePrecision], If[LessEqual[y, 1.85e-32], N[(x / N[(N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 0.0025], N[(N[(y / t), $MachinePrecision] * N[(z / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.8e+148], N[(x / N[(a + N[(N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.45 \cdot 10^{+94}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;y \leq 1.85 \cdot 10^{-32}:\\
\;\;\;\;\frac{x}{\left(a + \frac{y \cdot b}{t}\right) + 1}\\
\mathbf{elif}\;y \leq 0.0025:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{a + 1}\\
\mathbf{elif}\;y \leq 5.8 \cdot 10^{+148}:\\
\;\;\;\;\frac{x}{a + \left(y \cdot \frac{b}{t} + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if y < -2.4499999999999999e94 or 5.7999999999999999e148 < y Initial program 40.6%
*-commutative40.6%
associate-*l/47.4%
associate-+l+47.4%
associate-*r/56.6%
*-commutative56.6%
Simplified56.6%
Taylor expanded in t around 0 72.2%
if -2.4499999999999999e94 < y < 1.85e-32Initial program 91.7%
*-commutative91.7%
associate-*l/87.8%
associate-+l+87.8%
associate-*r/84.0%
*-commutative84.0%
Simplified84.0%
Taylor expanded in x around inf 71.4%
if 1.85e-32 < y < 0.00250000000000000005Initial program 99.5%
*-commutative99.5%
associate-*l/99.8%
associate-+l+99.8%
associate-*r/99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in x around 0 81.6%
*-commutative81.6%
times-frac81.6%
associate-*r/81.4%
+-commutative81.4%
associate-*r/81.6%
associate-*l/81.6%
*-commutative81.6%
fma-def81.6%
Simplified81.6%
Taylor expanded in t around inf 71.2%
times-frac71.4%
Simplified71.4%
if 0.00250000000000000005 < y < 5.7999999999999999e148Initial program 82.9%
*-commutative82.9%
associate-*l/82.7%
associate-+l+82.7%
associate-*r/87.1%
*-commutative87.1%
Simplified87.1%
Taylor expanded in x around inf 62.1%
Final simplification70.8%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -82000.0)
(/ z b)
(if (<= y 2.45e-38)
(/ x (+ a 1.0))
(if (<= y 8.5e+17)
(* (/ y t) (/ z (+ a 1.0)))
(if (<= y 3.1e+76) (+ x (/ (* y z) t)) (/ z b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -82000.0) {
tmp = z / b;
} else if (y <= 2.45e-38) {
tmp = x / (a + 1.0);
} else if (y <= 8.5e+17) {
tmp = (y / t) * (z / (a + 1.0));
} else if (y <= 3.1e+76) {
tmp = x + ((y * z) / t);
} else {
tmp = z / b;
}
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 (y <= (-82000.0d0)) then
tmp = z / b
else if (y <= 2.45d-38) then
tmp = x / (a + 1.0d0)
else if (y <= 8.5d+17) then
tmp = (y / t) * (z / (a + 1.0d0))
else if (y <= 3.1d+76) then
tmp = x + ((y * z) / t)
else
tmp = z / b
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 (y <= -82000.0) {
tmp = z / b;
} else if (y <= 2.45e-38) {
tmp = x / (a + 1.0);
} else if (y <= 8.5e+17) {
tmp = (y / t) * (z / (a + 1.0));
} else if (y <= 3.1e+76) {
tmp = x + ((y * z) / t);
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -82000.0: tmp = z / b elif y <= 2.45e-38: tmp = x / (a + 1.0) elif y <= 8.5e+17: tmp = (y / t) * (z / (a + 1.0)) elif y <= 3.1e+76: tmp = x + ((y * z) / t) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -82000.0) tmp = Float64(z / b); elseif (y <= 2.45e-38) tmp = Float64(x / Float64(a + 1.0)); elseif (y <= 8.5e+17) tmp = Float64(Float64(y / t) * Float64(z / Float64(a + 1.0))); elseif (y <= 3.1e+76) tmp = Float64(x + Float64(Float64(y * z) / t)); else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -82000.0) tmp = z / b; elseif (y <= 2.45e-38) tmp = x / (a + 1.0); elseif (y <= 8.5e+17) tmp = (y / t) * (z / (a + 1.0)); elseif (y <= 3.1e+76) tmp = x + ((y * z) / t); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -82000.0], N[(z / b), $MachinePrecision], If[LessEqual[y, 2.45e-38], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8.5e+17], N[(N[(y / t), $MachinePrecision] * N[(z / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.1e+76], N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -82000:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;y \leq 2.45 \cdot 10^{-38}:\\
\;\;\;\;\frac{x}{a + 1}\\
\mathbf{elif}\;y \leq 8.5 \cdot 10^{+17}:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{a + 1}\\
\mathbf{elif}\;y \leq 3.1 \cdot 10^{+76}:\\
\;\;\;\;x + \frac{y \cdot z}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if y < -82000 or 3.10000000000000011e76 < y Initial program 49.6%
*-commutative49.6%
associate-*l/55.3%
associate-+l+55.3%
associate-*r/62.6%
*-commutative62.6%
Simplified62.6%
Taylor expanded in t around 0 64.0%
if -82000 < y < 2.45000000000000019e-38Initial program 95.4%
*-commutative95.4%
associate-*l/90.2%
associate-+l+90.2%
associate-*r/85.7%
*-commutative85.7%
Simplified85.7%
Taylor expanded in t around inf 65.2%
if 2.45000000000000019e-38 < y < 8.5e17Initial program 99.6%
*-commutative99.6%
associate-*l/99.9%
associate-+l+99.9%
associate-*r/99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in x around 0 72.8%
*-commutative72.8%
times-frac72.8%
associate-*r/72.6%
+-commutative72.6%
associate-*r/72.8%
associate-*l/72.8%
*-commutative72.8%
fma-def72.8%
Simplified72.8%
Taylor expanded in t around inf 58.3%
times-frac58.4%
Simplified58.4%
if 8.5e17 < y < 3.10000000000000011e76Initial program 89.1%
*-commutative89.1%
associate-*l/88.6%
associate-+l+88.6%
associate-*r/88.8%
*-commutative88.8%
Simplified88.8%
Taylor expanded in b around 0 67.5%
Taylor expanded in a around 0 53.9%
Final simplification64.0%
(FPCore (x y z t a b) :precision binary64 (if (<= b -9.2e+107) (/ x (+ (+ a (* b (/ y t))) 1.0)) (if (<= b 1.9e+24) (/ (+ x (* y (/ z t))) (+ a 1.0)) (/ z b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -9.2e+107) {
tmp = x / ((a + (b * (y / t))) + 1.0);
} else if (b <= 1.9e+24) {
tmp = (x + (y * (z / t))) / (a + 1.0);
} else {
tmp = z / b;
}
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 (b <= (-9.2d+107)) then
tmp = x / ((a + (b * (y / t))) + 1.0d0)
else if (b <= 1.9d+24) then
tmp = (x + (y * (z / t))) / (a + 1.0d0)
else
tmp = z / b
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 (b <= -9.2e+107) {
tmp = x / ((a + (b * (y / t))) + 1.0);
} else if (b <= 1.9e+24) {
tmp = (x + (y * (z / t))) / (a + 1.0);
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -9.2e+107: tmp = x / ((a + (b * (y / t))) + 1.0) elif b <= 1.9e+24: tmp = (x + (y * (z / t))) / (a + 1.0) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -9.2e+107) tmp = Float64(x / Float64(Float64(a + Float64(b * Float64(y / t))) + 1.0)); elseif (b <= 1.9e+24) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(a + 1.0)); else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -9.2e+107) tmp = x / ((a + (b * (y / t))) + 1.0); elseif (b <= 1.9e+24) tmp = (x + (y * (z / t))) / (a + 1.0); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -9.2e+107], N[(x / N[(N[(a + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.9e+24], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -9.2 \cdot 10^{+107}:\\
\;\;\;\;\frac{x}{\left(a + b \cdot \frac{y}{t}\right) + 1}\\
\mathbf{elif}\;b \leq 1.9 \cdot 10^{+24}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if b < -9.2000000000000001e107Initial program 80.6%
*-commutative80.6%
associate-*l/80.7%
associate-+l+80.7%
associate-*r/78.6%
*-commutative78.6%
Simplified78.6%
Taylor expanded in x around inf 70.0%
associate-*r/70.1%
Simplified70.1%
if -9.2000000000000001e107 < b < 1.90000000000000008e24Initial program 83.4%
*-commutative83.4%
associate-*l/84.6%
associate-+l+84.6%
associate-*r/83.9%
*-commutative83.9%
Simplified83.9%
Taylor expanded in b around 0 74.3%
*-commutative74.3%
associate-*l/74.7%
Applied egg-rr74.7%
if 1.90000000000000008e24 < b Initial program 59.4%
*-commutative59.4%
associate-*l/55.2%
associate-+l+55.2%
associate-*r/60.9%
*-commutative60.9%
Simplified60.9%
Taylor expanded in t around 0 60.2%
Final simplification70.2%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -390000.0)
(/ z b)
(if (<= y 8.2e-22)
(/ x (+ a 1.0))
(if (<= y 2.85e+76)
(+ x (/ (* y z) t))
(if (<= y 3.1e+76) (/ x a) (/ z b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -390000.0) {
tmp = z / b;
} else if (y <= 8.2e-22) {
tmp = x / (a + 1.0);
} else if (y <= 2.85e+76) {
tmp = x + ((y * z) / t);
} else if (y <= 3.1e+76) {
tmp = x / a;
} else {
tmp = z / b;
}
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 (y <= (-390000.0d0)) then
tmp = z / b
else if (y <= 8.2d-22) then
tmp = x / (a + 1.0d0)
else if (y <= 2.85d+76) then
tmp = x + ((y * z) / t)
else if (y <= 3.1d+76) then
tmp = x / a
else
tmp = z / b
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 (y <= -390000.0) {
tmp = z / b;
} else if (y <= 8.2e-22) {
tmp = x / (a + 1.0);
} else if (y <= 2.85e+76) {
tmp = x + ((y * z) / t);
} else if (y <= 3.1e+76) {
tmp = x / a;
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -390000.0: tmp = z / b elif y <= 8.2e-22: tmp = x / (a + 1.0) elif y <= 2.85e+76: tmp = x + ((y * z) / t) elif y <= 3.1e+76: tmp = x / a else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -390000.0) tmp = Float64(z / b); elseif (y <= 8.2e-22) tmp = Float64(x / Float64(a + 1.0)); elseif (y <= 2.85e+76) tmp = Float64(x + Float64(Float64(y * z) / t)); elseif (y <= 3.1e+76) tmp = Float64(x / a); else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -390000.0) tmp = z / b; elseif (y <= 8.2e-22) tmp = x / (a + 1.0); elseif (y <= 2.85e+76) tmp = x + ((y * z) / t); elseif (y <= 3.1e+76) tmp = x / a; else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -390000.0], N[(z / b), $MachinePrecision], If[LessEqual[y, 8.2e-22], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.85e+76], N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.1e+76], N[(x / a), $MachinePrecision], N[(z / b), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -390000:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;y \leq 8.2 \cdot 10^{-22}:\\
\;\;\;\;\frac{x}{a + 1}\\
\mathbf{elif}\;y \leq 2.85 \cdot 10^{+76}:\\
\;\;\;\;x + \frac{y \cdot z}{t}\\
\mathbf{elif}\;y \leq 3.1 \cdot 10^{+76}:\\
\;\;\;\;\frac{x}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if y < -3.9e5 or 3.10000000000000011e76 < y Initial program 49.6%
*-commutative49.6%
associate-*l/55.3%
associate-+l+55.3%
associate-*r/62.6%
*-commutative62.6%
Simplified62.6%
Taylor expanded in t around 0 64.0%
if -3.9e5 < y < 8.1999999999999999e-22Initial program 95.5%
*-commutative95.5%
associate-*l/90.5%
associate-+l+90.5%
associate-*r/86.2%
*-commutative86.2%
Simplified86.2%
Taylor expanded in t around inf 63.6%
if 8.1999999999999999e-22 < y < 2.85000000000000002e76Initial program 93.7%
*-commutative93.7%
associate-*l/93.5%
associate-+l+93.5%
associate-*r/93.6%
*-commutative93.6%
Simplified93.6%
Taylor expanded in b around 0 69.9%
Taylor expanded in a around 0 50.7%
if 2.85000000000000002e76 < y < 3.10000000000000011e76Initial program 100.0%
*-commutative100.0%
associate-*l/100.0%
associate-+l+100.0%
associate-*r/100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in x around inf 100.0%
Taylor expanded in a around inf 100.0%
Final simplification63.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -185000.0) (not (<= y 3.1e+76))) (/ z b) (/ x (+ a 1.0))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -185000.0) || !(y <= 3.1e+76)) {
tmp = z / b;
} else {
tmp = x / (a + 1.0);
}
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 ((y <= (-185000.0d0)) .or. (.not. (y <= 3.1d+76))) then
tmp = z / b
else
tmp = x / (a + 1.0d0)
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 ((y <= -185000.0) || !(y <= 3.1e+76)) {
tmp = z / b;
} else {
tmp = x / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -185000.0) or not (y <= 3.1e+76): tmp = z / b else: tmp = x / (a + 1.0) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -185000.0) || !(y <= 3.1e+76)) tmp = Float64(z / b); else tmp = Float64(x / Float64(a + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -185000.0) || ~((y <= 3.1e+76))) tmp = z / b; else tmp = x / (a + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -185000.0], N[Not[LessEqual[y, 3.1e+76]], $MachinePrecision]], N[(z / b), $MachinePrecision], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -185000 \lor \neg \left(y \leq 3.1 \cdot 10^{+76}\right):\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a + 1}\\
\end{array}
\end{array}
if y < -185000 or 3.10000000000000011e76 < y Initial program 49.6%
*-commutative49.6%
associate-*l/55.3%
associate-+l+55.3%
associate-*r/62.6%
*-commutative62.6%
Simplified62.6%
Taylor expanded in t around 0 64.0%
if -185000 < y < 3.10000000000000011e76Initial program 95.4%
*-commutative95.4%
associate-*l/90.9%
associate-+l+90.9%
associate-*r/87.1%
*-commutative87.1%
Simplified87.1%
Taylor expanded in t around inf 59.8%
Final simplification61.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -3.6e+138) (not (<= a 1.4e+131))) (/ x a) (/ z b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -3.6e+138) || !(a <= 1.4e+131)) {
tmp = x / a;
} else {
tmp = z / b;
}
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 ((a <= (-3.6d+138)) .or. (.not. (a <= 1.4d+131))) then
tmp = x / a
else
tmp = z / b
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 ((a <= -3.6e+138) || !(a <= 1.4e+131)) {
tmp = x / a;
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -3.6e+138) or not (a <= 1.4e+131): tmp = x / a else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -3.6e+138) || !(a <= 1.4e+131)) tmp = Float64(x / a); else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a <= -3.6e+138) || ~((a <= 1.4e+131))) tmp = x / a; else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -3.6e+138], N[Not[LessEqual[a, 1.4e+131]], $MachinePrecision]], N[(x / a), $MachinePrecision], N[(z / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.6 \cdot 10^{+138} \lor \neg \left(a \leq 1.4 \cdot 10^{+131}\right):\\
\;\;\;\;\frac{x}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if a < -3.6000000000000001e138 or 1.4e131 < a Initial program 82.9%
*-commutative82.9%
associate-*l/79.9%
associate-+l+79.9%
associate-*r/81.5%
*-commutative81.5%
Simplified81.5%
Taylor expanded in x around inf 67.8%
Taylor expanded in a around inf 64.7%
if -3.6000000000000001e138 < a < 1.4e131Initial program 74.8%
*-commutative74.8%
associate-*l/75.3%
associate-+l+75.3%
associate-*r/75.7%
*-commutative75.7%
Simplified75.7%
Taylor expanded in t around 0 41.0%
Final simplification46.7%
(FPCore (x y z t a b) :precision binary64 (/ x a))
double code(double x, double y, double z, double t, double a, double b) {
return x / a;
}
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 / a
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x / a;
}
def code(x, y, z, t, a, b): return x / a
function code(x, y, z, t, a, b) return Float64(x / a) end
function tmp = code(x, y, z, t, a, b) tmp = x / a; end
code[x_, y_, z_, t_, a_, b_] := N[(x / a), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{a}
\end{array}
Initial program 76.8%
*-commutative76.8%
associate-*l/76.4%
associate-+l+76.4%
associate-*r/77.1%
*-commutative77.1%
Simplified77.1%
Taylor expanded in x around inf 54.7%
Taylor expanded in a around inf 22.0%
Final simplification22.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(* 1.0 (* (+ x (* (/ y t) z)) (/ 1.0 (+ (+ a 1.0) (* (/ y t) b)))))))
(if (< t -1.3659085366310088e-271)
t_1
(if (< t 3.036967103737246e-130) (/ z b) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 1.0 * ((x + ((y / t) * z)) * (1.0 / ((a + 1.0) + ((y / t) * b))));
double tmp;
if (t < -1.3659085366310088e-271) {
tmp = t_1;
} else if (t < 3.036967103737246e-130) {
tmp = z / 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 = 1.0d0 * ((x + ((y / t) * z)) * (1.0d0 / ((a + 1.0d0) + ((y / t) * b))))
if (t < (-1.3659085366310088d-271)) then
tmp = t_1
else if (t < 3.036967103737246d-130) then
tmp = z / 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 = 1.0 * ((x + ((y / t) * z)) * (1.0 / ((a + 1.0) + ((y / t) * b))));
double tmp;
if (t < -1.3659085366310088e-271) {
tmp = t_1;
} else if (t < 3.036967103737246e-130) {
tmp = z / b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = 1.0 * ((x + ((y / t) * z)) * (1.0 / ((a + 1.0) + ((y / t) * b)))) tmp = 0 if t < -1.3659085366310088e-271: tmp = t_1 elif t < 3.036967103737246e-130: tmp = z / b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(1.0 * Float64(Float64(x + Float64(Float64(y / t) * z)) * Float64(1.0 / Float64(Float64(a + 1.0) + Float64(Float64(y / t) * b))))) tmp = 0.0 if (t < -1.3659085366310088e-271) tmp = t_1; elseif (t < 3.036967103737246e-130) tmp = Float64(z / b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = 1.0 * ((x + ((y / t) * z)) * (1.0 / ((a + 1.0) + ((y / t) * b)))); tmp = 0.0; if (t < -1.3659085366310088e-271) tmp = t_1; elseif (t < 3.036967103737246e-130) tmp = z / b; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(1.0 * N[(N[(x + N[(N[(y / t), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y / t), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t, -1.3659085366310088e-271], t$95$1, If[Less[t, 3.036967103737246e-130], N[(z / b), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 1 \cdot \left(\left(x + \frac{y}{t} \cdot z\right) \cdot \frac{1}{\left(a + 1\right) + \frac{y}{t} \cdot b}\right)\\
\mathbf{if}\;t < -1.3659085366310088 \cdot 10^{-271}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t < 3.036967103737246 \cdot 10^{-130}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
herbie shell --seed 2023320
(FPCore (x y z t a b)
:name "Diagrams.Solve.Tridiagonal:solveCyclicTriDiagonal from diagrams-solve-0.1, B"
:precision binary64
:herbie-target
(if (< t -1.3659085366310088e-271) (* 1.0 (* (+ x (* (/ y t) z)) (/ 1.0 (+ (+ a 1.0) (* (/ y t) b))))) (if (< t 3.036967103737246e-130) (/ z b) (* 1.0 (* (+ x (* (/ y t) z)) (/ 1.0 (+ (+ a 1.0) (* (/ y t) b)))))))
(/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t))))