
(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 15 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)) (+ (/ (* y b) t) (+ a 1.0)))))
(if (<= t_1 (- INFINITY))
(/ y (/ (+ 1.0 (fma y (/ b t) a)) (/ z t)))
(if (<= t_1 -5e-303)
t_1
(if (<= t_1 0.0)
(/ (* (/ t b) (fma (/ z t) y x)) y)
(if (<= t_1 2e+295)
t_1
(/ y (+ (/ (* t (+ a 1.0)) z) (/ b (/ z y))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0));
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = y / ((1.0 + fma(y, (b / t), a)) / (z / t));
} else if (t_1 <= -5e-303) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = ((t / b) * fma((z / t), y, x)) / y;
} else if (t_1 <= 2e+295) {
tmp = t_1;
} else {
tmp = y / (((t * (a + 1.0)) / z) + (b / (z / y)));
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(Float64(y * b) / t) + Float64(a + 1.0))) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(y / Float64(Float64(1.0 + fma(y, Float64(b / t), a)) / Float64(z / t))); elseif (t_1 <= -5e-303) tmp = t_1; elseif (t_1 <= 0.0) tmp = Float64(Float64(Float64(t / b) * fma(Float64(z / t), y, x)) / y); elseif (t_1 <= 2e+295) tmp = t_1; else tmp = Float64(y / Float64(Float64(Float64(t * Float64(a + 1.0)) / z) + Float64(b / Float64(z / y)))); 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[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(y / N[(N[(1.0 + N[(y * N[(b / t), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision] / N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -5e-303], t$95$1, If[LessEqual[t$95$1, 0.0], N[(N[(N[(t / b), $MachinePrecision] * N[(N[(z / t), $MachinePrecision] * y + x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t$95$1, 2e+295], t$95$1, N[(y / N[(N[(N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] + N[(b / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + \frac{y \cdot z}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;\frac{y}{\frac{1 + \mathsf{fma}\left(y, \frac{b}{t}, a\right)}{\frac{z}{t}}}\\
\mathbf{elif}\;t\_1 \leq -5 \cdot 10^{-303}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;\frac{\frac{t}{b} \cdot \mathsf{fma}\left(\frac{z}{t}, y, x\right)}{y}\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+295}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{\frac{t \cdot \left(a + 1\right)}{z} + \frac{b}{\frac{z}{y}}}\\
\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 28.1%
*-commutative28.1%
associate-*l/62.0%
*-commutative62.0%
associate-*l/61.8%
Simplified61.8%
Taylor expanded in x around 0 60.2%
associate-/l*72.1%
*-commutative72.1%
associate-+r+72.1%
associate-/l*54.7%
+-commutative54.7%
associate-/l*72.1%
associate-*r/54.5%
+-commutative54.5%
fma-udef54.5%
associate-/l*54.6%
+-commutative54.6%
fma-def54.6%
associate-*r/71.9%
associate-/l*54.6%
+-commutative54.6%
associate-+r+54.6%
+-commutative54.6%
associate-/r/71.7%
*-commutative71.7%
fma-def71.7%
Simplified71.7%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -4.9999999999999998e-303 or -0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 2e295Initial program 99.7%
if -4.9999999999999998e-303 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -0.0Initial program 51.6%
*-commutative51.6%
associate-*l/51.6%
*-commutative51.6%
associate-*l/65.2%
Simplified65.2%
Taylor expanded in b around inf 44.8%
times-frac71.8%
+-commutative71.8%
*-commutative71.8%
associate-*l/71.9%
fma-def71.9%
Simplified71.9%
associate-*r/72.1%
Applied egg-rr72.1%
if 2e295 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) Initial program 13.0%
*-commutative13.0%
associate-*l/21.9%
*-commutative21.9%
associate-*l/30.3%
Simplified30.3%
Taylor expanded in x around 0 30.8%
associate-/l*45.7%
*-commutative45.7%
associate-+r+45.7%
associate-/l*34.2%
+-commutative34.2%
associate-/l*45.7%
associate-*r/34.2%
+-commutative34.2%
fma-udef34.2%
associate-/l*33.7%
+-commutative33.7%
fma-def33.7%
associate-*r/39.4%
associate-/l*33.7%
+-commutative33.7%
associate-+r+33.7%
+-commutative33.7%
associate-/r/42.4%
*-commutative42.4%
fma-def42.4%
Simplified42.4%
Taylor expanded in y around 0 71.2%
+-commutative71.2%
associate-/l*76.9%
Simplified76.9%
Final simplification91.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (/ (* y z) t)) (+ (/ (* y b) t) (+ a 1.0)))))
(if (<= t_1 -2e+91)
(/ (+ x (* z (/ y t))) (+ a (+ 1.0 (/ y (/ t b)))))
(if (<= t_1 -5e-303)
t_1
(if (<= t_1 0.0)
(/ (* (/ t b) (fma (/ z t) y x)) y)
(if (<= t_1 2e+295)
t_1
(/ y (+ (/ (* t (+ a 1.0)) z) (/ b (/ z y))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0));
double tmp;
if (t_1 <= -2e+91) {
tmp = (x + (z * (y / t))) / (a + (1.0 + (y / (t / b))));
} else if (t_1 <= -5e-303) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = ((t / b) * fma((z / t), y, x)) / y;
} else if (t_1 <= 2e+295) {
tmp = t_1;
} else {
tmp = y / (((t * (a + 1.0)) / z) + (b / (z / y)));
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(Float64(y * b) / t) + Float64(a + 1.0))) tmp = 0.0 if (t_1 <= -2e+91) tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(a + Float64(1.0 + Float64(y / Float64(t / b))))); elseif (t_1 <= -5e-303) tmp = t_1; elseif (t_1 <= 0.0) tmp = Float64(Float64(Float64(t / b) * fma(Float64(z / t), y, x)) / y); elseif (t_1 <= 2e+295) tmp = t_1; else tmp = Float64(y / Float64(Float64(Float64(t * Float64(a + 1.0)) / z) + Float64(b / Float64(z / y)))); 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[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+91], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + N[(1.0 + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -5e-303], t$95$1, If[LessEqual[t$95$1, 0.0], N[(N[(N[(t / b), $MachinePrecision] * N[(N[(z / t), $MachinePrecision] * y + x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t$95$1, 2e+295], t$95$1, N[(y / N[(N[(N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] + N[(b / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + \frac{y \cdot z}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+91}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + \left(1 + \frac{y}{\frac{t}{b}}\right)}\\
\mathbf{elif}\;t\_1 \leq -5 \cdot 10^{-303}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;\frac{\frac{t}{b} \cdot \mathsf{fma}\left(\frac{z}{t}, y, x\right)}{y}\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+295}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{\frac{t \cdot \left(a + 1\right)}{z} + \frac{b}{\frac{z}{y}}}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -2.00000000000000016e91Initial program 75.4%
associate-/l*78.9%
associate-+l+78.9%
associate-/l*78.8%
Simplified78.8%
associate-/r/87.0%
Applied egg-rr87.0%
if -2.00000000000000016e91 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -4.9999999999999998e-303 or -0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 2e295Initial program 99.7%
if -4.9999999999999998e-303 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -0.0Initial program 51.6%
*-commutative51.6%
associate-*l/51.6%
*-commutative51.6%
associate-*l/65.2%
Simplified65.2%
Taylor expanded in b around inf 44.8%
times-frac71.8%
+-commutative71.8%
*-commutative71.8%
associate-*l/71.9%
fma-def71.9%
Simplified71.9%
associate-*r/72.1%
Applied egg-rr72.1%
if 2e295 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) Initial program 13.0%
*-commutative13.0%
associate-*l/21.9%
*-commutative21.9%
associate-*l/30.3%
Simplified30.3%
Taylor expanded in x around 0 30.8%
associate-/l*45.7%
*-commutative45.7%
associate-+r+45.7%
associate-/l*34.2%
+-commutative34.2%
associate-/l*45.7%
associate-*r/34.2%
+-commutative34.2%
fma-udef34.2%
associate-/l*33.7%
+-commutative33.7%
fma-def33.7%
associate-*r/39.4%
associate-/l*33.7%
+-commutative33.7%
associate-+r+33.7%
+-commutative33.7%
associate-/r/42.4%
*-commutative42.4%
fma-def42.4%
Simplified42.4%
Taylor expanded in y around 0 71.2%
+-commutative71.2%
associate-/l*76.9%
Simplified76.9%
Final simplification90.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (/ (* y z) t)) (+ (/ (* y b) t) (+ a 1.0)))))
(if (<= t_1 -2e+91)
(/ (+ x (* z (/ y t))) (+ a (+ 1.0 (/ y (/ t b)))))
(if (<= t_1 -5e-303)
t_1
(if (<= t_1 0.0)
(* (/ t b) (+ (/ z t) (/ x y)))
(if (<= t_1 2e+295)
t_1
(/ y (+ (/ (* t (+ a 1.0)) z) (/ b (/ z y))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0));
double tmp;
if (t_1 <= -2e+91) {
tmp = (x + (z * (y / t))) / (a + (1.0 + (y / (t / b))));
} else if (t_1 <= -5e-303) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = (t / b) * ((z / t) + (x / y));
} else if (t_1 <= 2e+295) {
tmp = t_1;
} else {
tmp = y / (((t * (a + 1.0)) / z) + (b / (z / 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 = (x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0d0))
if (t_1 <= (-2d+91)) then
tmp = (x + (z * (y / t))) / (a + (1.0d0 + (y / (t / b))))
else if (t_1 <= (-5d-303)) then
tmp = t_1
else if (t_1 <= 0.0d0) then
tmp = (t / b) * ((z / t) + (x / y))
else if (t_1 <= 2d+295) then
tmp = t_1
else
tmp = y / (((t * (a + 1.0d0)) / z) + (b / (z / 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 = (x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0));
double tmp;
if (t_1 <= -2e+91) {
tmp = (x + (z * (y / t))) / (a + (1.0 + (y / (t / b))));
} else if (t_1 <= -5e-303) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = (t / b) * ((z / t) + (x / y));
} else if (t_1 <= 2e+295) {
tmp = t_1;
} else {
tmp = y / (((t * (a + 1.0)) / z) + (b / (z / y)));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0)) tmp = 0 if t_1 <= -2e+91: tmp = (x + (z * (y / t))) / (a + (1.0 + (y / (t / b)))) elif t_1 <= -5e-303: tmp = t_1 elif t_1 <= 0.0: tmp = (t / b) * ((z / t) + (x / y)) elif t_1 <= 2e+295: tmp = t_1 else: tmp = y / (((t * (a + 1.0)) / z) + (b / (z / y))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(Float64(y * b) / t) + Float64(a + 1.0))) tmp = 0.0 if (t_1 <= -2e+91) tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(a + Float64(1.0 + Float64(y / Float64(t / b))))); elseif (t_1 <= -5e-303) tmp = t_1; elseif (t_1 <= 0.0) tmp = Float64(Float64(t / b) * Float64(Float64(z / t) + Float64(x / y))); elseif (t_1 <= 2e+295) tmp = t_1; else tmp = Float64(y / Float64(Float64(Float64(t * Float64(a + 1.0)) / z) + Float64(b / Float64(z / y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0)); tmp = 0.0; if (t_1 <= -2e+91) tmp = (x + (z * (y / t))) / (a + (1.0 + (y / (t / b)))); elseif (t_1 <= -5e-303) tmp = t_1; elseif (t_1 <= 0.0) tmp = (t / b) * ((z / t) + (x / y)); elseif (t_1 <= 2e+295) tmp = t_1; else tmp = y / (((t * (a + 1.0)) / z) + (b / (z / y))); 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[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+91], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + N[(1.0 + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -5e-303], t$95$1, If[LessEqual[t$95$1, 0.0], N[(N[(t / b), $MachinePrecision] * N[(N[(z / t), $MachinePrecision] + N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+295], t$95$1, N[(y / N[(N[(N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] + N[(b / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + \frac{y \cdot z}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+91}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + \left(1 + \frac{y}{\frac{t}{b}}\right)}\\
\mathbf{elif}\;t\_1 \leq -5 \cdot 10^{-303}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;\frac{t}{b} \cdot \left(\frac{z}{t} + \frac{x}{y}\right)\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+295}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{\frac{t \cdot \left(a + 1\right)}{z} + \frac{b}{\frac{z}{y}}}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -2.00000000000000016e91Initial program 75.4%
associate-/l*78.9%
associate-+l+78.9%
associate-/l*78.8%
Simplified78.8%
associate-/r/87.0%
Applied egg-rr87.0%
if -2.00000000000000016e91 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -4.9999999999999998e-303 or -0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 2e295Initial program 99.7%
if -4.9999999999999998e-303 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -0.0Initial program 51.6%
*-commutative51.6%
associate-*l/51.6%
*-commutative51.6%
associate-*l/65.2%
Simplified65.2%
Taylor expanded in b around inf 44.8%
times-frac71.8%
+-commutative71.8%
*-commutative71.8%
associate-*l/71.9%
fma-def71.9%
Simplified71.9%
Taylor expanded in z around 0 71.9%
if 2e295 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) Initial program 13.0%
*-commutative13.0%
associate-*l/21.9%
*-commutative21.9%
associate-*l/30.3%
Simplified30.3%
Taylor expanded in x around 0 30.8%
associate-/l*45.7%
*-commutative45.7%
associate-+r+45.7%
associate-/l*34.2%
+-commutative34.2%
associate-/l*45.7%
associate-*r/34.2%
+-commutative34.2%
fma-udef34.2%
associate-/l*33.7%
+-commutative33.7%
fma-def33.7%
associate-*r/39.4%
associate-/l*33.7%
+-commutative33.7%
associate-+r+33.7%
+-commutative33.7%
associate-/r/42.4%
*-commutative42.4%
fma-def42.4%
Simplified42.4%
Taylor expanded in y around 0 71.2%
+-commutative71.2%
associate-/l*76.9%
Simplified76.9%
Final simplification90.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (* z (/ y t))) (+ a 1.0))))
(if (<= y -7e+146)
(* (/ t b) (+ (/ z t) (/ x y)))
(if (<= y 2.8e-73)
t_1
(if (<= y 1.75e-41)
(/ (* y z) (* t (+ 1.0 (/ (* y b) t))))
(if (<= y 1.85e+15)
t_1
(if (<= y 7.4e+72)
(/ y (+ (/ (* t (+ a 1.0)) z) (/ b (/ z y))))
(if (<= y 3.2e+176)
(/ x (+ 1.0 (+ a (* y (/ b t)))))
(/ z b)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + (z * (y / t))) / (a + 1.0);
double tmp;
if (y <= -7e+146) {
tmp = (t / b) * ((z / t) + (x / y));
} else if (y <= 2.8e-73) {
tmp = t_1;
} else if (y <= 1.75e-41) {
tmp = (y * z) / (t * (1.0 + ((y * b) / t)));
} else if (y <= 1.85e+15) {
tmp = t_1;
} else if (y <= 7.4e+72) {
tmp = y / (((t * (a + 1.0)) / z) + (b / (z / y)));
} else if (y <= 3.2e+176) {
tmp = x / (1.0 + (a + (y * (b / 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) :: t_1
real(8) :: tmp
t_1 = (x + (z * (y / t))) / (a + 1.0d0)
if (y <= (-7d+146)) then
tmp = (t / b) * ((z / t) + (x / y))
else if (y <= 2.8d-73) then
tmp = t_1
else if (y <= 1.75d-41) then
tmp = (y * z) / (t * (1.0d0 + ((y * b) / t)))
else if (y <= 1.85d+15) then
tmp = t_1
else if (y <= 7.4d+72) then
tmp = y / (((t * (a + 1.0d0)) / z) + (b / (z / y)))
else if (y <= 3.2d+176) then
tmp = x / (1.0d0 + (a + (y * (b / 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 t_1 = (x + (z * (y / t))) / (a + 1.0);
double tmp;
if (y <= -7e+146) {
tmp = (t / b) * ((z / t) + (x / y));
} else if (y <= 2.8e-73) {
tmp = t_1;
} else if (y <= 1.75e-41) {
tmp = (y * z) / (t * (1.0 + ((y * b) / t)));
} else if (y <= 1.85e+15) {
tmp = t_1;
} else if (y <= 7.4e+72) {
tmp = y / (((t * (a + 1.0)) / z) + (b / (z / y)));
} else if (y <= 3.2e+176) {
tmp = x / (1.0 + (a + (y * (b / t))));
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + (z * (y / t))) / (a + 1.0) tmp = 0 if y <= -7e+146: tmp = (t / b) * ((z / t) + (x / y)) elif y <= 2.8e-73: tmp = t_1 elif y <= 1.75e-41: tmp = (y * z) / (t * (1.0 + ((y * b) / t))) elif y <= 1.85e+15: tmp = t_1 elif y <= 7.4e+72: tmp = y / (((t * (a + 1.0)) / z) + (b / (z / y))) elif y <= 3.2e+176: tmp = x / (1.0 + (a + (y * (b / t)))) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(a + 1.0)) tmp = 0.0 if (y <= -7e+146) tmp = Float64(Float64(t / b) * Float64(Float64(z / t) + Float64(x / y))); elseif (y <= 2.8e-73) tmp = t_1; elseif (y <= 1.75e-41) tmp = Float64(Float64(y * z) / Float64(t * Float64(1.0 + Float64(Float64(y * b) / t)))); elseif (y <= 1.85e+15) tmp = t_1; elseif (y <= 7.4e+72) tmp = Float64(y / Float64(Float64(Float64(t * Float64(a + 1.0)) / z) + Float64(b / Float64(z / y)))); elseif (y <= 3.2e+176) tmp = Float64(x / Float64(1.0 + Float64(a + Float64(y * Float64(b / t))))); else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x + (z * (y / t))) / (a + 1.0); tmp = 0.0; if (y <= -7e+146) tmp = (t / b) * ((z / t) + (x / y)); elseif (y <= 2.8e-73) tmp = t_1; elseif (y <= 1.75e-41) tmp = (y * z) / (t * (1.0 + ((y * b) / t))); elseif (y <= 1.85e+15) tmp = t_1; elseif (y <= 7.4e+72) tmp = y / (((t * (a + 1.0)) / z) + (b / (z / y))); elseif (y <= 3.2e+176) tmp = x / (1.0 + (a + (y * (b / t)))); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -7e+146], N[(N[(t / b), $MachinePrecision] * N[(N[(z / t), $MachinePrecision] + N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.8e-73], t$95$1, If[LessEqual[y, 1.75e-41], N[(N[(y * z), $MachinePrecision] / N[(t * N[(1.0 + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.85e+15], t$95$1, If[LessEqual[y, 7.4e+72], N[(y / N[(N[(N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] + N[(b / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.2e+176], N[(x / N[(1.0 + N[(a + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + z \cdot \frac{y}{t}}{a + 1}\\
\mathbf{if}\;y \leq -7 \cdot 10^{+146}:\\
\;\;\;\;\frac{t}{b} \cdot \left(\frac{z}{t} + \frac{x}{y}\right)\\
\mathbf{elif}\;y \leq 2.8 \cdot 10^{-73}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.75 \cdot 10^{-41}:\\
\;\;\;\;\frac{y \cdot z}{t \cdot \left(1 + \frac{y \cdot b}{t}\right)}\\
\mathbf{elif}\;y \leq 1.85 \cdot 10^{+15}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 7.4 \cdot 10^{+72}:\\
\;\;\;\;\frac{y}{\frac{t \cdot \left(a + 1\right)}{z} + \frac{b}{\frac{z}{y}}}\\
\mathbf{elif}\;y \leq 3.2 \cdot 10^{+176}:\\
\;\;\;\;\frac{x}{1 + \left(a + y \cdot \frac{b}{t}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if y < -7.0000000000000002e146Initial program 37.9%
*-commutative37.9%
associate-*l/52.3%
*-commutative52.3%
associate-*l/60.8%
Simplified60.8%
Taylor expanded in b around inf 23.5%
times-frac34.7%
+-commutative34.7%
*-commutative34.7%
associate-*l/43.4%
fma-def43.4%
Simplified43.4%
Taylor expanded in z around 0 61.1%
if -7.0000000000000002e146 < y < 2.80000000000000012e-73 or 1.75e-41 < y < 1.85e15Initial program 96.0%
*-commutative96.0%
associate-*l/88.3%
*-commutative88.3%
associate-*l/86.2%
Simplified86.2%
Taylor expanded in b around 0 84.5%
associate-*l/47.0%
Applied egg-rr85.4%
if 2.80000000000000012e-73 < y < 1.75e-41Initial program 87.7%
*-commutative87.7%
associate-*l/87.5%
*-commutative87.5%
associate-*l/87.1%
Simplified87.1%
Taylor expanded in x around 0 87.3%
associate-/l*87.2%
*-commutative87.2%
associate-+r+87.2%
associate-/l*87.6%
+-commutative87.6%
associate-/l*87.2%
associate-*r/87.2%
+-commutative87.2%
fma-udef87.2%
associate-/l*75.3%
+-commutative75.3%
fma-def75.3%
associate-*r/75.3%
associate-/l*75.5%
+-commutative75.5%
associate-+r+75.5%
+-commutative75.5%
associate-/r/74.7%
*-commutative74.7%
fma-def74.7%
Simplified74.7%
Taylor expanded in a around 0 87.4%
if 1.85e15 < y < 7.40000000000000041e72Initial program 60.9%
*-commutative60.9%
associate-*l/61.0%
*-commutative61.0%
associate-*l/67.2%
Simplified67.2%
Taylor expanded in x around 0 54.4%
associate-/l*61.1%
*-commutative61.1%
associate-+r+61.1%
associate-/l*54.5%
+-commutative54.5%
associate-/l*61.1%
associate-*r/54.3%
+-commutative54.3%
fma-udef54.3%
associate-/l*59.9%
+-commutative59.9%
fma-def59.9%
associate-*r/54.4%
associate-/l*60.1%
+-commutative60.1%
associate-+r+60.1%
+-commutative60.1%
associate-/r/60.7%
*-commutative60.7%
fma-def60.7%
Simplified60.7%
Taylor expanded in y around 0 80.4%
+-commutative80.4%
associate-/l*86.7%
Simplified86.7%
if 7.40000000000000041e72 < y < 3.1999999999999998e176Initial program 57.2%
associate-/l*61.0%
associate-+l+61.0%
associate-/l*64.9%
Simplified64.9%
associate-/r/64.7%
Applied egg-rr64.7%
*-commutative64.7%
clear-num64.7%
un-div-inv64.7%
Applied egg-rr64.7%
Taylor expanded in x around inf 57.6%
associate-*l/61.5%
*-commutative61.5%
Simplified61.5%
if 3.1999999999999998e176 < y Initial program 41.9%
*-commutative41.9%
associate-*l/46.1%
*-commutative46.1%
associate-*l/57.6%
Simplified57.6%
Taylor expanded in t around 0 77.1%
Final simplification79.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* z (/ y t)))) (t_2 (/ (+ x (/ (* y z) t)) a)))
(if (<= a -24000000000.0)
t_2
(if (<= a -2.5e-142)
t_1
(if (<= a -1.95e-150)
(* (/ t b) (+ (/ z t) (/ x y)))
(if (<= a 1.75) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (z * (y / t));
double t_2 = (x + ((y * z) / t)) / a;
double tmp;
if (a <= -24000000000.0) {
tmp = t_2;
} else if (a <= -2.5e-142) {
tmp = t_1;
} else if (a <= -1.95e-150) {
tmp = (t / b) * ((z / t) + (x / y));
} else if (a <= 1.75) {
tmp = t_1;
} else {
tmp = t_2;
}
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 + (z * (y / t))
t_2 = (x + ((y * z) / t)) / a
if (a <= (-24000000000.0d0)) then
tmp = t_2
else if (a <= (-2.5d-142)) then
tmp = t_1
else if (a <= (-1.95d-150)) then
tmp = (t / b) * ((z / t) + (x / y))
else if (a <= 1.75d0) then
tmp = t_1
else
tmp = t_2
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 + (z * (y / t));
double t_2 = (x + ((y * z) / t)) / a;
double tmp;
if (a <= -24000000000.0) {
tmp = t_2;
} else if (a <= -2.5e-142) {
tmp = t_1;
} else if (a <= -1.95e-150) {
tmp = (t / b) * ((z / t) + (x / y));
} else if (a <= 1.75) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (z * (y / t)) t_2 = (x + ((y * z) / t)) / a tmp = 0 if a <= -24000000000.0: tmp = t_2 elif a <= -2.5e-142: tmp = t_1 elif a <= -1.95e-150: tmp = (t / b) * ((z / t) + (x / y)) elif a <= 1.75: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(z * Float64(y / t))) t_2 = Float64(Float64(x + Float64(Float64(y * z) / t)) / a) tmp = 0.0 if (a <= -24000000000.0) tmp = t_2; elseif (a <= -2.5e-142) tmp = t_1; elseif (a <= -1.95e-150) tmp = Float64(Float64(t / b) * Float64(Float64(z / t) + Float64(x / y))); elseif (a <= 1.75) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (z * (y / t)); t_2 = (x + ((y * z) / t)) / a; tmp = 0.0; if (a <= -24000000000.0) tmp = t_2; elseif (a <= -2.5e-142) tmp = t_1; elseif (a <= -1.95e-150) tmp = (t / b) * ((z / t) + (x / y)); elseif (a <= 1.75) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]}, If[LessEqual[a, -24000000000.0], t$95$2, If[LessEqual[a, -2.5e-142], t$95$1, If[LessEqual[a, -1.95e-150], N[(N[(t / b), $MachinePrecision] * N[(N[(z / t), $MachinePrecision] + N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.75], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + z \cdot \frac{y}{t}\\
t_2 := \frac{x + \frac{y \cdot z}{t}}{a}\\
\mathbf{if}\;a \leq -24000000000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq -2.5 \cdot 10^{-142}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -1.95 \cdot 10^{-150}:\\
\;\;\;\;\frac{t}{b} \cdot \left(\frac{z}{t} + \frac{x}{y}\right)\\
\mathbf{elif}\;a \leq 1.75:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if a < -2.4e10 or 1.75 < a Initial program 76.1%
*-commutative76.1%
associate-*l/73.1%
*-commutative73.1%
associate-*l/73.8%
Simplified73.8%
Taylor expanded in a around inf 62.0%
if -2.4e10 < a < -2.5000000000000001e-142 or -1.9500000000000001e-150 < a < 1.75Initial program 77.4%
*-commutative77.4%
associate-*l/76.9%
*-commutative76.9%
associate-*l/79.8%
Simplified79.8%
Taylor expanded in b around 0 58.1%
Taylor expanded in a around 0 57.5%
associate-*l/60.9%
Applied egg-rr60.9%
if -2.5000000000000001e-142 < a < -1.9500000000000001e-150Initial program 81.2%
*-commutative81.2%
associate-*l/81.2%
*-commutative81.2%
associate-*l/80.6%
Simplified80.6%
Taylor expanded in b around inf 80.6%
times-frac99.5%
+-commutative99.5%
*-commutative99.5%
associate-*l/100.0%
fma-def100.0%
Simplified100.0%
Taylor expanded in z around 0 100.0%
Final simplification62.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (+ 1.0 (+ a (* y (/ b t)))))))
(if (<= t -8.2e-20)
t_1
(if (<= t -2.8e-167)
(/ (/ y (/ (+ a 1.0) z)) t)
(if (<= t 1.15e-144) (/ z b) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (1.0 + (a + (y * (b / t))));
double tmp;
if (t <= -8.2e-20) {
tmp = t_1;
} else if (t <= -2.8e-167) {
tmp = (y / ((a + 1.0) / z)) / t;
} else if (t <= 1.15e-144) {
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 / (1.0d0 + (a + (y * (b / t))))
if (t <= (-8.2d-20)) then
tmp = t_1
else if (t <= (-2.8d-167)) then
tmp = (y / ((a + 1.0d0) / z)) / t
else if (t <= 1.15d-144) 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 / (1.0 + (a + (y * (b / t))));
double tmp;
if (t <= -8.2e-20) {
tmp = t_1;
} else if (t <= -2.8e-167) {
tmp = (y / ((a + 1.0) / z)) / t;
} else if (t <= 1.15e-144) {
tmp = z / b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (1.0 + (a + (y * (b / t)))) tmp = 0 if t <= -8.2e-20: tmp = t_1 elif t <= -2.8e-167: tmp = (y / ((a + 1.0) / z)) / t elif t <= 1.15e-144: tmp = z / b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(1.0 + Float64(a + Float64(y * Float64(b / t))))) tmp = 0.0 if (t <= -8.2e-20) tmp = t_1; elseif (t <= -2.8e-167) tmp = Float64(Float64(y / Float64(Float64(a + 1.0) / z)) / t); elseif (t <= 1.15e-144) 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 / (1.0 + (a + (y * (b / t)))); tmp = 0.0; if (t <= -8.2e-20) tmp = t_1; elseif (t <= -2.8e-167) tmp = (y / ((a + 1.0) / z)) / t; elseif (t <= 1.15e-144) tmp = z / 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 + N[(a + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -8.2e-20], t$95$1, If[LessEqual[t, -2.8e-167], N[(N[(y / N[(N[(a + 1.0), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[t, 1.15e-144], N[(z / b), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{1 + \left(a + y \cdot \frac{b}{t}\right)}\\
\mathbf{if}\;t \leq -8.2 \cdot 10^{-20}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -2.8 \cdot 10^{-167}:\\
\;\;\;\;\frac{\frac{y}{\frac{a + 1}{z}}}{t}\\
\mathbf{elif}\;t \leq 1.15 \cdot 10^{-144}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -8.2000000000000002e-20 or 1.15e-144 < t Initial program 80.1%
associate-/l*83.7%
associate-+l+83.7%
associate-/l*88.2%
Simplified88.2%
associate-/r/89.0%
Applied egg-rr89.0%
*-commutative89.0%
clear-num88.8%
un-div-inv88.8%
Applied egg-rr88.8%
Taylor expanded in x around inf 63.5%
associate-*l/64.8%
*-commutative64.8%
Simplified64.8%
if -8.2000000000000002e-20 < t < -2.79999999999999986e-167Initial program 90.6%
*-commutative90.6%
associate-*l/77.5%
*-commutative77.5%
associate-*l/77.4%
Simplified77.4%
Taylor expanded in b around 0 69.4%
div-inv69.5%
*-commutative69.5%
Applied egg-rr69.5%
Taylor expanded in x around 0 56.6%
*-commutative56.6%
associate-/r*56.5%
associate-/l*60.0%
Simplified60.0%
if -2.79999999999999986e-167 < t < 1.15e-144Initial program 61.5%
*-commutative61.5%
associate-*l/50.7%
*-commutative50.7%
associate-*l/47.2%
Simplified47.2%
Taylor expanded in t around 0 65.3%
Final simplification64.3%
(FPCore (x y z t a b) :precision binary64 (if (<= y 5.1e+182) (/ (+ x (* z (/ y t))) (+ a (+ 1.0 (/ y (/ t b))))) (/ z b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= 5.1e+182) {
tmp = (x + (z * (y / t))) / (a + (1.0 + (y / (t / b))));
} 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 <= 5.1d+182) then
tmp = (x + (z * (y / t))) / (a + (1.0d0 + (y / (t / b))))
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 <= 5.1e+182) {
tmp = (x + (z * (y / t))) / (a + (1.0 + (y / (t / b))));
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= 5.1e+182: tmp = (x + (z * (y / t))) / (a + (1.0 + (y / (t / b)))) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= 5.1e+182) tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(a + Float64(1.0 + Float64(y / Float64(t / b))))); else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= 5.1e+182) tmp = (x + (z * (y / t))) / (a + (1.0 + (y / (t / b)))); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, 5.1e+182], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + N[(1.0 + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 5.1 \cdot 10^{+182}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + \left(1 + \frac{y}{\frac{t}{b}}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if y < 5.10000000000000009e182Initial program 80.7%
associate-/l*78.7%
associate-+l+78.7%
associate-/l*80.2%
Simplified80.2%
associate-/r/82.3%
Applied egg-rr82.3%
if 5.10000000000000009e182 < y Initial program 41.9%
*-commutative41.9%
associate-*l/46.1%
*-commutative46.1%
associate-*l/57.6%
Simplified57.6%
Taylor expanded in t around 0 77.1%
Final simplification81.8%
(FPCore (x y z t a b) :precision binary64 (if (<= y 6.4e+179) (/ (+ x (/ z (/ t y))) (+ a (+ 1.0 (/ y (/ t b))))) (/ z b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= 6.4e+179) {
tmp = (x + (z / (t / y))) / (a + (1.0 + (y / (t / b))));
} 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 <= 6.4d+179) then
tmp = (x + (z / (t / y))) / (a + (1.0d0 + (y / (t / b))))
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 <= 6.4e+179) {
tmp = (x + (z / (t / y))) / (a + (1.0 + (y / (t / b))));
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= 6.4e+179: tmp = (x + (z / (t / y))) / (a + (1.0 + (y / (t / b)))) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= 6.4e+179) tmp = Float64(Float64(x + Float64(z / Float64(t / y))) / Float64(a + Float64(1.0 + Float64(y / Float64(t / b))))); else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= 6.4e+179) tmp = (x + (z / (t / y))) / (a + (1.0 + (y / (t / b)))); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, 6.4e+179], N[(N[(x + N[(z / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + N[(1.0 + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 6.4 \cdot 10^{+179}:\\
\;\;\;\;\frac{x + \frac{z}{\frac{t}{y}}}{a + \left(1 + \frac{y}{\frac{t}{b}}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if y < 6.4000000000000003e179Initial program 80.7%
associate-/l*78.7%
associate-+l+78.7%
associate-/l*80.2%
Simplified80.2%
associate-/r/82.3%
Applied egg-rr82.3%
*-commutative82.3%
clear-num82.2%
un-div-inv82.6%
Applied egg-rr82.6%
if 6.4000000000000003e179 < y Initial program 41.9%
*-commutative41.9%
associate-*l/46.1%
*-commutative46.1%
associate-*l/57.6%
Simplified57.6%
Taylor expanded in t around 0 77.1%
Final simplification82.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -1.5e-167) (not (<= t 5e-144))) (/ (+ x (* z (/ y t))) (+ a 1.0)) (/ z b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -1.5e-167) || !(t <= 5e-144)) {
tmp = (x + (z * (y / 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 ((t <= (-1.5d-167)) .or. (.not. (t <= 5d-144))) then
tmp = (x + (z * (y / 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 ((t <= -1.5e-167) || !(t <= 5e-144)) {
tmp = (x + (z * (y / t))) / (a + 1.0);
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -1.5e-167) or not (t <= 5e-144): tmp = (x + (z * (y / t))) / (a + 1.0) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -1.5e-167) || !(t <= 5e-144)) tmp = Float64(Float64(x + Float64(z * Float64(y / 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 ((t <= -1.5e-167) || ~((t <= 5e-144))) tmp = (x + (z * (y / t))) / (a + 1.0); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -1.5e-167], N[Not[LessEqual[t, 5e-144]], $MachinePrecision]], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.5 \cdot 10^{-167} \lor \neg \left(t \leq 5 \cdot 10^{-144}\right):\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if t < -1.4999999999999999e-167 or 4.9999999999999998e-144 < t Initial program 81.7%
*-commutative81.7%
associate-*l/82.8%
*-commutative82.8%
associate-*l/86.1%
Simplified86.1%
Taylor expanded in b around 0 69.0%
associate-*l/36.5%
Applied egg-rr73.1%
if -1.4999999999999999e-167 < t < 4.9999999999999998e-144Initial program 61.5%
*-commutative61.5%
associate-*l/50.7%
*-commutative50.7%
associate-*l/47.2%
Simplified47.2%
Taylor expanded in t around 0 65.3%
Final simplification71.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (+ a 1.0))))
(if (<= t -2.4e-18)
t_1
(if (<= t -9.6e-168)
(* (/ y t) (/ z (+ a 1.0)))
(if (<= t 1.05e-142) (/ z b) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (a + 1.0);
double tmp;
if (t <= -2.4e-18) {
tmp = t_1;
} else if (t <= -9.6e-168) {
tmp = (y / t) * (z / (a + 1.0));
} else if (t <= 1.05e-142) {
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 / (a + 1.0d0)
if (t <= (-2.4d-18)) then
tmp = t_1
else if (t <= (-9.6d-168)) then
tmp = (y / t) * (z / (a + 1.0d0))
else if (t <= 1.05d-142) 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 / (a + 1.0);
double tmp;
if (t <= -2.4e-18) {
tmp = t_1;
} else if (t <= -9.6e-168) {
tmp = (y / t) * (z / (a + 1.0));
} else if (t <= 1.05e-142) {
tmp = z / b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (a + 1.0) tmp = 0 if t <= -2.4e-18: tmp = t_1 elif t <= -9.6e-168: tmp = (y / t) * (z / (a + 1.0)) elif t <= 1.05e-142: tmp = z / b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(a + 1.0)) tmp = 0.0 if (t <= -2.4e-18) tmp = t_1; elseif (t <= -9.6e-168) tmp = Float64(Float64(y / t) * Float64(z / Float64(a + 1.0))); elseif (t <= 1.05e-142) 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 / (a + 1.0); tmp = 0.0; if (t <= -2.4e-18) tmp = t_1; elseif (t <= -9.6e-168) tmp = (y / t) * (z / (a + 1.0)); elseif (t <= 1.05e-142) tmp = z / b; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.4e-18], t$95$1, If[LessEqual[t, -9.6e-168], N[(N[(y / t), $MachinePrecision] * N[(z / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.05e-142], N[(z / b), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{a + 1}\\
\mathbf{if}\;t \leq -2.4 \cdot 10^{-18}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -9.6 \cdot 10^{-168}:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{a + 1}\\
\mathbf{elif}\;t \leq 1.05 \cdot 10^{-142}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -2.39999999999999994e-18 or 1.05e-142 < t Initial program 80.1%
*-commutative80.1%
associate-*l/83.7%
*-commutative83.7%
associate-*l/87.7%
Simplified87.7%
Taylor expanded in t around inf 58.3%
if -2.39999999999999994e-18 < t < -9.5999999999999997e-168Initial program 90.6%
*-commutative90.6%
associate-*l/77.5%
*-commutative77.5%
associate-*l/77.4%
Simplified77.4%
Taylor expanded in b around 0 69.4%
Taylor expanded in x around 0 56.6%
times-frac56.6%
Simplified56.6%
if -9.5999999999999997e-168 < t < 1.05e-142Initial program 61.5%
*-commutative61.5%
associate-*l/50.7%
*-commutative50.7%
associate-*l/47.2%
Simplified47.2%
Taylor expanded in t around 0 65.3%
Final simplification59.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -24000000000.0) (not (<= a 1.35))) (/ (+ x (/ (* y z) t)) a) (+ x (* z (/ y t)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -24000000000.0) || !(a <= 1.35)) {
tmp = (x + ((y * z) / t)) / a;
} else {
tmp = x + (z * (y / t));
}
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 <= (-24000000000.0d0)) .or. (.not. (a <= 1.35d0))) then
tmp = (x + ((y * z) / t)) / a
else
tmp = x + (z * (y / t))
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 <= -24000000000.0) || !(a <= 1.35)) {
tmp = (x + ((y * z) / t)) / a;
} else {
tmp = x + (z * (y / t));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -24000000000.0) or not (a <= 1.35): tmp = (x + ((y * z) / t)) / a else: tmp = x + (z * (y / t)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -24000000000.0) || !(a <= 1.35)) tmp = Float64(Float64(x + Float64(Float64(y * z) / t)) / a); else tmp = Float64(x + Float64(z * Float64(y / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a <= -24000000000.0) || ~((a <= 1.35))) tmp = (x + ((y * z) / t)) / a; else tmp = x + (z * (y / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -24000000000.0], N[Not[LessEqual[a, 1.35]], $MachinePrecision]], N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -24000000000 \lor \neg \left(a \leq 1.35\right):\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a}\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{y}{t}\\
\end{array}
\end{array}
if a < -2.4e10 or 1.3500000000000001 < a Initial program 76.1%
*-commutative76.1%
associate-*l/73.1%
*-commutative73.1%
associate-*l/73.8%
Simplified73.8%
Taylor expanded in a around inf 62.0%
if -2.4e10 < a < 1.3500000000000001Initial program 77.6%
*-commutative77.6%
associate-*l/77.1%
*-commutative77.1%
associate-*l/79.9%
Simplified79.9%
Taylor expanded in b around 0 56.1%
Taylor expanded in a around 0 55.5%
associate-*l/58.8%
Applied egg-rr58.8%
Final simplification60.4%
(FPCore (x y z t a b) :precision binary64 (if (<= a -1.5e+22) (/ x a) (if (<= a -3.4e-131) (/ z b) (if (<= a 85000000.0) x (/ x a)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -1.5e+22) {
tmp = x / a;
} else if (a <= -3.4e-131) {
tmp = z / b;
} else if (a <= 85000000.0) {
tmp = x;
} else {
tmp = x / a;
}
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 <= (-1.5d+22)) then
tmp = x / a
else if (a <= (-3.4d-131)) then
tmp = z / b
else if (a <= 85000000.0d0) then
tmp = x
else
tmp = x / a
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 <= -1.5e+22) {
tmp = x / a;
} else if (a <= -3.4e-131) {
tmp = z / b;
} else if (a <= 85000000.0) {
tmp = x;
} else {
tmp = x / a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -1.5e+22: tmp = x / a elif a <= -3.4e-131: tmp = z / b elif a <= 85000000.0: tmp = x else: tmp = x / a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -1.5e+22) tmp = Float64(x / a); elseif (a <= -3.4e-131) tmp = Float64(z / b); elseif (a <= 85000000.0) tmp = x; else tmp = Float64(x / a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -1.5e+22) tmp = x / a; elseif (a <= -3.4e-131) tmp = z / b; elseif (a <= 85000000.0) tmp = x; else tmp = x / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -1.5e+22], N[(x / a), $MachinePrecision], If[LessEqual[a, -3.4e-131], N[(z / b), $MachinePrecision], If[LessEqual[a, 85000000.0], x, N[(x / a), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.5 \cdot 10^{+22}:\\
\;\;\;\;\frac{x}{a}\\
\mathbf{elif}\;a \leq -3.4 \cdot 10^{-131}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;a \leq 85000000:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a}\\
\end{array}
\end{array}
if a < -1.5e22 or 8.5e7 < a Initial program 75.8%
*-commutative75.8%
associate-*l/73.4%
*-commutative73.4%
associate-*l/73.3%
Simplified73.3%
Taylor expanded in t around inf 50.4%
Taylor expanded in a around inf 50.2%
if -1.5e22 < a < -3.39999999999999995e-131Initial program 68.8%
*-commutative68.8%
associate-*l/71.7%
*-commutative71.7%
associate-*l/71.6%
Simplified71.6%
Taylor expanded in t around 0 44.5%
if -3.39999999999999995e-131 < a < 8.5e7Initial program 80.8%
*-commutative80.8%
associate-*l/78.3%
*-commutative78.3%
associate-*l/82.9%
Simplified82.9%
Taylor expanded in t around inf 46.2%
Taylor expanded in a around 0 45.5%
Final simplification47.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -2.6e-88) (not (<= t 3.6e-144))) (/ x (+ a 1.0)) (/ z b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -2.6e-88) || !(t <= 3.6e-144)) {
tmp = x / (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 ((t <= (-2.6d-88)) .or. (.not. (t <= 3.6d-144))) then
tmp = x / (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 ((t <= -2.6e-88) || !(t <= 3.6e-144)) {
tmp = x / (a + 1.0);
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -2.6e-88) or not (t <= 3.6e-144): tmp = x / (a + 1.0) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -2.6e-88) || !(t <= 3.6e-144)) tmp = Float64(x / 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 ((t <= -2.6e-88) || ~((t <= 3.6e-144))) tmp = x / (a + 1.0); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -2.6e-88], N[Not[LessEqual[t, 3.6e-144]], $MachinePrecision]], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.6 \cdot 10^{-88} \lor \neg \left(t \leq 3.6 \cdot 10^{-144}\right):\\
\;\;\;\;\frac{x}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if t < -2.60000000000000014e-88 or 3.6e-144 < t Initial program 81.4%
*-commutative81.4%
associate-*l/84.8%
*-commutative84.8%
associate-*l/88.5%
Simplified88.5%
Taylor expanded in t around inf 56.7%
if -2.60000000000000014e-88 < t < 3.6e-144Initial program 66.4%
*-commutative66.4%
associate-*l/53.1%
*-commutative53.1%
associate-*l/50.4%
Simplified50.4%
Taylor expanded in t around 0 57.8%
Final simplification57.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -1850.0) (not (<= a 85000000.0))) (/ x a) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -1850.0) || !(a <= 85000000.0)) {
tmp = x / a;
} else {
tmp = x;
}
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 <= (-1850.0d0)) .or. (.not. (a <= 85000000.0d0))) then
tmp = x / a
else
tmp = x
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 <= -1850.0) || !(a <= 85000000.0)) {
tmp = x / a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -1850.0) or not (a <= 85000000.0): tmp = x / a else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -1850.0) || !(a <= 85000000.0)) tmp = Float64(x / a); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a <= -1850.0) || ~((a <= 85000000.0))) tmp = x / a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -1850.0], N[Not[LessEqual[a, 85000000.0]], $MachinePrecision]], N[(x / a), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1850 \lor \neg \left(a \leq 85000000\right):\\
\;\;\;\;\frac{x}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -1850 or 8.5e7 < a Initial program 75.7%
*-commutative75.7%
associate-*l/72.7%
*-commutative72.7%
associate-*l/72.5%
Simplified72.5%
Taylor expanded in t around inf 49.7%
Taylor expanded in a around inf 49.3%
if -1850 < a < 8.5e7Initial program 77.9%
*-commutative77.9%
associate-*l/77.4%
*-commutative77.4%
associate-*l/80.9%
Simplified80.9%
Taylor expanded in t around inf 43.0%
Taylor expanded in a around 0 42.4%
Final simplification45.7%
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
return x;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x;
}
def code(x, y, z, t, a, b): return x
function code(x, y, z, t, a, b) return x end
function tmp = code(x, y, z, t, a, b) tmp = x; end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 76.9%
*-commutative76.9%
associate-*l/75.1%
*-commutative75.1%
associate-*l/76.9%
Simplified76.9%
Taylor expanded in t around inf 46.2%
Taylor expanded in a around 0 24.0%
Final simplification24.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 2024027
(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))))