
(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 (/ (* y b) t))
(t_2 (/ (+ x (/ (* y z) t)) (+ t_1 (+ a 1.0))))
(t_3
(+
(/ x (+ 1.0 (+ a t_1)))
(/ 1.0 (* (/ t y) (/ (+ 1.0 (+ a (* y (/ b t)))) z))))))
(if (<= t_2 (- INFINITY))
t_3
(if (<= t_2 5e+245) t_2 (if (<= t_2 INFINITY) t_3 (/ z b))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * b) / t;
double t_2 = (x + ((y * z) / t)) / (t_1 + (a + 1.0));
double t_3 = (x / (1.0 + (a + t_1))) + (1.0 / ((t / y) * ((1.0 + (a + (y * (b / t)))) / z)));
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = t_3;
} else if (t_2 <= 5e+245) {
tmp = t_2;
} else if (t_2 <= ((double) INFINITY)) {
tmp = t_3;
} 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 = (y * b) / t;
double t_2 = (x + ((y * z) / t)) / (t_1 + (a + 1.0));
double t_3 = (x / (1.0 + (a + t_1))) + (1.0 / ((t / y) * ((1.0 + (a + (y * (b / t)))) / z)));
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = t_3;
} else if (t_2 <= 5e+245) {
tmp = t_2;
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = t_3;
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (y * b) / t t_2 = (x + ((y * z) / t)) / (t_1 + (a + 1.0)) t_3 = (x / (1.0 + (a + t_1))) + (1.0 / ((t / y) * ((1.0 + (a + (y * (b / t)))) / z))) tmp = 0 if t_2 <= -math.inf: tmp = t_3 elif t_2 <= 5e+245: tmp = t_2 elif t_2 <= math.inf: tmp = t_3 else: tmp = z / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y * b) / t) t_2 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(t_1 + Float64(a + 1.0))) t_3 = Float64(Float64(x / Float64(1.0 + Float64(a + t_1))) + Float64(1.0 / Float64(Float64(t / y) * Float64(Float64(1.0 + Float64(a + Float64(y * Float64(b / t)))) / z)))) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = t_3; elseif (t_2 <= 5e+245) tmp = t_2; elseif (t_2 <= Inf) tmp = t_3; else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (y * b) / t; t_2 = (x + ((y * z) / t)) / (t_1 + (a + 1.0)); t_3 = (x / (1.0 + (a + t_1))) + (1.0 / ((t / y) * ((1.0 + (a + (y * (b / t)))) / z))); tmp = 0.0; if (t_2 <= -Inf) tmp = t_3; elseif (t_2 <= 5e+245) tmp = t_2; elseif (t_2 <= Inf) tmp = t_3; else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(t$95$1 + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x / N[(1.0 + N[(a + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(N[(t / y), $MachinePrecision] * N[(N[(1.0 + N[(a + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$3, If[LessEqual[t$95$2, 5e+245], t$95$2, If[LessEqual[t$95$2, Infinity], t$95$3, N[(z / b), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot b}{t}\\
t_2 := \frac{x + \frac{y \cdot z}{t}}{t_1 + \left(a + 1\right)}\\
t_3 := \frac{x}{1 + \left(a + t_1\right)} + \frac{1}{\frac{t}{y} \cdot \frac{1 + \left(a + y \cdot \frac{b}{t}\right)}{z}}\\
\mathbf{if}\;t_2 \leq -\infty:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t_2 \leq 5 \cdot 10^{+245}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t_2 \leq \infty:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -inf.0 or 5.00000000000000034e245 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < +inf.0Initial program 37.6%
*-commutative37.6%
associate-*l/70.8%
*-commutative70.8%
associate-*l/70.8%
Simplified70.8%
Taylor expanded in x around 0 53.2%
clear-num53.1%
inv-pow53.1%
times-frac88.0%
associate-/l*82.5%
Applied egg-rr82.5%
unpow-182.5%
associate-/r/88.0%
*-commutative88.0%
Simplified88.0%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 5.00000000000000034e245Initial program 92.9%
if +inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) Initial program 0.0%
*-commutative0.0%
associate-*l/0.6%
*-commutative0.6%
associate-*l/12.6%
Simplified12.6%
Taylor expanded in t around 0 93.7%
Final simplification92.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 (- INFINITY))
(/ (+ x (/ z (/ t y))) (+ a (+ 1.0 (/ y (/ t b)))))
(if (<= t_1 2e+286)
t_1
(if (<= t_1 INFINITY)
(* (/ y t) (/ z (+ 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 + ((y * z) / t)) / (((y * b) / t) + (a + 1.0));
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = (x + (z / (t / y))) / (a + (1.0 + (y / (t / b))));
} else if (t_1 <= 2e+286) {
tmp = t_1;
} else if (t_1 <= ((double) INFINITY)) {
tmp = (y / t) * (z / (1.0 + (a + (y * (b / t)))));
} 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 + (z / (t / y))) / (a + (1.0 + (y / (t / b))));
} else if (t_1 <= 2e+286) {
tmp = t_1;
} else if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = (y / t) * (z / (1.0 + (a + (y * (b / t)))));
} 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 + (z / (t / y))) / (a + (1.0 + (y / (t / b)))) elif t_1 <= 2e+286: tmp = t_1 elif t_1 <= math.inf: tmp = (y / t) * (z / (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(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(z / Float64(t / y))) / Float64(a + Float64(1.0 + Float64(y / Float64(t / b))))); elseif (t_1 <= 2e+286) tmp = t_1; elseif (t_1 <= Inf) tmp = Float64(Float64(y / t) * Float64(z / 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 + ((y * z) / t)) / (((y * b) / t) + (a + 1.0)); tmp = 0.0; if (t_1 <= -Inf) tmp = (x + (z / (t / y))) / (a + (1.0 + (y / (t / b)))); elseif (t_1 <= 2e+286) tmp = t_1; elseif (t_1 <= Inf) tmp = (y / t) * (z / (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[(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[(z / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + N[(1.0 + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+286], t$95$1, If[LessEqual[t$95$1, Infinity], N[(N[(y / t), $MachinePrecision] * N[(z / N[(1.0 + N[(a + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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 + \frac{z}{\frac{t}{y}}}{a + \left(1 + \frac{y}{\frac{t}{b}}\right)}\\
\mathbf{elif}\;t_1 \leq 2 \cdot 10^{+286}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_1 \leq \infty:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{1 + \left(a + y \cdot \frac{b}{t}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -inf.0Initial program 36.3%
*-commutative36.3%
associate-/l*74.9%
associate-*l/60.5%
*-commutative60.5%
cancel-sign-sub60.5%
*-commutative60.5%
associate-*l/74.9%
associate-+r-74.9%
associate-*l/60.5%
*-commutative60.5%
cancel-sign-sub60.5%
*-commutative60.5%
associate-/r/74.9%
Simplified74.9%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 2.00000000000000007e286Initial program 92.9%
if 2.00000000000000007e286 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < +inf.0Initial program 22.4%
*-commutative22.4%
associate-*l/65.7%
*-commutative65.7%
associate-*l/65.7%
Simplified65.7%
frac-2neg65.7%
div-inv66.0%
+-commutative66.0%
associate-/r/65.8%
div-inv65.8%
fma-def65.8%
clear-num66.0%
+-commutative66.0%
*-commutative66.0%
fma-def66.0%
Applied egg-rr66.0%
fma-udef66.0%
associate-*r/22.4%
associate-*l/66.0%
*-commutative66.0%
fma-udef66.0%
+-commutative66.0%
fma-def66.0%
associate-+r+66.0%
fma-udef66.0%
+-commutative66.0%
Simplified66.0%
Taylor expanded in z around inf 29.9%
times-frac91.2%
*-commutative91.2%
associate-*r/91.2%
Simplified91.2%
if +inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) Initial program 0.0%
*-commutative0.0%
associate-*l/0.6%
*-commutative0.6%
associate-*l/12.6%
Simplified12.6%
Taylor expanded in t around 0 93.7%
Final simplification91.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (/ z (/ t y))) (+ a (+ 1.0 (/ y (/ t b)))))))
(if (<= t -1.05e-125)
t_1
(if (<= t 8e-253)
(/ z b)
(if (<= t 5.1e-144)
t_1
(if (<= t 8.5e-114)
(/ (+ (* y z) (* x t)) (* y b))
(/ (+ x (* y (/ z t))) (+ (* y (/ b t)) (+ a 1.0)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + (z / (t / y))) / (a + (1.0 + (y / (t / b))));
double tmp;
if (t <= -1.05e-125) {
tmp = t_1;
} else if (t <= 8e-253) {
tmp = z / b;
} else if (t <= 5.1e-144) {
tmp = t_1;
} else if (t <= 8.5e-114) {
tmp = ((y * z) + (x * t)) / (y * b);
} else {
tmp = (x + (y * (z / t))) / ((y * (b / 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) :: t_1
real(8) :: tmp
t_1 = (x + (z / (t / y))) / (a + (1.0d0 + (y / (t / b))))
if (t <= (-1.05d-125)) then
tmp = t_1
else if (t <= 8d-253) then
tmp = z / b
else if (t <= 5.1d-144) then
tmp = t_1
else if (t <= 8.5d-114) then
tmp = ((y * z) + (x * t)) / (y * b)
else
tmp = (x + (y * (z / t))) / ((y * (b / 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 t_1 = (x + (z / (t / y))) / (a + (1.0 + (y / (t / b))));
double tmp;
if (t <= -1.05e-125) {
tmp = t_1;
} else if (t <= 8e-253) {
tmp = z / b;
} else if (t <= 5.1e-144) {
tmp = t_1;
} else if (t <= 8.5e-114) {
tmp = ((y * z) + (x * t)) / (y * b);
} else {
tmp = (x + (y * (z / t))) / ((y * (b / t)) + (a + 1.0));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + (z / (t / y))) / (a + (1.0 + (y / (t / b)))) tmp = 0 if t <= -1.05e-125: tmp = t_1 elif t <= 8e-253: tmp = z / b elif t <= 5.1e-144: tmp = t_1 elif t <= 8.5e-114: tmp = ((y * z) + (x * t)) / (y * b) else: tmp = (x + (y * (z / t))) / ((y * (b / t)) + (a + 1.0)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(z / Float64(t / y))) / Float64(a + Float64(1.0 + Float64(y / Float64(t / b))))) tmp = 0.0 if (t <= -1.05e-125) tmp = t_1; elseif (t <= 8e-253) tmp = Float64(z / b); elseif (t <= 5.1e-144) tmp = t_1; elseif (t <= 8.5e-114) tmp = Float64(Float64(Float64(y * z) + Float64(x * t)) / Float64(y * b)); else tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(Float64(y * Float64(b / t)) + Float64(a + 1.0))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x + (z / (t / y))) / (a + (1.0 + (y / (t / b)))); tmp = 0.0; if (t <= -1.05e-125) tmp = t_1; elseif (t <= 8e-253) tmp = z / b; elseif (t <= 5.1e-144) tmp = t_1; elseif (t <= 8.5e-114) tmp = ((y * z) + (x * t)) / (y * b); else tmp = (x + (y * (z / t))) / ((y * (b / t)) + (a + 1.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = 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]}, If[LessEqual[t, -1.05e-125], t$95$1, If[LessEqual[t, 8e-253], N[(z / b), $MachinePrecision], If[LessEqual[t, 5.1e-144], t$95$1, If[LessEqual[t, 8.5e-114], N[(N[(N[(y * z), $MachinePrecision] + N[(x * t), $MachinePrecision]), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + \frac{z}{\frac{t}{y}}}{a + \left(1 + \frac{y}{\frac{t}{b}}\right)}\\
\mathbf{if}\;t \leq -1.05 \cdot 10^{-125}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 8 \cdot 10^{-253}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;t \leq 5.1 \cdot 10^{-144}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 8.5 \cdot 10^{-114}:\\
\;\;\;\;\frac{y \cdot z + x \cdot t}{y \cdot b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{y \cdot \frac{b}{t} + \left(a + 1\right)}\\
\end{array}
\end{array}
if t < -1.05e-125 or 8.0000000000000005e-253 < t < 5.1e-144Initial program 84.9%
*-commutative84.9%
associate-/l*87.9%
associate-*l/88.7%
*-commutative88.7%
cancel-sign-sub88.7%
*-commutative88.7%
associate-*l/87.9%
associate-+r-87.9%
associate-*l/88.7%
*-commutative88.7%
cancel-sign-sub88.7%
*-commutative88.7%
associate-/r/87.9%
Simplified87.9%
if -1.05e-125 < t < 8.0000000000000005e-253Initial program 62.7%
*-commutative62.7%
associate-*l/48.4%
*-commutative48.4%
associate-*l/41.1%
Simplified41.1%
Taylor expanded in t around 0 69.5%
if 5.1e-144 < t < 8.5000000000000006e-114Initial program 51.9%
*-commutative51.9%
associate-*l/51.9%
*-commutative51.9%
associate-*l/19.6%
Simplified19.6%
Taylor expanded in b around inf 68.6%
Taylor expanded in t around 0 83.7%
if 8.5000000000000006e-114 < t Initial program 79.2%
*-commutative79.2%
associate-*l/85.8%
*-commutative85.8%
associate-*l/92.2%
Simplified92.2%
Final simplification85.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* z (/ y t)))) (t_2 (/ t_1 a)))
(if (<= a -1.0)
t_2
(if (<= a -3.4e-133)
t_1
(if (<= a 6.4e-238)
(/ x (+ 1.0 (* y (/ b t))))
(if (<= a 5.5e-117)
(/ z b)
(if (<= a 6e-67)
t_1
(if (<= a 1e+25) (* (/ t b) (+ (/ z t) (/ x y))) 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 = t_1 / a;
double tmp;
if (a <= -1.0) {
tmp = t_2;
} else if (a <= -3.4e-133) {
tmp = t_1;
} else if (a <= 6.4e-238) {
tmp = x / (1.0 + (y * (b / t)));
} else if (a <= 5.5e-117) {
tmp = z / b;
} else if (a <= 6e-67) {
tmp = t_1;
} else if (a <= 1e+25) {
tmp = (t / b) * ((z / t) + (x / y));
} 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 = t_1 / a
if (a <= (-1.0d0)) then
tmp = t_2
else if (a <= (-3.4d-133)) then
tmp = t_1
else if (a <= 6.4d-238) then
tmp = x / (1.0d0 + (y * (b / t)))
else if (a <= 5.5d-117) then
tmp = z / b
else if (a <= 6d-67) then
tmp = t_1
else if (a <= 1d+25) then
tmp = (t / b) * ((z / t) + (x / y))
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 = t_1 / a;
double tmp;
if (a <= -1.0) {
tmp = t_2;
} else if (a <= -3.4e-133) {
tmp = t_1;
} else if (a <= 6.4e-238) {
tmp = x / (1.0 + (y * (b / t)));
} else if (a <= 5.5e-117) {
tmp = z / b;
} else if (a <= 6e-67) {
tmp = t_1;
} else if (a <= 1e+25) {
tmp = (t / b) * ((z / t) + (x / y));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (z * (y / t)) t_2 = t_1 / a tmp = 0 if a <= -1.0: tmp = t_2 elif a <= -3.4e-133: tmp = t_1 elif a <= 6.4e-238: tmp = x / (1.0 + (y * (b / t))) elif a <= 5.5e-117: tmp = z / b elif a <= 6e-67: tmp = t_1 elif a <= 1e+25: tmp = (t / b) * ((z / t) + (x / y)) 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(t_1 / a) tmp = 0.0 if (a <= -1.0) tmp = t_2; elseif (a <= -3.4e-133) tmp = t_1; elseif (a <= 6.4e-238) tmp = Float64(x / Float64(1.0 + Float64(y * Float64(b / t)))); elseif (a <= 5.5e-117) tmp = Float64(z / b); elseif (a <= 6e-67) tmp = t_1; elseif (a <= 1e+25) tmp = Float64(Float64(t / b) * Float64(Float64(z / t) + Float64(x / y))); 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 = t_1 / a; tmp = 0.0; if (a <= -1.0) tmp = t_2; elseif (a <= -3.4e-133) tmp = t_1; elseif (a <= 6.4e-238) tmp = x / (1.0 + (y * (b / t))); elseif (a <= 5.5e-117) tmp = z / b; elseif (a <= 6e-67) tmp = t_1; elseif (a <= 1e+25) tmp = (t / b) * ((z / t) + (x / y)); 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[(t$95$1 / a), $MachinePrecision]}, If[LessEqual[a, -1.0], t$95$2, If[LessEqual[a, -3.4e-133], t$95$1, If[LessEqual[a, 6.4e-238], N[(x / N[(1.0 + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 5.5e-117], N[(z / b), $MachinePrecision], If[LessEqual[a, 6e-67], t$95$1, If[LessEqual[a, 1e+25], N[(N[(t / b), $MachinePrecision] * N[(N[(z / t), $MachinePrecision] + N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + z \cdot \frac{y}{t}\\
t_2 := \frac{t_1}{a}\\
\mathbf{if}\;a \leq -1:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \leq -3.4 \cdot 10^{-133}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 6.4 \cdot 10^{-238}:\\
\;\;\;\;\frac{x}{1 + y \cdot \frac{b}{t}}\\
\mathbf{elif}\;a \leq 5.5 \cdot 10^{-117}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;a \leq 6 \cdot 10^{-67}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 10^{+25}:\\
\;\;\;\;\frac{t}{b} \cdot \left(\frac{z}{t} + \frac{x}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if a < -1 or 1.00000000000000009e25 < a Initial program 79.8%
*-commutative79.8%
associate-*l/79.1%
*-commutative79.1%
associate-*l/77.0%
Simplified77.0%
Taylor expanded in b around 0 68.2%
Taylor expanded in a around inf 67.5%
associate-*l/69.9%
*-commutative69.9%
Simplified69.9%
if -1 < a < -3.40000000000000006e-133 or 5.50000000000000025e-117 < a < 6.00000000000000065e-67Initial program 89.5%
*-commutative89.5%
associate-*l/94.0%
*-commutative94.0%
associate-*l/91.4%
Simplified91.4%
Taylor expanded in b around 0 74.4%
Taylor expanded in a around 0 72.3%
associate-*l/80.0%
*-commutative80.0%
Simplified80.0%
if -3.40000000000000006e-133 < a < 6.4000000000000005e-238Initial program 86.7%
*-commutative86.7%
associate-*l/82.5%
*-commutative82.5%
associate-*l/80.2%
Simplified80.2%
Taylor expanded in x around inf 73.3%
Taylor expanded in a around 0 73.3%
associate-*l/71.0%
*-commutative71.0%
Simplified71.0%
if 6.4000000000000005e-238 < a < 5.50000000000000025e-117Initial program 59.1%
*-commutative59.1%
associate-*l/52.4%
*-commutative52.4%
associate-*l/51.9%
Simplified51.9%
Taylor expanded in t around 0 71.6%
if 6.00000000000000065e-67 < a < 1.00000000000000009e25Initial program 48.9%
*-commutative48.9%
associate-*l/53.6%
*-commutative53.6%
associate-*l/67.4%
Simplified67.4%
Taylor expanded in b around inf 35.0%
times-frac35.4%
+-commutative35.4%
associate-*l/39.9%
*-commutative39.9%
fma-udef39.9%
Simplified39.9%
Taylor expanded in z around 0 56.5%
Final simplification70.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* z (/ y t)))) (t_2 (/ t_1 a)))
(if (<= a -1.0)
t_2
(if (<= a -2.4e-133)
t_1
(if (<= a 7e-236)
(/ x (+ 1.0 (* y (/ b t))))
(if (<= a 2.9e-117)
(/ z b)
(if (<= a 6.2e-67) t_1 (if (<= a 6.5e+26) (/ z b) 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 = t_1 / a;
double tmp;
if (a <= -1.0) {
tmp = t_2;
} else if (a <= -2.4e-133) {
tmp = t_1;
} else if (a <= 7e-236) {
tmp = x / (1.0 + (y * (b / t)));
} else if (a <= 2.9e-117) {
tmp = z / b;
} else if (a <= 6.2e-67) {
tmp = t_1;
} else if (a <= 6.5e+26) {
tmp = z / b;
} 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 = t_1 / a
if (a <= (-1.0d0)) then
tmp = t_2
else if (a <= (-2.4d-133)) then
tmp = t_1
else if (a <= 7d-236) then
tmp = x / (1.0d0 + (y * (b / t)))
else if (a <= 2.9d-117) then
tmp = z / b
else if (a <= 6.2d-67) then
tmp = t_1
else if (a <= 6.5d+26) then
tmp = z / b
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 = t_1 / a;
double tmp;
if (a <= -1.0) {
tmp = t_2;
} else if (a <= -2.4e-133) {
tmp = t_1;
} else if (a <= 7e-236) {
tmp = x / (1.0 + (y * (b / t)));
} else if (a <= 2.9e-117) {
tmp = z / b;
} else if (a <= 6.2e-67) {
tmp = t_1;
} else if (a <= 6.5e+26) {
tmp = z / b;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (z * (y / t)) t_2 = t_1 / a tmp = 0 if a <= -1.0: tmp = t_2 elif a <= -2.4e-133: tmp = t_1 elif a <= 7e-236: tmp = x / (1.0 + (y * (b / t))) elif a <= 2.9e-117: tmp = z / b elif a <= 6.2e-67: tmp = t_1 elif a <= 6.5e+26: tmp = z / b 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(t_1 / a) tmp = 0.0 if (a <= -1.0) tmp = t_2; elseif (a <= -2.4e-133) tmp = t_1; elseif (a <= 7e-236) tmp = Float64(x / Float64(1.0 + Float64(y * Float64(b / t)))); elseif (a <= 2.9e-117) tmp = Float64(z / b); elseif (a <= 6.2e-67) tmp = t_1; elseif (a <= 6.5e+26) tmp = Float64(z / b); 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 = t_1 / a; tmp = 0.0; if (a <= -1.0) tmp = t_2; elseif (a <= -2.4e-133) tmp = t_1; elseif (a <= 7e-236) tmp = x / (1.0 + (y * (b / t))); elseif (a <= 2.9e-117) tmp = z / b; elseif (a <= 6.2e-67) tmp = t_1; elseif (a <= 6.5e+26) tmp = z / b; 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[(t$95$1 / a), $MachinePrecision]}, If[LessEqual[a, -1.0], t$95$2, If[LessEqual[a, -2.4e-133], t$95$1, If[LessEqual[a, 7e-236], N[(x / N[(1.0 + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.9e-117], N[(z / b), $MachinePrecision], If[LessEqual[a, 6.2e-67], t$95$1, If[LessEqual[a, 6.5e+26], N[(z / b), $MachinePrecision], t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + z \cdot \frac{y}{t}\\
t_2 := \frac{t_1}{a}\\
\mathbf{if}\;a \leq -1:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \leq -2.4 \cdot 10^{-133}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 7 \cdot 10^{-236}:\\
\;\;\;\;\frac{x}{1 + y \cdot \frac{b}{t}}\\
\mathbf{elif}\;a \leq 2.9 \cdot 10^{-117}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;a \leq 6.2 \cdot 10^{-67}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 6.5 \cdot 10^{+26}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if a < -1 or 6.50000000000000022e26 < a Initial program 79.8%
*-commutative79.8%
associate-*l/79.1%
*-commutative79.1%
associate-*l/77.0%
Simplified77.0%
Taylor expanded in b around 0 68.2%
Taylor expanded in a around inf 67.5%
associate-*l/69.9%
*-commutative69.9%
Simplified69.9%
if -1 < a < -2.4e-133 or 2.9000000000000001e-117 < a < 6.2000000000000005e-67Initial program 89.5%
*-commutative89.5%
associate-*l/94.0%
*-commutative94.0%
associate-*l/91.4%
Simplified91.4%
Taylor expanded in b around 0 74.4%
Taylor expanded in a around 0 72.3%
associate-*l/80.0%
*-commutative80.0%
Simplified80.0%
if -2.4e-133 < a < 6.99999999999999988e-236Initial program 86.7%
*-commutative86.7%
associate-*l/82.5%
*-commutative82.5%
associate-*l/80.2%
Simplified80.2%
Taylor expanded in x around inf 73.3%
Taylor expanded in a around 0 73.3%
associate-*l/71.0%
*-commutative71.0%
Simplified71.0%
if 6.99999999999999988e-236 < a < 2.9000000000000001e-117 or 6.2000000000000005e-67 < a < 6.50000000000000022e26Initial program 54.3%
*-commutative54.3%
associate-*l/52.9%
*-commutative52.9%
associate-*l/59.2%
Simplified59.2%
Taylor expanded in t around 0 63.5%
Final simplification70.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -1.62e-131) (not (<= t 1.22e-254))) (/ (+ x (* y (/ z t))) (+ (* y (/ b 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.62e-131) || !(t <= 1.22e-254)) {
tmp = (x + (y * (z / t))) / ((y * (b / 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.62d-131)) .or. (.not. (t <= 1.22d-254))) then
tmp = (x + (y * (z / t))) / ((y * (b / 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.62e-131) || !(t <= 1.22e-254)) {
tmp = (x + (y * (z / t))) / ((y * (b / t)) + (a + 1.0));
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -1.62e-131) or not (t <= 1.22e-254): tmp = (x + (y * (z / t))) / ((y * (b / t)) + (a + 1.0)) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -1.62e-131) || !(t <= 1.22e-254)) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(Float64(y * Float64(b / 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.62e-131) || ~((t <= 1.22e-254))) tmp = (x + (y * (z / t))) / ((y * (b / 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.62e-131], N[Not[LessEqual[t, 1.22e-254]], $MachinePrecision]], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.62 \cdot 10^{-131} \lor \neg \left(t \leq 1.22 \cdot 10^{-254}\right):\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{y \cdot \frac{b}{t} + \left(a + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if t < -1.61999999999999988e-131 or 1.22e-254 < t Initial program 81.9%
*-commutative81.9%
associate-*l/84.8%
*-commutative84.8%
associate-*l/85.8%
Simplified85.8%
if -1.61999999999999988e-131 < t < 1.22e-254Initial program 62.0%
*-commutative62.0%
associate-*l/47.4%
*-commutative47.4%
associate-*l/40.0%
Simplified40.0%
Taylor expanded in t around 0 68.9%
Final simplification82.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (+ a 1.0))))
(if (<= t -1.15e-122)
t_1
(if (<= t 1.36e-121)
(/ z b)
(if (or (<= t 1.4e+158) (not (<= t 1.75e+208)))
t_1
(* (/ y t) (/ z (+ a 1.0))))))))
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 <= -1.15e-122) {
tmp = t_1;
} else if (t <= 1.36e-121) {
tmp = z / b;
} else if ((t <= 1.4e+158) || !(t <= 1.75e+208)) {
tmp = t_1;
} else {
tmp = (y / t) * (z / (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) :: t_1
real(8) :: tmp
t_1 = x / (a + 1.0d0)
if (t <= (-1.15d-122)) then
tmp = t_1
else if (t <= 1.36d-121) then
tmp = z / b
else if ((t <= 1.4d+158) .or. (.not. (t <= 1.75d+208))) then
tmp = t_1
else
tmp = (y / t) * (z / (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 t_1 = x / (a + 1.0);
double tmp;
if (t <= -1.15e-122) {
tmp = t_1;
} else if (t <= 1.36e-121) {
tmp = z / b;
} else if ((t <= 1.4e+158) || !(t <= 1.75e+208)) {
tmp = t_1;
} else {
tmp = (y / t) * (z / (a + 1.0));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (a + 1.0) tmp = 0 if t <= -1.15e-122: tmp = t_1 elif t <= 1.36e-121: tmp = z / b elif (t <= 1.4e+158) or not (t <= 1.75e+208): tmp = t_1 else: tmp = (y / t) * (z / (a + 1.0)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(a + 1.0)) tmp = 0.0 if (t <= -1.15e-122) tmp = t_1; elseif (t <= 1.36e-121) tmp = Float64(z / b); elseif ((t <= 1.4e+158) || !(t <= 1.75e+208)) tmp = t_1; else tmp = Float64(Float64(y / t) * Float64(z / Float64(a + 1.0))); 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 <= -1.15e-122) tmp = t_1; elseif (t <= 1.36e-121) tmp = z / b; elseif ((t <= 1.4e+158) || ~((t <= 1.75e+208))) tmp = t_1; else tmp = (y / t) * (z / (a + 1.0)); 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, -1.15e-122], t$95$1, If[LessEqual[t, 1.36e-121], N[(z / b), $MachinePrecision], If[Or[LessEqual[t, 1.4e+158], N[Not[LessEqual[t, 1.75e+208]], $MachinePrecision]], t$95$1, N[(N[(y / t), $MachinePrecision] * N[(z / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{a + 1}\\
\mathbf{if}\;t \leq -1.15 \cdot 10^{-122}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.36 \cdot 10^{-121}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;t \leq 1.4 \cdot 10^{+158} \lor \neg \left(t \leq 1.75 \cdot 10^{+208}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{a + 1}\\
\end{array}
\end{array}
if t < -1.15000000000000003e-122 or 1.3599999999999999e-121 < t < 1.40000000000000001e158 or 1.75000000000000008e208 < t Initial program 83.5%
*-commutative83.5%
associate-*l/85.9%
*-commutative85.9%
associate-*l/87.1%
Simplified87.1%
Taylor expanded in t around inf 62.3%
if -1.15000000000000003e-122 < t < 1.3599999999999999e-121Initial program 66.9%
*-commutative66.9%
associate-*l/54.0%
*-commutative54.0%
associate-*l/47.5%
Simplified47.5%
Taylor expanded in t around 0 63.8%
if 1.40000000000000001e158 < t < 1.75000000000000008e208Initial program 71.7%
*-commutative71.7%
associate-*l/94.1%
*-commutative94.1%
associate-*l/99.7%
Simplified99.7%
Taylor expanded in b around 0 66.4%
Taylor expanded in x around 0 22.9%
times-frac67.9%
Simplified67.9%
Final simplification63.1%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -4.5e+34)
(/ z b)
(if (<= y -43000000000000.0)
(/ x (+ 1.0 (+ a (/ (* y b) t))))
(if (<= y 5.2e+136)
(/ (+ x (/ (* y z) t)) (+ a 1.0))
(* (/ t b) (+ (/ z t) (/ x y)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -4.5e+34) {
tmp = z / b;
} else if (y <= -43000000000000.0) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} else if (y <= 5.2e+136) {
tmp = (x + ((y * z) / t)) / (a + 1.0);
} else {
tmp = (t / b) * ((z / t) + (x / y));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-4.5d+34)) then
tmp = z / b
else if (y <= (-43000000000000.0d0)) then
tmp = x / (1.0d0 + (a + ((y * b) / t)))
else if (y <= 5.2d+136) then
tmp = (x + ((y * z) / t)) / (a + 1.0d0)
else
tmp = (t / b) * ((z / t) + (x / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -4.5e+34) {
tmp = z / b;
} else if (y <= -43000000000000.0) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} else if (y <= 5.2e+136) {
tmp = (x + ((y * z) / t)) / (a + 1.0);
} else {
tmp = (t / b) * ((z / t) + (x / y));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -4.5e+34: tmp = z / b elif y <= -43000000000000.0: tmp = x / (1.0 + (a + ((y * b) / t))) elif y <= 5.2e+136: tmp = (x + ((y * z) / t)) / (a + 1.0) else: tmp = (t / b) * ((z / t) + (x / y)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -4.5e+34) tmp = Float64(z / b); elseif (y <= -43000000000000.0) tmp = Float64(x / Float64(1.0 + Float64(a + Float64(Float64(y * b) / t)))); elseif (y <= 5.2e+136) tmp = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(a + 1.0)); else tmp = Float64(Float64(t / b) * Float64(Float64(z / t) + Float64(x / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -4.5e+34) tmp = z / b; elseif (y <= -43000000000000.0) tmp = x / (1.0 + (a + ((y * b) / t))); elseif (y <= 5.2e+136) tmp = (x + ((y * z) / t)) / (a + 1.0); else tmp = (t / b) * ((z / t) + (x / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -4.5e+34], N[(z / b), $MachinePrecision], If[LessEqual[y, -43000000000000.0], N[(x / N[(1.0 + N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.2e+136], N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(t / b), $MachinePrecision] * N[(N[(z / t), $MachinePrecision] + N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.5 \cdot 10^{+34}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;y \leq -43000000000000:\\
\;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\
\mathbf{elif}\;y \leq 5.2 \cdot 10^{+136}:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{b} \cdot \left(\frac{z}{t} + \frac{x}{y}\right)\\
\end{array}
\end{array}
if y < -4.5e34Initial program 63.1%
*-commutative63.1%
associate-*l/70.1%
*-commutative70.1%
associate-*l/72.2%
Simplified72.2%
Taylor expanded in t around 0 50.2%
if -4.5e34 < y < -4.3e13Initial program 99.7%
*-commutative99.7%
associate-*l/99.7%
*-commutative99.7%
associate-*l/99.4%
Simplified99.4%
Taylor expanded in x around inf 99.7%
if -4.3e13 < y < 5.2000000000000003e136Initial program 93.3%
*-commutative93.3%
associate-*l/87.2%
*-commutative87.2%
associate-*l/81.8%
Simplified81.8%
Taylor expanded in b around 0 77.2%
if 5.2000000000000003e136 < y Initial program 36.4%
*-commutative36.4%
associate-*l/47.1%
*-commutative47.1%
associate-*l/59.6%
Simplified59.6%
Taylor expanded in b around inf 32.6%
times-frac47.6%
+-commutative47.6%
associate-*l/42.2%
*-commutative42.2%
fma-udef42.2%
Simplified42.2%
Taylor expanded in z around 0 67.4%
Final simplification71.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -1e-131) (not (<= t 5e-60))) (* (+ x (/ y (/ t z))) (/ 1.0 (+ a 1.0))) (/ (+ (* y z) (* x t)) (* y b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -1e-131) || !(t <= 5e-60)) {
tmp = (x + (y / (t / z))) * (1.0 / (a + 1.0));
} else {
tmp = ((y * z) + (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 <= (-1d-131)) .or. (.not. (t <= 5d-60))) then
tmp = (x + (y / (t / z))) * (1.0d0 / (a + 1.0d0))
else
tmp = ((y * z) + (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 <= -1e-131) || !(t <= 5e-60)) {
tmp = (x + (y / (t / z))) * (1.0 / (a + 1.0));
} else {
tmp = ((y * z) + (x * t)) / (y * b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -1e-131) or not (t <= 5e-60): tmp = (x + (y / (t / z))) * (1.0 / (a + 1.0)) else: tmp = ((y * z) + (x * t)) / (y * b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -1e-131) || !(t <= 5e-60)) tmp = Float64(Float64(x + Float64(y / Float64(t / z))) * Float64(1.0 / Float64(a + 1.0))); else tmp = Float64(Float64(Float64(y * z) + 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 <= -1e-131) || ~((t <= 5e-60))) tmp = (x + (y / (t / z))) * (1.0 / (a + 1.0)); else tmp = ((y * z) + (x * t)) / (y * b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -1e-131], N[Not[LessEqual[t, 5e-60]], $MachinePrecision]], N[(N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y * z), $MachinePrecision] + N[(x * t), $MachinePrecision]), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1 \cdot 10^{-131} \lor \neg \left(t \leq 5 \cdot 10^{-60}\right):\\
\;\;\;\;\left(x + \frac{y}{\frac{t}{z}}\right) \cdot \frac{1}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot z + x \cdot t}{y \cdot b}\\
\end{array}
\end{array}
if t < -9.9999999999999999e-132 or 5.0000000000000001e-60 < t Initial program 82.4%
*-commutative82.4%
associate-*l/86.8%
*-commutative86.8%
associate-*l/89.0%
Simplified89.0%
Taylor expanded in b around 0 71.5%
div-inv71.4%
associate-/l*75.7%
Applied egg-rr75.7%
if -9.9999999999999999e-132 < t < 5.0000000000000001e-60Initial program 67.8%
*-commutative67.8%
associate-*l/55.8%
*-commutative55.8%
associate-*l/48.4%
Simplified48.4%
Taylor expanded in b around inf 55.6%
Taylor expanded in t around 0 65.4%
Final simplification72.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -9e-132) (not (<= t 1.3e-64))) (/ (+ x (/ (* y z) t)) (+ a 1.0)) (/ (+ (* y z) (* x t)) (* y b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -9e-132) || !(t <= 1.3e-64)) {
tmp = (x + ((y * z) / t)) / (a + 1.0);
} else {
tmp = ((y * z) + (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 <= (-9d-132)) .or. (.not. (t <= 1.3d-64))) then
tmp = (x + ((y * z) / t)) / (a + 1.0d0)
else
tmp = ((y * z) + (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 <= -9e-132) || !(t <= 1.3e-64)) {
tmp = (x + ((y * z) / t)) / (a + 1.0);
} else {
tmp = ((y * z) + (x * t)) / (y * b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -9e-132) or not (t <= 1.3e-64): tmp = (x + ((y * z) / t)) / (a + 1.0) else: tmp = ((y * z) + (x * t)) / (y * b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -9e-132) || !(t <= 1.3e-64)) tmp = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(a + 1.0)); else tmp = Float64(Float64(Float64(y * z) + 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 <= -9e-132) || ~((t <= 1.3e-64))) tmp = (x + ((y * z) / t)) / (a + 1.0); else tmp = ((y * z) + (x * t)) / (y * b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -9e-132], N[Not[LessEqual[t, 1.3e-64]], $MachinePrecision]], N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y * z), $MachinePrecision] + N[(x * t), $MachinePrecision]), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -9 \cdot 10^{-132} \lor \neg \left(t \leq 1.3 \cdot 10^{-64}\right):\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot z + x \cdot t}{y \cdot b}\\
\end{array}
\end{array}
if t < -8.9999999999999999e-132 or 1.3e-64 < t Initial program 82.4%
*-commutative82.4%
associate-*l/86.8%
*-commutative86.8%
associate-*l/89.0%
Simplified89.0%
Taylor expanded in b around 0 71.5%
if -8.9999999999999999e-132 < t < 1.3e-64Initial program 67.8%
*-commutative67.8%
associate-*l/55.8%
*-commutative55.8%
associate-*l/48.4%
Simplified48.4%
Taylor expanded in b around inf 55.6%
Taylor expanded in t around 0 65.4%
Final simplification69.6%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -6.8e+33)
(/ z b)
(if (<= y 1.3e+142)
(/ x (+ 1.0 (+ a (/ (* y b) t))))
(* (/ t b) (+ (/ z t) (/ x y))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -6.8e+33) {
tmp = z / b;
} else if (y <= 1.3e+142) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} else {
tmp = (t / b) * ((z / t) + (x / y));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-6.8d+33)) then
tmp = z / b
else if (y <= 1.3d+142) then
tmp = x / (1.0d0 + (a + ((y * b) / t)))
else
tmp = (t / b) * ((z / t) + (x / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -6.8e+33) {
tmp = z / b;
} else if (y <= 1.3e+142) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} else {
tmp = (t / b) * ((z / t) + (x / y));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -6.8e+33: tmp = z / b elif y <= 1.3e+142: tmp = x / (1.0 + (a + ((y * b) / t))) else: tmp = (t / b) * ((z / t) + (x / y)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -6.8e+33) tmp = Float64(z / b); elseif (y <= 1.3e+142) tmp = Float64(x / Float64(1.0 + Float64(a + Float64(Float64(y * b) / t)))); else tmp = Float64(Float64(t / b) * Float64(Float64(z / t) + Float64(x / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -6.8e+33) tmp = z / b; elseif (y <= 1.3e+142) tmp = x / (1.0 + (a + ((y * b) / t))); else tmp = (t / b) * ((z / t) + (x / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -6.8e+33], N[(z / b), $MachinePrecision], If[LessEqual[y, 1.3e+142], N[(x / N[(1.0 + N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t / b), $MachinePrecision] * N[(N[(z / t), $MachinePrecision] + N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.8 \cdot 10^{+33}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;y \leq 1.3 \cdot 10^{+142}:\\
\;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{b} \cdot \left(\frac{z}{t} + \frac{x}{y}\right)\\
\end{array}
\end{array}
if y < -6.7999999999999999e33Initial program 63.1%
*-commutative63.1%
associate-*l/70.1%
*-commutative70.1%
associate-*l/72.2%
Simplified72.2%
Taylor expanded in t around 0 50.2%
if -6.7999999999999999e33 < y < 1.30000000000000011e142Initial program 93.5%
*-commutative93.5%
associate-*l/87.6%
*-commutative87.6%
associate-*l/82.3%
Simplified82.3%
Taylor expanded in x around inf 71.6%
if 1.30000000000000011e142 < y Initial program 36.4%
*-commutative36.4%
associate-*l/47.1%
*-commutative47.1%
associate-*l/59.6%
Simplified59.6%
Taylor expanded in b around inf 32.6%
times-frac47.6%
+-commutative47.6%
associate-*l/42.2%
*-commutative42.2%
fma-udef42.2%
Simplified42.2%
Taylor expanded in z around 0 67.4%
Final simplification67.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- x (* x a))))
(if (<= a -1.0)
(/ x a)
(if (<= a -6.5e-31)
t_1
(if (<= a -8e-62)
(/ z b)
(if (<= a 1e-237) t_1 (if (<= a 3.7e+27) (/ z b) (/ x a))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x - (x * a);
double tmp;
if (a <= -1.0) {
tmp = x / a;
} else if (a <= -6.5e-31) {
tmp = t_1;
} else if (a <= -8e-62) {
tmp = z / b;
} else if (a <= 1e-237) {
tmp = t_1;
} else if (a <= 3.7e+27) {
tmp = z / b;
} 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) :: t_1
real(8) :: tmp
t_1 = x - (x * a)
if (a <= (-1.0d0)) then
tmp = x / a
else if (a <= (-6.5d-31)) then
tmp = t_1
else if (a <= (-8d-62)) then
tmp = z / b
else if (a <= 1d-237) then
tmp = t_1
else if (a <= 3.7d+27) then
tmp = z / b
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 t_1 = x - (x * a);
double tmp;
if (a <= -1.0) {
tmp = x / a;
} else if (a <= -6.5e-31) {
tmp = t_1;
} else if (a <= -8e-62) {
tmp = z / b;
} else if (a <= 1e-237) {
tmp = t_1;
} else if (a <= 3.7e+27) {
tmp = z / b;
} else {
tmp = x / a;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x - (x * a) tmp = 0 if a <= -1.0: tmp = x / a elif a <= -6.5e-31: tmp = t_1 elif a <= -8e-62: tmp = z / b elif a <= 1e-237: tmp = t_1 elif a <= 3.7e+27: tmp = z / b else: tmp = x / a return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x - Float64(x * a)) tmp = 0.0 if (a <= -1.0) tmp = Float64(x / a); elseif (a <= -6.5e-31) tmp = t_1; elseif (a <= -8e-62) tmp = Float64(z / b); elseif (a <= 1e-237) tmp = t_1; elseif (a <= 3.7e+27) tmp = Float64(z / b); else tmp = Float64(x / a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x - (x * a); tmp = 0.0; if (a <= -1.0) tmp = x / a; elseif (a <= -6.5e-31) tmp = t_1; elseif (a <= -8e-62) tmp = z / b; elseif (a <= 1e-237) tmp = t_1; elseif (a <= 3.7e+27) tmp = z / b; else tmp = x / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x - N[(x * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.0], N[(x / a), $MachinePrecision], If[LessEqual[a, -6.5e-31], t$95$1, If[LessEqual[a, -8e-62], N[(z / b), $MachinePrecision], If[LessEqual[a, 1e-237], t$95$1, If[LessEqual[a, 3.7e+27], N[(z / b), $MachinePrecision], N[(x / a), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - x \cdot a\\
\mathbf{if}\;a \leq -1:\\
\;\;\;\;\frac{x}{a}\\
\mathbf{elif}\;a \leq -6.5 \cdot 10^{-31}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq -8 \cdot 10^{-62}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;a \leq 10^{-237}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 3.7 \cdot 10^{+27}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a}\\
\end{array}
\end{array}
if a < -1 or 3.70000000000000002e27 < a Initial program 79.8%
*-commutative79.8%
associate-*l/79.1%
*-commutative79.1%
associate-*l/77.0%
Simplified77.0%
Taylor expanded in x around inf 60.4%
Taylor expanded in a around inf 54.7%
if -1 < a < -6.49999999999999967e-31 or -8.0000000000000003e-62 < a < 9.9999999999999999e-238Initial program 89.7%
*-commutative89.7%
associate-*l/86.8%
*-commutative86.8%
associate-*l/83.9%
Simplified83.9%
Taylor expanded in t around inf 58.5%
Taylor expanded in a around 0 58.1%
mul-1-neg58.1%
unsub-neg58.1%
*-commutative58.1%
Simplified58.1%
if -6.49999999999999967e-31 < a < -8.0000000000000003e-62 or 9.9999999999999999e-238 < a < 3.70000000000000002e27Initial program 60.9%
*-commutative60.9%
associate-*l/62.7%
*-commutative62.7%
associate-*l/67.3%
Simplified67.3%
Taylor expanded in t around 0 57.2%
Final simplification56.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -7.5e-121) (not (<= t 1.45e-121))) (/ x (+ a 1.0)) (/ z b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -7.5e-121) || !(t <= 1.45e-121)) {
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 <= (-7.5d-121)) .or. (.not. (t <= 1.45d-121))) 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 <= -7.5e-121) || !(t <= 1.45e-121)) {
tmp = x / (a + 1.0);
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -7.5e-121) or not (t <= 1.45e-121): tmp = x / (a + 1.0) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -7.5e-121) || !(t <= 1.45e-121)) 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 <= -7.5e-121) || ~((t <= 1.45e-121))) 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, -7.5e-121], N[Not[LessEqual[t, 1.45e-121]], $MachinePrecision]], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -7.5 \cdot 10^{-121} \lor \neg \left(t \leq 1.45 \cdot 10^{-121}\right):\\
\;\;\;\;\frac{x}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if t < -7.50000000000000027e-121 or 1.45e-121 < t Initial program 82.4%
*-commutative82.4%
associate-*l/86.7%
*-commutative86.7%
associate-*l/88.2%
Simplified88.2%
Taylor expanded in t around inf 60.0%
if -7.50000000000000027e-121 < t < 1.45e-121Initial program 66.9%
*-commutative66.9%
associate-*l/54.0%
*-commutative54.0%
associate-*l/47.5%
Simplified47.5%
Taylor expanded in t around 0 63.8%
Final simplification61.1%
(FPCore (x y z t a b) :precision binary64 (if (<= a -4800.0) (/ x a) (if (<= a 3.6e+27) (/ z b) (/ x a))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -4800.0) {
tmp = x / a;
} else if (a <= 3.6e+27) {
tmp = z / b;
} 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 <= (-4800.0d0)) then
tmp = x / a
else if (a <= 3.6d+27) then
tmp = z / b
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 <= -4800.0) {
tmp = x / a;
} else if (a <= 3.6e+27) {
tmp = z / b;
} else {
tmp = x / a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -4800.0: tmp = x / a elif a <= 3.6e+27: tmp = z / b else: tmp = x / a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -4800.0) tmp = Float64(x / a); elseif (a <= 3.6e+27) tmp = Float64(z / b); else tmp = Float64(x / a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -4800.0) tmp = x / a; elseif (a <= 3.6e+27) tmp = z / b; else tmp = x / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -4800.0], N[(x / a), $MachinePrecision], If[LessEqual[a, 3.6e+27], N[(z / b), $MachinePrecision], N[(x / a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4800:\\
\;\;\;\;\frac{x}{a}\\
\mathbf{elif}\;a \leq 3.6 \cdot 10^{+27}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a}\\
\end{array}
\end{array}
if a < -4800 or 3.59999999999999983e27 < a Initial program 79.8%
*-commutative79.8%
associate-*l/79.1%
*-commutative79.1%
associate-*l/77.0%
Simplified77.0%
Taylor expanded in x around inf 60.4%
Taylor expanded in a around inf 54.7%
if -4800 < a < 3.59999999999999983e27Initial program 75.9%
*-commutative75.9%
associate-*l/75.2%
*-commutative75.2%
associate-*l/75.9%
Simplified75.9%
Taylor expanded in t around 0 41.8%
Final simplification48.4%
(FPCore (x y z t a b) :precision binary64 (/ x a))
double code(double x, double y, double z, double t, double a, double b) {
return x / a;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x / a
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x / a;
}
def code(x, y, z, t, a, b): return x / a
function code(x, y, z, t, a, b) return Float64(x / a) end
function tmp = code(x, y, z, t, a, b) tmp = x / a; end
code[x_, y_, z_, t_, a_, b_] := N[(x / a), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{a}
\end{array}
Initial program 77.9%
*-commutative77.9%
associate-*l/77.2%
*-commutative77.2%
associate-*l/76.5%
Simplified76.5%
Taylor expanded in x around inf 56.5%
Taylor expanded in a around inf 30.3%
Final simplification30.3%
(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 2023271
(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))))