
(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 16 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))
(* (/ z t) (/ y (+ (fma y (/ b t) a) 1.0)))
(if (<= t_1 -2e-322)
t_1
(if (<= t_1 0.0)
(+
(/ (+ (/ (* x t) b) (/ (* t (* z (- -1.0 a))) (pow b 2.0))) y)
(/ z b))
(if (<= t_1 2e+298) 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)) / (((y * b) / t) + (a + 1.0));
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = (z / t) * (y / (fma(y, (b / t), a) + 1.0));
} else if (t_1 <= -2e-322) {
tmp = t_1;
} 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 <= 2e+298) {
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(Float64(y * b) / t) + Float64(a + 1.0))) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(Float64(z / t) * Float64(y / Float64(fma(y, Float64(b / t), a) + 1.0))); elseif (t_1 <= -2e-322) tmp = t_1; 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 <= 2e+298) 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[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(N[(z / t), $MachinePrecision] * N[(y / N[(N[(y * N[(b / t), $MachinePrecision] + a), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -2e-322], t$95$1, 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, 2e+298], t$95$1, N[(z / b), $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{z}{t} \cdot \frac{y}{\mathsf{fma}\left(y, \frac{b}{t}, a\right) + 1}\\
\mathbf{elif}\;t\_1 \leq -2 \cdot 10^{-322}:\\
\;\;\;\;t\_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 2 \cdot 10^{+298}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -inf.0Initial program 29.9%
associate-/l*65.3%
associate-/l*65.3%
Simplified65.3%
Taylor expanded in x around 0 28.8%
*-commutative28.8%
times-frac87.7%
+-commutative87.7%
associate-*l/87.7%
*-commutative87.7%
fma-define87.7%
Simplified87.7%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -1.97626e-322 or -0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 1.9999999999999999e298Initial program 99.1%
if -1.97626e-322 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -0.0Initial program 40.7%
associate-/l*40.6%
associate-/l*53.6%
Simplified53.6%
Taylor expanded in y around -inf 87.1%
if 1.9999999999999999e298 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) Initial program 3.8%
associate-/l*11.5%
associate-/l*16.5%
Simplified16.5%
Taylor expanded in y around inf 85.0%
Final simplification94.8%
(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))
(* (/ z t) (/ y (+ (fma y (/ b t) a) 1.0)))
(if (<= t_1 -2e-322)
t_1
(if (<= t_1 0.0)
(/ (+ (* t (/ x b)) (* y (/ z b))) y)
(if (<= t_1 2e+298) 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)) / (((y * b) / t) + (a + 1.0));
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = (z / t) * (y / (fma(y, (b / t), a) + 1.0));
} else if (t_1 <= -2e-322) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = ((t * (x / b)) + (y * (z / b))) / y;
} else if (t_1 <= 2e+298) {
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(Float64(y * b) / t) + Float64(a + 1.0))) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(Float64(z / t) * Float64(y / Float64(fma(y, Float64(b / t), a) + 1.0))); elseif (t_1 <= -2e-322) tmp = t_1; elseif (t_1 <= 0.0) tmp = Float64(Float64(Float64(t * Float64(x / b)) + Float64(y * Float64(z / b))) / y); elseif (t_1 <= 2e+298) 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[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(N[(z / t), $MachinePrecision] * N[(y / N[(N[(y * N[(b / t), $MachinePrecision] + a), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -2e-322], t$95$1, If[LessEqual[t$95$1, 0.0], N[(N[(N[(t * N[(x / b), $MachinePrecision]), $MachinePrecision] + N[(y * N[(z / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t$95$1, 2e+298], t$95$1, N[(z / b), $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{z}{t} \cdot \frac{y}{\mathsf{fma}\left(y, \frac{b}{t}, a\right) + 1}\\
\mathbf{elif}\;t\_1 \leq -2 \cdot 10^{-322}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;\frac{t \cdot \frac{x}{b} + y \cdot \frac{z}{b}}{y}\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+298}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -inf.0Initial program 29.9%
associate-/l*65.3%
associate-/l*65.3%
Simplified65.3%
Taylor expanded in x around 0 28.8%
*-commutative28.8%
times-frac87.7%
+-commutative87.7%
associate-*l/87.7%
*-commutative87.7%
fma-define87.7%
Simplified87.7%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -1.97626e-322 or -0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 1.9999999999999999e298Initial program 99.1%
if -1.97626e-322 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -0.0Initial program 40.7%
associate-/l*40.6%
associate-/l*53.6%
Simplified53.6%
Taylor expanded in b around inf 57.8%
associate-/l*60.2%
associate-*r/57.7%
+-commutative57.7%
fma-undefine57.7%
*-commutative57.7%
Simplified57.7%
Taylor expanded in y around 0 84.9%
associate-/l*84.9%
associate-/l*85.0%
Simplified85.0%
if 1.9999999999999999e298 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) Initial program 3.8%
associate-/l*11.5%
associate-/l*16.5%
Simplified16.5%
Taylor expanded in y around inf 85.0%
Final simplification94.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (/ (* y z) t)) (+ (/ (* y b) t) (+ a 1.0))))
(t_2 (+ (+ a (/ y (/ t b))) 1.0)))
(if (<= t_1 (- INFINITY))
(* z (+ (/ (/ x z) t_2) (/ y (* t t_2))))
(if (<= t_1 -2e-322)
t_1
(if (<= t_1 0.0)
(/ (+ (* t (/ x b)) (* y (/ z b))) y)
(if (<= t_1 2e+298) 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)) / (((y * b) / t) + (a + 1.0));
double t_2 = (a + (y / (t / b))) + 1.0;
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = z * (((x / z) / t_2) + (y / (t * t_2)));
} else if (t_1 <= -2e-322) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = ((t * (x / b)) + (y * (z / b))) / y;
} else if (t_1 <= 2e+298) {
tmp = t_1;
} else {
tmp = z / b;
}
return tmp;
}
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 t_2 = (a + (y / (t / b))) + 1.0;
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = z * (((x / z) / t_2) + (y / (t * t_2)));
} else if (t_1 <= -2e-322) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = ((t * (x / b)) + (y * (z / b))) / y;
} else if (t_1 <= 2e+298) {
tmp = t_1;
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0)) t_2 = (a + (y / (t / b))) + 1.0 tmp = 0 if t_1 <= -math.inf: tmp = z * (((x / z) / t_2) + (y / (t * t_2))) elif t_1 <= -2e-322: tmp = t_1 elif t_1 <= 0.0: tmp = ((t * (x / b)) + (y * (z / b))) / y elif t_1 <= 2e+298: 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(Float64(y * b) / t) + Float64(a + 1.0))) t_2 = Float64(Float64(a + Float64(y / Float64(t / b))) + 1.0) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(z * Float64(Float64(Float64(x / z) / t_2) + Float64(y / Float64(t * t_2)))); elseif (t_1 <= -2e-322) tmp = t_1; elseif (t_1 <= 0.0) tmp = Float64(Float64(Float64(t * Float64(x / b)) + Float64(y * Float64(z / b))) / y); elseif (t_1 <= 2e+298) 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)) / (((y * b) / t) + (a + 1.0)); t_2 = (a + (y / (t / b))) + 1.0; tmp = 0.0; if (t_1 <= -Inf) tmp = z * (((x / z) / t_2) + (y / (t * t_2))); elseif (t_1 <= -2e-322) tmp = t_1; elseif (t_1 <= 0.0) tmp = ((t * (x / b)) + (y * (z / b))) / y; elseif (t_1 <= 2e+298) 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[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(a + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(z * N[(N[(N[(x / z), $MachinePrecision] / t$95$2), $MachinePrecision] + N[(y / N[(t * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -2e-322], t$95$1, If[LessEqual[t$95$1, 0.0], N[(N[(N[(t * N[(x / b), $MachinePrecision]), $MachinePrecision] + N[(y * N[(z / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t$95$1, 2e+298], t$95$1, N[(z / b), $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)}\\
t_2 := \left(a + \frac{y}{\frac{t}{b}}\right) + 1\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;z \cdot \left(\frac{\frac{x}{z}}{t\_2} + \frac{y}{t \cdot t\_2}\right)\\
\mathbf{elif}\;t\_1 \leq -2 \cdot 10^{-322}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;\frac{t \cdot \frac{x}{b} + y \cdot \frac{z}{b}}{y}\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+298}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -inf.0Initial program 29.9%
associate-/l*65.3%
associate-/l*65.3%
Simplified65.3%
Taylor expanded in z around inf 64.2%
associate-/r*73.7%
associate-*r/73.7%
*-commutative73.7%
associate-/r/73.7%
associate-*r/55.7%
*-commutative55.7%
associate-/r/73.7%
Simplified73.7%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -1.97626e-322 or -0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 1.9999999999999999e298Initial program 99.1%
if -1.97626e-322 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -0.0Initial program 40.7%
associate-/l*40.6%
associate-/l*53.6%
Simplified53.6%
Taylor expanded in b around inf 57.8%
associate-/l*60.2%
associate-*r/57.7%
+-commutative57.7%
fma-undefine57.7%
*-commutative57.7%
Simplified57.7%
Taylor expanded in y around 0 84.9%
associate-/l*84.9%
associate-/l*85.0%
Simplified85.0%
if 1.9999999999999999e298 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) Initial program 3.8%
associate-/l*11.5%
associate-/l*16.5%
Simplified16.5%
Taylor expanded in y around inf 85.0%
Final simplification93.8%
(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))
(- (/ x (+ a 1.0)) (* y (/ (/ z t) (- -1.0 a))))
(if (<= t_1 -2e-322)
t_1
(if (<= t_1 0.0)
(/ (+ (* t (/ x b)) (* y (/ z b))) y)
(if (<= t_1 2e+298) 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)) / (((y * b) / t) + (a + 1.0));
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = (x / (a + 1.0)) - (y * ((z / t) / (-1.0 - a)));
} else if (t_1 <= -2e-322) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = ((t * (x / b)) + (y * (z / b))) / y;
} else if (t_1 <= 2e+298) {
tmp = t_1;
} else {
tmp = z / b;
}
return tmp;
}
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 <= -Double.POSITIVE_INFINITY) {
tmp = (x / (a + 1.0)) - (y * ((z / t) / (-1.0 - a)));
} else if (t_1 <= -2e-322) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = ((t * (x / b)) + (y * (z / b))) / y;
} else if (t_1 <= 2e+298) {
tmp = t_1;
} else {
tmp = z / b;
}
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 <= -math.inf: tmp = (x / (a + 1.0)) - (y * ((z / t) / (-1.0 - a))) elif t_1 <= -2e-322: tmp = t_1 elif t_1 <= 0.0: tmp = ((t * (x / b)) + (y * (z / b))) / y elif t_1 <= 2e+298: 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(Float64(y * b) / t) + Float64(a + 1.0))) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(Float64(x / Float64(a + 1.0)) - Float64(y * Float64(Float64(z / t) / Float64(-1.0 - a)))); elseif (t_1 <= -2e-322) tmp = t_1; elseif (t_1 <= 0.0) tmp = Float64(Float64(Float64(t * Float64(x / b)) + Float64(y * Float64(z / b))) / y); elseif (t_1 <= 2e+298) 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)) / (((y * b) / t) + (a + 1.0)); tmp = 0.0; if (t_1 <= -Inf) tmp = (x / (a + 1.0)) - (y * ((z / t) / (-1.0 - a))); elseif (t_1 <= -2e-322) tmp = t_1; elseif (t_1 <= 0.0) tmp = ((t * (x / b)) + (y * (z / b))) / y; elseif (t_1 <= 2e+298) 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[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision] - N[(y * N[(N[(z / t), $MachinePrecision] / N[(-1.0 - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -2e-322], t$95$1, If[LessEqual[t$95$1, 0.0], N[(N[(N[(t * N[(x / b), $MachinePrecision]), $MachinePrecision] + N[(y * N[(z / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t$95$1, 2e+298], t$95$1, N[(z / b), $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{x}{a + 1} - y \cdot \frac{\frac{z}{t}}{-1 - a}\\
\mathbf{elif}\;t\_1 \leq -2 \cdot 10^{-322}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;\frac{t \cdot \frac{x}{b} + y \cdot \frac{z}{b}}{y}\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+298}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -inf.0Initial program 29.9%
associate-/l*65.3%
associate-/l*65.3%
Simplified65.3%
Taylor expanded in b around 0 20.3%
Taylor expanded in x around 0 19.2%
+-commutative19.2%
associate-/l*47.6%
associate-/r*73.5%
Simplified73.5%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -1.97626e-322 or -0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 1.9999999999999999e298Initial program 99.1%
if -1.97626e-322 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -0.0Initial program 40.7%
associate-/l*40.6%
associate-/l*53.6%
Simplified53.6%
Taylor expanded in b around inf 57.8%
associate-/l*60.2%
associate-*r/57.7%
+-commutative57.7%
fma-undefine57.7%
*-commutative57.7%
Simplified57.7%
Taylor expanded in y around 0 84.9%
associate-/l*84.9%
associate-/l*85.0%
Simplified85.0%
if 1.9999999999999999e298 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) Initial program 3.8%
associate-/l*11.5%
associate-/l*16.5%
Simplified16.5%
Taylor expanded in y around inf 85.0%
Final simplification93.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -8.2e-90) (not (<= t 2.2e-148))) (/ (+ x (* y (/ z t))) (+ (+ a 1.0) (/ y (/ t b)))) (+ (/ z b) (/ (* x t) (* y b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -8.2e-90) || !(t <= 2.2e-148)) {
tmp = (x + (y * (z / t))) / ((a + 1.0) + (y / (t / b)));
} else {
tmp = (z / b) + ((x * t) / (y * 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 <= (-8.2d-90)) .or. (.not. (t <= 2.2d-148))) then
tmp = (x + (y * (z / t))) / ((a + 1.0d0) + (y / (t / b)))
else
tmp = (z / b) + ((x * t) / (y * 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 <= -8.2e-90) || !(t <= 2.2e-148)) {
tmp = (x + (y * (z / t))) / ((a + 1.0) + (y / (t / b)));
} else {
tmp = (z / b) + ((x * t) / (y * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -8.2e-90) or not (t <= 2.2e-148): tmp = (x + (y * (z / t))) / ((a + 1.0) + (y / (t / b))) else: tmp = (z / b) + ((x * t) / (y * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -8.2e-90) || !(t <= 2.2e-148)) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(Float64(a + 1.0) + Float64(y / Float64(t / b)))); else tmp = Float64(Float64(z / b) + Float64(Float64(x * t) / Float64(y * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -8.2e-90) || ~((t <= 2.2e-148))) tmp = (x + (y * (z / t))) / ((a + 1.0) + (y / (t / b))); else tmp = (z / b) + ((x * t) / (y * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -8.2e-90], N[Not[LessEqual[t, 2.2e-148]], $MachinePrecision]], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z / b), $MachinePrecision] + N[(N[(x * t), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8.2 \cdot 10^{-90} \lor \neg \left(t \leq 2.2 \cdot 10^{-148}\right):\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + \frac{y}{\frac{t}{b}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\
\end{array}
\end{array}
if t < -8.2000000000000007e-90 or 2.20000000000000017e-148 < t Initial program 84.1%
associate-/l*86.9%
associate-/l*90.7%
Simplified90.7%
Taylor expanded in y around 0 86.9%
associate-*r/88.5%
*-commutative88.5%
associate-/r/90.8%
Simplified90.8%
if -8.2000000000000007e-90 < t < 2.20000000000000017e-148Initial program 48.8%
associate-/l*43.8%
associate-/l*37.6%
Simplified37.6%
Taylor expanded in b around inf 44.9%
associate-/l*43.1%
associate-*r/38.1%
+-commutative38.1%
fma-undefine38.1%
*-commutative38.1%
Simplified38.1%
Taylor expanded in t around 0 80.7%
Final simplification87.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -2.15e-87) (not (<= t 2.15e-148))) (/ (+ x (* y (/ z t))) (+ (+ a 1.0) (* y (/ b t)))) (+ (/ z b) (/ (* x t) (* y b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -2.15e-87) || !(t <= 2.15e-148)) {
tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t)));
} else {
tmp = (z / b) + ((x * t) / (y * 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.15d-87)) .or. (.not. (t <= 2.15d-148))) then
tmp = (x + (y * (z / t))) / ((a + 1.0d0) + (y * (b / t)))
else
tmp = (z / b) + ((x * t) / (y * 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.15e-87) || !(t <= 2.15e-148)) {
tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t)));
} else {
tmp = (z / b) + ((x * t) / (y * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -2.15e-87) or not (t <= 2.15e-148): tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t))) else: tmp = (z / b) + ((x * t) / (y * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -2.15e-87) || !(t <= 2.15e-148)) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(Float64(a + 1.0) + Float64(y * Float64(b / t)))); else tmp = Float64(Float64(z / b) + Float64(Float64(x * t) / Float64(y * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -2.15e-87) || ~((t <= 2.15e-148))) tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t))); else tmp = (z / b) + ((x * t) / (y * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -2.15e-87], N[Not[LessEqual[t, 2.15e-148]], $MachinePrecision]], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z / b), $MachinePrecision] + N[(N[(x * t), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.15 \cdot 10^{-87} \lor \neg \left(t \leq 2.15 \cdot 10^{-148}\right):\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\
\end{array}
\end{array}
if t < -2.14999999999999998e-87 or 2.1499999999999999e-148 < t Initial program 84.1%
associate-/l*86.9%
associate-/l*90.7%
Simplified90.7%
if -2.14999999999999998e-87 < t < 2.1499999999999999e-148Initial program 48.8%
associate-/l*43.8%
associate-/l*37.6%
Simplified37.6%
Taylor expanded in b around inf 44.9%
associate-/l*43.1%
associate-*r/38.1%
+-commutative38.1%
fma-undefine38.1%
*-commutative38.1%
Simplified38.1%
Taylor expanded in t around 0 80.7%
Final simplification87.7%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -9e-143)
(/ (+ x (* z (/ y t))) (+ (/ (* y b) t) (+ a 1.0)))
(if (<= t 2.2e-148)
(+ (/ z b) (/ (* x t) (* y b)))
(/ (+ x (* y (/ z t))) (+ (+ a 1.0) (/ y (/ t b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -9e-143) {
tmp = (x + (z * (y / t))) / (((y * b) / t) + (a + 1.0));
} else if (t <= 2.2e-148) {
tmp = (z / b) + ((x * t) / (y * b));
} else {
tmp = (x + (y * (z / t))) / ((a + 1.0) + (y / (t / 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 <= (-9d-143)) then
tmp = (x + (z * (y / t))) / (((y * b) / t) + (a + 1.0d0))
else if (t <= 2.2d-148) then
tmp = (z / b) + ((x * t) / (y * b))
else
tmp = (x + (y * (z / t))) / ((a + 1.0d0) + (y / (t / 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 <= -9e-143) {
tmp = (x + (z * (y / t))) / (((y * b) / t) + (a + 1.0));
} else if (t <= 2.2e-148) {
tmp = (z / b) + ((x * t) / (y * b));
} else {
tmp = (x + (y * (z / t))) / ((a + 1.0) + (y / (t / b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -9e-143: tmp = (x + (z * (y / t))) / (((y * b) / t) + (a + 1.0)) elif t <= 2.2e-148: tmp = (z / b) + ((x * t) / (y * b)) else: tmp = (x + (y * (z / t))) / ((a + 1.0) + (y / (t / b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -9e-143) tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(Float64(Float64(y * b) / t) + Float64(a + 1.0))); elseif (t <= 2.2e-148) tmp = Float64(Float64(z / b) + Float64(Float64(x * t) / Float64(y * b))); else tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(Float64(a + 1.0) + Float64(y / Float64(t / b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -9e-143) tmp = (x + (z * (y / t))) / (((y * b) / t) + (a + 1.0)); elseif (t <= 2.2e-148) tmp = (z / b) + ((x * t) / (y * b)); else tmp = (x + (y * (z / t))) / ((a + 1.0) + (y / (t / b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -9e-143], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.2e-148], N[(N[(z / b), $MachinePrecision] + N[(N[(x * t), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -9 \cdot 10^{-143}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\
\mathbf{elif}\;t \leq 2.2 \cdot 10^{-148}:\\
\;\;\;\;\frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + \frac{y}{\frac{t}{b}}}\\
\end{array}
\end{array}
if t < -9.00000000000000001e-143Initial program 85.2%
*-commutative85.2%
associate-/l*89.2%
Applied egg-rr89.2%
if -9.00000000000000001e-143 < t < 2.20000000000000017e-148Initial program 41.9%
associate-/l*36.2%
associate-/l*33.1%
Simplified33.1%
Taylor expanded in b around inf 41.6%
associate-/l*39.4%
associate-*r/33.7%
+-commutative33.7%
fma-undefine33.7%
*-commutative33.7%
Simplified33.7%
Taylor expanded in t around 0 81.8%
if 2.20000000000000017e-148 < t Initial program 83.8%
associate-/l*86.8%
associate-/l*90.7%
Simplified90.7%
Taylor expanded in y around 0 86.8%
associate-*r/86.8%
*-commutative86.8%
associate-/r/90.7%
Simplified90.7%
Final simplification87.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -2.5e-88) (not (<= t 2.7e-42))) (/ (+ x (* z (/ y t))) (+ a 1.0)) (+ (/ z b) (/ (* x t) (* y b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -2.5e-88) || !(t <= 2.7e-42)) {
tmp = (x + (z * (y / t))) / (a + 1.0);
} else {
tmp = (z / b) + ((x * t) / (y * 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.5d-88)) .or. (.not. (t <= 2.7d-42))) then
tmp = (x + (z * (y / t))) / (a + 1.0d0)
else
tmp = (z / b) + ((x * t) / (y * 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.5e-88) || !(t <= 2.7e-42)) {
tmp = (x + (z * (y / t))) / (a + 1.0);
} else {
tmp = (z / b) + ((x * t) / (y * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -2.5e-88) or not (t <= 2.7e-42): tmp = (x + (z * (y / t))) / (a + 1.0) else: tmp = (z / b) + ((x * t) / (y * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -2.5e-88) || !(t <= 2.7e-42)) tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(a + 1.0)); else tmp = Float64(Float64(z / b) + Float64(Float64(x * t) / Float64(y * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -2.5e-88) || ~((t <= 2.7e-42))) tmp = (x + (z * (y / t))) / (a + 1.0); else tmp = (z / b) + ((x * t) / (y * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -2.5e-88], N[Not[LessEqual[t, 2.7e-42]], $MachinePrecision]], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(z / b), $MachinePrecision] + N[(N[(x * t), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.5 \cdot 10^{-88} \lor \neg \left(t \leq 2.7 \cdot 10^{-42}\right):\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\
\end{array}
\end{array}
if t < -2.50000000000000004e-88 or 2.69999999999999999e-42 < t Initial program 84.2%
associate-/l*86.9%
associate-/l*91.5%
Simplified91.5%
Taylor expanded in b around 0 68.4%
*-commutative84.2%
associate-/l*87.2%
Applied egg-rr72.1%
if -2.50000000000000004e-88 < t < 2.69999999999999999e-42Initial program 58.3%
associate-/l*55.5%
associate-/l*50.9%
Simplified50.9%
Taylor expanded in b around inf 49.4%
associate-/l*48.1%
associate-*r/44.5%
+-commutative44.5%
fma-undefine44.5%
*-commutative44.5%
Simplified44.5%
Taylor expanded in t around 0 77.2%
Final simplification74.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -1.25e-88) (not (<= t 7.5e-22))) (/ x (+ (+ a (/ y (/ t b))) 1.0)) (+ (/ z b) (/ (* x t) (* y b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -1.25e-88) || !(t <= 7.5e-22)) {
tmp = x / ((a + (y / (t / b))) + 1.0);
} else {
tmp = (z / b) + ((x * t) / (y * 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.25d-88)) .or. (.not. (t <= 7.5d-22))) then
tmp = x / ((a + (y / (t / b))) + 1.0d0)
else
tmp = (z / b) + ((x * t) / (y * 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.25e-88) || !(t <= 7.5e-22)) {
tmp = x / ((a + (y / (t / b))) + 1.0);
} else {
tmp = (z / b) + ((x * t) / (y * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -1.25e-88) or not (t <= 7.5e-22): tmp = x / ((a + (y / (t / b))) + 1.0) else: tmp = (z / b) + ((x * t) / (y * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -1.25e-88) || !(t <= 7.5e-22)) tmp = Float64(x / Float64(Float64(a + Float64(y / Float64(t / b))) + 1.0)); else tmp = Float64(Float64(z / b) + Float64(Float64(x * t) / Float64(y * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -1.25e-88) || ~((t <= 7.5e-22))) tmp = x / ((a + (y / (t / b))) + 1.0); else tmp = (z / b) + ((x * t) / (y * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -1.25e-88], N[Not[LessEqual[t, 7.5e-22]], $MachinePrecision]], N[(x / N[(N[(a + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(z / b), $MachinePrecision] + N[(N[(x * t), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.25 \cdot 10^{-88} \lor \neg \left(t \leq 7.5 \cdot 10^{-22}\right):\\
\;\;\;\;\frac{x}{\left(a + \frac{y}{\frac{t}{b}}\right) + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\
\end{array}
\end{array}
if t < -1.25000000000000002e-88 or 7.49999999999999978e-22 < t Initial program 84.3%
associate-/l*87.1%
associate-/l*91.9%
Simplified91.9%
Taylor expanded in x around inf 65.6%
associate-*r/68.2%
*-commutative68.2%
associate-/r/68.2%
Simplified68.2%
if -1.25000000000000002e-88 < t < 7.49999999999999978e-22Initial program 58.9%
associate-/l*56.3%
associate-/l*51.9%
Simplified51.9%
Taylor expanded in b around inf 48.6%
associate-/l*47.4%
associate-*r/43.9%
+-commutative43.9%
fma-undefine43.9%
*-commutative43.9%
Simplified43.9%
Taylor expanded in t around 0 75.5%
Final simplification71.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -8.5e+35) (not (<= t 5e-23))) (/ x (+ a 1.0)) (+ (/ z b) (/ (* x t) (* y b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -8.5e+35) || !(t <= 5e-23)) {
tmp = x / (a + 1.0);
} else {
tmp = (z / b) + ((x * t) / (y * 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 <= (-8.5d+35)) .or. (.not. (t <= 5d-23))) then
tmp = x / (a + 1.0d0)
else
tmp = (z / b) + ((x * t) / (y * 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 <= -8.5e+35) || !(t <= 5e-23)) {
tmp = x / (a + 1.0);
} else {
tmp = (z / b) + ((x * t) / (y * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -8.5e+35) or not (t <= 5e-23): tmp = x / (a + 1.0) else: tmp = (z / b) + ((x * t) / (y * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -8.5e+35) || !(t <= 5e-23)) tmp = Float64(x / Float64(a + 1.0)); else tmp = Float64(Float64(z / b) + Float64(Float64(x * t) / Float64(y * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -8.5e+35) || ~((t <= 5e-23))) tmp = x / (a + 1.0); else tmp = (z / b) + ((x * t) / (y * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -8.5e+35], N[Not[LessEqual[t, 5e-23]], $MachinePrecision]], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(z / b), $MachinePrecision] + N[(N[(x * t), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8.5 \cdot 10^{+35} \lor \neg \left(t \leq 5 \cdot 10^{-23}\right):\\
\;\;\;\;\frac{x}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\
\end{array}
\end{array}
if t < -8.4999999999999995e35 or 5.0000000000000002e-23 < t Initial program 84.6%
associate-/l*88.7%
associate-/l*94.4%
Simplified94.4%
Taylor expanded in y around 0 58.7%
if -8.4999999999999995e35 < t < 5.0000000000000002e-23Initial program 63.1%
associate-/l*60.2%
associate-/l*56.5%
Simplified56.5%
Taylor expanded in b around inf 46.2%
associate-/l*45.1%
associate-*r/42.2%
+-commutative42.2%
fma-undefine42.2%
*-commutative42.2%
Simplified42.2%
Taylor expanded in t around 0 69.8%
Final simplification64.5%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -1e-88)
(/ (+ x (* z (/ y t))) (+ a 1.0))
(if (<= t 8.5e-43)
(+ (/ z b) (/ (* x t) (* y b)))
(/ (+ x (* y (/ z t))) (+ a 1.0)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1e-88) {
tmp = (x + (z * (y / t))) / (a + 1.0);
} else if (t <= 8.5e-43) {
tmp = (z / b) + ((x * t) / (y * b));
} else {
tmp = (x + (y * (z / t))) / (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 (t <= (-1d-88)) then
tmp = (x + (z * (y / t))) / (a + 1.0d0)
else if (t <= 8.5d-43) then
tmp = (z / b) + ((x * t) / (y * b))
else
tmp = (x + (y * (z / t))) / (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 (t <= -1e-88) {
tmp = (x + (z * (y / t))) / (a + 1.0);
} else if (t <= 8.5e-43) {
tmp = (z / b) + ((x * t) / (y * b));
} else {
tmp = (x + (y * (z / t))) / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -1e-88: tmp = (x + (z * (y / t))) / (a + 1.0) elif t <= 8.5e-43: tmp = (z / b) + ((x * t) / (y * b)) else: tmp = (x + (y * (z / t))) / (a + 1.0) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -1e-88) tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(a + 1.0)); elseif (t <= 8.5e-43) tmp = Float64(Float64(z / b) + Float64(Float64(x * t) / Float64(y * b))); else tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(a + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -1e-88) tmp = (x + (z * (y / t))) / (a + 1.0); elseif (t <= 8.5e-43) tmp = (z / b) + ((x * t) / (y * b)); else tmp = (x + (y * (z / t))) / (a + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -1e-88], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8.5e-43], N[(N[(z / b), $MachinePrecision] + N[(N[(x * t), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1 \cdot 10^{-88}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + 1}\\
\mathbf{elif}\;t \leq 8.5 \cdot 10^{-43}:\\
\;\;\;\;\frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + 1}\\
\end{array}
\end{array}
if t < -9.99999999999999934e-89Initial program 84.4%
associate-/l*87.0%
associate-/l*90.8%
Simplified90.8%
Taylor expanded in b around 0 69.5%
*-commutative84.4%
associate-/l*89.0%
Applied egg-rr74.1%
if -9.99999999999999934e-89 < t < 8.50000000000000056e-43Initial program 58.3%
associate-/l*55.5%
associate-/l*50.9%
Simplified50.9%
Taylor expanded in b around inf 49.4%
associate-/l*48.1%
associate-*r/44.5%
+-commutative44.5%
fma-undefine44.5%
*-commutative44.5%
Simplified44.5%
Taylor expanded in t around 0 77.2%
if 8.50000000000000056e-43 < t Initial program 83.9%
associate-/l*86.7%
associate-/l*92.2%
Simplified92.2%
Taylor expanded in b around 0 67.2%
associate-*r/72.5%
*-commutative72.5%
Applied egg-rr72.5%
Final simplification74.9%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -1.52e-89)
(/ x (+ (+ a (/ y (/ t b))) 1.0))
(if (<= t 1.9e-23)
(+ (/ z b) (/ (* x t) (* y b)))
(/ x (+ (+ a 1.0) (* y (/ b t)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1.52e-89) {
tmp = x / ((a + (y / (t / b))) + 1.0);
} else if (t <= 1.9e-23) {
tmp = (z / b) + ((x * t) / (y * b));
} else {
tmp = x / ((a + 1.0) + (y * (b / 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 (t <= (-1.52d-89)) then
tmp = x / ((a + (y / (t / b))) + 1.0d0)
else if (t <= 1.9d-23) then
tmp = (z / b) + ((x * t) / (y * b))
else
tmp = x / ((a + 1.0d0) + (y * (b / 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 (t <= -1.52e-89) {
tmp = x / ((a + (y / (t / b))) + 1.0);
} else if (t <= 1.9e-23) {
tmp = (z / b) + ((x * t) / (y * b));
} else {
tmp = x / ((a + 1.0) + (y * (b / t)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -1.52e-89: tmp = x / ((a + (y / (t / b))) + 1.0) elif t <= 1.9e-23: tmp = (z / b) + ((x * t) / (y * b)) else: tmp = x / ((a + 1.0) + (y * (b / t))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -1.52e-89) tmp = Float64(x / Float64(Float64(a + Float64(y / Float64(t / b))) + 1.0)); elseif (t <= 1.9e-23) tmp = Float64(Float64(z / b) + Float64(Float64(x * t) / Float64(y * b))); else tmp = Float64(x / Float64(Float64(a + 1.0) + Float64(y * Float64(b / t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -1.52e-89) tmp = x / ((a + (y / (t / b))) + 1.0); elseif (t <= 1.9e-23) tmp = (z / b) + ((x * t) / (y * b)); else tmp = x / ((a + 1.0) + (y * (b / t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -1.52e-89], N[(x / N[(N[(a + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.9e-23], N[(N[(z / b), $MachinePrecision] + N[(N[(x * t), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[(a + 1.0), $MachinePrecision] + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.52 \cdot 10^{-89}:\\
\;\;\;\;\frac{x}{\left(a + \frac{y}{\frac{t}{b}}\right) + 1}\\
\mathbf{elif}\;t \leq 1.9 \cdot 10^{-23}:\\
\;\;\;\;\frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
\end{array}
\end{array}
if t < -1.52e-89Initial program 84.4%
associate-/l*87.0%
associate-/l*90.8%
Simplified90.8%
Taylor expanded in x around inf 63.1%
associate-*r/65.7%
*-commutative65.7%
associate-/r/65.7%
Simplified65.7%
if -1.52e-89 < t < 1.90000000000000006e-23Initial program 58.9%
associate-/l*56.3%
associate-/l*51.9%
Simplified51.9%
Taylor expanded in b around inf 48.6%
associate-/l*47.4%
associate-*r/43.9%
+-commutative43.9%
fma-undefine43.9%
*-commutative43.9%
Simplified43.9%
Taylor expanded in t around 0 75.5%
if 1.90000000000000006e-23 < t Initial program 84.3%
associate-/l*87.3%
associate-/l*93.0%
Simplified93.0%
Taylor expanded in x around inf 70.9%
Final simplification71.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -4.2e-87) (not (<= t 18500000000.0))) (/ x (+ a 1.0)) (/ z b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -4.2e-87) || !(t <= 18500000000.0)) {
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 <= (-4.2d-87)) .or. (.not. (t <= 18500000000.0d0))) 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 <= -4.2e-87) || !(t <= 18500000000.0)) {
tmp = x / (a + 1.0);
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -4.2e-87) or not (t <= 18500000000.0): tmp = x / (a + 1.0) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -4.2e-87) || !(t <= 18500000000.0)) 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 <= -4.2e-87) || ~((t <= 18500000000.0))) 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, -4.2e-87], N[Not[LessEqual[t, 18500000000.0]], $MachinePrecision]], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.2 \cdot 10^{-87} \lor \neg \left(t \leq 18500000000\right):\\
\;\;\;\;\frac{x}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if t < -4.20000000000000014e-87 or 1.85e10 < t Initial program 84.1%
associate-/l*87.0%
associate-/l*91.8%
Simplified91.8%
Taylor expanded in y around 0 55.9%
if -4.20000000000000014e-87 < t < 1.85e10Initial program 59.7%
associate-/l*57.0%
associate-/l*52.8%
Simplified52.8%
Taylor expanded in y around inf 62.3%
Final simplification58.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -1.65e+43) (not (<= t 6.8e+65))) (/ x a) (/ z b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -1.65e+43) || !(t <= 6.8e+65)) {
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 ((t <= (-1.65d+43)) .or. (.not. (t <= 6.8d+65))) 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 ((t <= -1.65e+43) || !(t <= 6.8e+65)) {
tmp = x / a;
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -1.65e+43) or not (t <= 6.8e+65): tmp = x / a else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -1.65e+43) || !(t <= 6.8e+65)) 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 ((t <= -1.65e+43) || ~((t <= 6.8e+65))) tmp = x / a; else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -1.65e+43], N[Not[LessEqual[t, 6.8e+65]], $MachinePrecision]], N[(x / a), $MachinePrecision], N[(z / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.65 \cdot 10^{+43} \lor \neg \left(t \leq 6.8 \cdot 10^{+65}\right):\\
\;\;\;\;\frac{x}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if t < -1.6500000000000001e43 or 6.7999999999999999e65 < t Initial program 84.4%
associate-/l*89.1%
associate-/l*95.4%
Simplified95.4%
Taylor expanded in y around 0 89.1%
associate-*r/95.4%
*-commutative95.4%
associate-/r/95.4%
Simplified95.4%
Taylor expanded in x around inf 71.6%
Taylor expanded in a around inf 38.1%
if -1.6500000000000001e43 < t < 6.7999999999999999e65Initial program 65.3%
associate-/l*62.6%
associate-/l*59.3%
Simplified59.3%
Taylor expanded in y around inf 55.0%
Final simplification47.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -1.0) (not (<= a 1.0))) (/ x a) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -1.0) || !(a <= 1.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 <= (-1.0d0)) .or. (.not. (a <= 1.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 <= -1.0) || !(a <= 1.0)) {
tmp = x / a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -1.0) or not (a <= 1.0): tmp = x / a else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -1.0) || !(a <= 1.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 <= -1.0) || ~((a <= 1.0))) tmp = x / a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -1.0], N[Not[LessEqual[a, 1.0]], $MachinePrecision]], N[(x / a), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1 \lor \neg \left(a \leq 1\right):\\
\;\;\;\;\frac{x}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -1 or 1 < a Initial program 69.3%
associate-/l*70.1%
associate-/l*72.5%
Simplified72.5%
Taylor expanded in y around 0 70.1%
associate-*r/70.9%
*-commutative70.9%
associate-/r/72.5%
Simplified72.5%
Taylor expanded in x around inf 51.0%
Taylor expanded in a around inf 43.0%
if -1 < a < 1Initial program 77.9%
associate-/l*78.0%
associate-/l*77.0%
Simplified77.0%
Taylor expanded in b around 0 40.7%
Taylor expanded in a around 0 38.9%
*-commutative77.9%
associate-/l*74.8%
Applied egg-rr39.7%
Taylor expanded in x around inf 28.9%
Final simplification36.5%
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
return x;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x;
}
def code(x, y, z, t, a, b): return x
function code(x, y, z, t, a, b) return x end
function tmp = code(x, y, z, t, a, b) tmp = x; end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 73.3%
associate-/l*73.8%
associate-/l*74.5%
Simplified74.5%
Taylor expanded in b around 0 48.5%
Taylor expanded in a around 0 20.2%
*-commutative73.3%
associate-/l*72.1%
Applied egg-rr20.6%
Taylor expanded in x around inf 15.5%
(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 2024148
(FPCore (x y z t a b)
:name "Diagrams.Solve.Tridiagonal:solveCyclicTriDiagonal from diagrams-solve-0.1, B"
:precision binary64
:alt
(! :herbie-platform default (if (< t -1707385670788761/12500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (* 1 (* (+ x (* (/ y t) z)) (/ 1 (+ (+ a 1) (* (/ y t) b))))) (if (< t 1518483551868623/5000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (/ z b) (* 1 (* (+ x (* (/ y t) z)) (/ 1 (+ (+ a 1) (* (/ y t) b))))))))
(/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t))))