
(FPCore (x y z t a b) :precision binary64 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t))))
double code(double x, double y, double z, double t, double a, double b) {
return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (x + ((y * z) / t)) / ((a + 1.0d0) + ((y * b) / t))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
}
def code(x, y, z, t, a, b): return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t))
function code(x, y, z, t, a, b) return Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))) end
function tmp = code(x, y, z, t, a, b) tmp = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t)); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t))))
double code(double x, double y, double z, double t, double a, double b) {
return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (x + ((y * z) / t)) / ((a + 1.0d0) + ((y * b) / t))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
}
def code(x, y, z, t, a, b): return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t))
function code(x, y, z, t, a, b) return Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))) end
function tmp = code(x, y, z, t, a, b) tmp = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t)); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}
\end{array}
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (/ (* y z) t)) (+ (/ (* y b) t) (+ a 1.0))))
(t_2 (/ y (/ (* t (fma y (/ b t) (+ a 1.0))) z))))
(if (<= t_1 (- INFINITY))
t_2
(if (<= t_1 -5e-308)
t_1
(if (<= t_1 5e-289)
(/ (* y z) (+ (* y b) (* t (+ a 1.0))))
(if (<= t_1 5e+262) t_1 (if (<= t_1 INFINITY) t_2 (/ 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 = y / ((t * fma(y, (b / t), (a + 1.0))) / z);
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = t_2;
} else if (t_1 <= -5e-308) {
tmp = t_1;
} else if (t_1 <= 5e-289) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} else if (t_1 <= 5e+262) {
tmp = t_1;
} else if (t_1 <= ((double) INFINITY)) {
tmp = t_2;
} 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(y / Float64(Float64(t * fma(y, Float64(b / t), Float64(a + 1.0))) / z)) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = t_2; elseif (t_1 <= -5e-308) tmp = t_1; elseif (t_1 <= 5e-289) tmp = Float64(Float64(y * z) / Float64(Float64(y * b) + Float64(t * Float64(a + 1.0)))); elseif (t_1 <= 5e+262) tmp = t_1; elseif (t_1 <= Inf) tmp = t_2; 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]}, Block[{t$95$2 = N[(y / N[(N[(t * N[(y * N[(b / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], t$95$2, If[LessEqual[t$95$1, -5e-308], t$95$1, If[LessEqual[t$95$1, 5e-289], N[(N[(y * z), $MachinePrecision] / N[(N[(y * b), $MachinePrecision] + N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+262], t$95$1, If[LessEqual[t$95$1, Infinity], t$95$2, 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 := \frac{y}{\frac{t \cdot \mathsf{fma}\left(y, \frac{b}{t}, a + 1\right)}{z}}\\
\mathbf{if}\;t_1 \leq -\infty:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t_1 \leq -5 \cdot 10^{-308}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_1 \leq 5 \cdot 10^{-289}:\\
\;\;\;\;\frac{y \cdot z}{y \cdot b + t \cdot \left(a + 1\right)}\\
\mathbf{elif}\;t_1 \leq 5 \cdot 10^{+262}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_1 \leq \infty:\\
\;\;\;\;t_2\\
\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.00000000000000008e262 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < +inf.0Initial program 46.4%
*-commutative46.4%
associate-*l/65.4%
*-commutative65.4%
associate-*l/65.4%
Simplified65.4%
Taylor expanded in x around 0 62.3%
associate-/l*83.4%
associate-+r+83.4%
+-commutative83.4%
associate-/l*63.8%
+-commutative63.8%
associate-/r/83.4%
*-commutative83.4%
fma-udef83.4%
+-commutative83.4%
Simplified83.4%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -4.99999999999999955e-308 or 5.00000000000000029e-289 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 5.00000000000000008e262Initial program 99.7%
if -4.99999999999999955e-308 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 5.00000000000000029e-289Initial program 61.1%
*-commutative61.1%
associate-*l/60.8%
*-commutative60.8%
associate-*l/67.4%
Simplified67.4%
Taylor expanded in x around 0 61.1%
Taylor expanded in t around 0 73.7%
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.8%
*-commutative0.8%
associate-*l/12.9%
Simplified12.9%
Taylor expanded in t around 0 88.0%
Final simplification91.9%
(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 -4e+299)
(* (/ y t) (/ z (+ a 1.0)))
(if (<= t_1 -5e-308)
t_1
(if (<= t_1 5e-289)
(/ (* y z) (+ (* y b) (* t (+ a 1.0))))
(if (<= t_1 5e+262)
t_1
(if (<= t_1 INFINITY)
(* (/ y t) (/ z (+ (+ a 1.0) (/ b (/ t y)))))
(/ 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 <= -4e+299) {
tmp = (y / t) * (z / (a + 1.0));
} else if (t_1 <= -5e-308) {
tmp = t_1;
} else if (t_1 <= 5e-289) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} else if (t_1 <= 5e+262) {
tmp = t_1;
} else if (t_1 <= ((double) INFINITY)) {
tmp = (y / t) * (z / ((a + 1.0) + (b / (t / y))));
} 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 <= -4e+299) {
tmp = (y / t) * (z / (a + 1.0));
} else if (t_1 <= -5e-308) {
tmp = t_1;
} else if (t_1 <= 5e-289) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} else if (t_1 <= 5e+262) {
tmp = t_1;
} else if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = (y / t) * (z / ((a + 1.0) + (b / (t / y))));
} 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 <= -4e+299: tmp = (y / t) * (z / (a + 1.0)) elif t_1 <= -5e-308: tmp = t_1 elif t_1 <= 5e-289: tmp = (y * z) / ((y * b) + (t * (a + 1.0))) elif t_1 <= 5e+262: tmp = t_1 elif t_1 <= math.inf: tmp = (y / t) * (z / ((a + 1.0) + (b / (t / y)))) 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 <= -4e+299) tmp = Float64(Float64(y / t) * Float64(z / Float64(a + 1.0))); elseif (t_1 <= -5e-308) tmp = t_1; elseif (t_1 <= 5e-289) tmp = Float64(Float64(y * z) / Float64(Float64(y * b) + Float64(t * Float64(a + 1.0)))); elseif (t_1 <= 5e+262) tmp = t_1; elseif (t_1 <= Inf) tmp = Float64(Float64(y / t) * Float64(z / Float64(Float64(a + 1.0) + Float64(b / Float64(t / y))))); 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 <= -4e+299) tmp = (y / t) * (z / (a + 1.0)); elseif (t_1 <= -5e-308) tmp = t_1; elseif (t_1 <= 5e-289) tmp = (y * z) / ((y * b) + (t * (a + 1.0))); elseif (t_1 <= 5e+262) tmp = t_1; elseif (t_1 <= Inf) tmp = (y / t) * (z / ((a + 1.0) + (b / (t / y)))); 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, -4e+299], N[(N[(y / t), $MachinePrecision] * N[(z / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -5e-308], t$95$1, If[LessEqual[t$95$1, 5e-289], N[(N[(y * z), $MachinePrecision] / N[(N[(y * b), $MachinePrecision] + N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+262], t$95$1, If[LessEqual[t$95$1, Infinity], N[(N[(y / t), $MachinePrecision] * N[(z / N[(N[(a + 1.0), $MachinePrecision] + N[(b / N[(t / y), $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 -4 \cdot 10^{+299}:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{a + 1}\\
\mathbf{elif}\;t_1 \leq -5 \cdot 10^{-308}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_1 \leq 5 \cdot 10^{-289}:\\
\;\;\;\;\frac{y \cdot z}{y \cdot b + t \cdot \left(a + 1\right)}\\
\mathbf{elif}\;t_1 \leq 5 \cdot 10^{+262}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_1 \leq \infty:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{\left(a + 1\right) + \frac{b}{\frac{t}{y}}}\\
\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))) < -4.0000000000000002e299Initial program 39.6%
*-commutative39.6%
associate-*l/56.9%
*-commutative56.9%
associate-*l/56.9%
Simplified56.9%
Taylor expanded in x around 0 61.4%
Taylor expanded in y around 0 49.6%
times-frac70.3%
Simplified70.3%
if -4.0000000000000002e299 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -4.99999999999999955e-308 or 5.00000000000000029e-289 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 5.00000000000000008e262Initial program 99.7%
if -4.99999999999999955e-308 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 5.00000000000000029e-289Initial program 61.1%
*-commutative61.1%
associate-*l/60.8%
*-commutative60.8%
associate-*l/67.4%
Simplified67.4%
Taylor expanded in x around 0 61.1%
Taylor expanded in t around 0 73.7%
if 5.00000000000000008e262 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < +inf.0Initial program 55.2%
associate-/l*70.2%
associate-+l+70.2%
associate-/l*70.2%
Simplified70.2%
*-un-lft-identity70.2%
div-inv70.2%
times-frac70.2%
Applied egg-rr70.2%
Taylor expanded in t around 0 70.2%
*-commutative70.2%
associate-*l/59.3%
Simplified59.3%
Taylor expanded in x around 0 65.0%
times-frac94.8%
associate-+r+94.8%
associate-/l*84.0%
Simplified84.0%
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.8%
*-commutative0.8%
associate-*l/12.9%
Simplified12.9%
Taylor expanded in t around 0 88.0%
Final simplification91.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (/ y (/ t z)))) (t_2 (/ (+ x (* y (/ z t))) a)))
(if (<= a -22000000000.0)
t_2
(if (<= a -1e-298)
t_1
(if (<= a 2e-255)
(/ z b)
(if (<= a 1.4e-58) t_1 (if (<= a 3.4e+69) (/ z b) t_2)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (y / (t / z));
double t_2 = (x + (y * (z / t))) / a;
double tmp;
if (a <= -22000000000.0) {
tmp = t_2;
} else if (a <= -1e-298) {
tmp = t_1;
} else if (a <= 2e-255) {
tmp = z / b;
} else if (a <= 1.4e-58) {
tmp = t_1;
} else if (a <= 3.4e+69) {
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 + (y / (t / z))
t_2 = (x + (y * (z / t))) / a
if (a <= (-22000000000.0d0)) then
tmp = t_2
else if (a <= (-1d-298)) then
tmp = t_1
else if (a <= 2d-255) then
tmp = z / b
else if (a <= 1.4d-58) then
tmp = t_1
else if (a <= 3.4d+69) 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 + (y / (t / z));
double t_2 = (x + (y * (z / t))) / a;
double tmp;
if (a <= -22000000000.0) {
tmp = t_2;
} else if (a <= -1e-298) {
tmp = t_1;
} else if (a <= 2e-255) {
tmp = z / b;
} else if (a <= 1.4e-58) {
tmp = t_1;
} else if (a <= 3.4e+69) {
tmp = z / b;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (y / (t / z)) t_2 = (x + (y * (z / t))) / a tmp = 0 if a <= -22000000000.0: tmp = t_2 elif a <= -1e-298: tmp = t_1 elif a <= 2e-255: tmp = z / b elif a <= 1.4e-58: tmp = t_1 elif a <= 3.4e+69: tmp = z / b else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(y / Float64(t / z))) t_2 = Float64(Float64(x + Float64(y * Float64(z / t))) / a) tmp = 0.0 if (a <= -22000000000.0) tmp = t_2; elseif (a <= -1e-298) tmp = t_1; elseif (a <= 2e-255) tmp = Float64(z / b); elseif (a <= 1.4e-58) tmp = t_1; elseif (a <= 3.4e+69) 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 + (y / (t / z)); t_2 = (x + (y * (z / t))) / a; tmp = 0.0; if (a <= -22000000000.0) tmp = t_2; elseif (a <= -1e-298) tmp = t_1; elseif (a <= 2e-255) tmp = z / b; elseif (a <= 1.4e-58) tmp = t_1; elseif (a <= 3.4e+69) 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[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]}, If[LessEqual[a, -22000000000.0], t$95$2, If[LessEqual[a, -1e-298], t$95$1, If[LessEqual[a, 2e-255], N[(z / b), $MachinePrecision], If[LessEqual[a, 1.4e-58], t$95$1, If[LessEqual[a, 3.4e+69], N[(z / b), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y}{\frac{t}{z}}\\
t_2 := \frac{x + y \cdot \frac{z}{t}}{a}\\
\mathbf{if}\;a \leq -22000000000:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \leq -1 \cdot 10^{-298}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 2 \cdot 10^{-255}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;a \leq 1.4 \cdot 10^{-58}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 3.4 \cdot 10^{+69}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if a < -2.2e10 or 3.39999999999999986e69 < a Initial program 77.8%
*-commutative77.8%
associate-*l/75.6%
*-commutative75.6%
associate-*l/77.1%
Simplified77.1%
Taylor expanded in a around inf 64.9%
if -2.2e10 < a < -9.99999999999999912e-299 or 2e-255 < a < 1.4e-58Initial program 83.7%
associate-/l*84.8%
associate-+l+84.8%
associate-/l*81.8%
Simplified81.8%
*-un-lft-identity81.8%
div-inv81.9%
times-frac84.8%
Applied egg-rr84.8%
Taylor expanded in b around 0 63.4%
associate-/l*64.5%
Simplified64.5%
Taylor expanded in a around 0 63.4%
associate-/l*64.5%
Simplified64.5%
if -9.99999999999999912e-299 < a < 2e-255 or 1.4e-58 < a < 3.39999999999999986e69Initial program 53.1%
*-commutative53.1%
associate-*l/47.9%
*-commutative47.9%
associate-*l/50.4%
Simplified50.4%
Taylor expanded in t around 0 66.3%
Final simplification64.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (/ y (/ t z)))))
(if (<= a -22000000000.0)
(/ (+ x (* y (/ z t))) a)
(if (<= a -8.5e-305)
t_1
(if (<= a 1.3e-255)
(/ z b)
(if (<= a 1.85e-58) t_1 (if (<= a 2.3e+67) (/ z b) (/ t_1 a))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (y / (t / z));
double tmp;
if (a <= -22000000000.0) {
tmp = (x + (y * (z / t))) / a;
} else if (a <= -8.5e-305) {
tmp = t_1;
} else if (a <= 1.3e-255) {
tmp = z / b;
} else if (a <= 1.85e-58) {
tmp = t_1;
} else if (a <= 2.3e+67) {
tmp = z / b;
} else {
tmp = t_1 / 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 + (y / (t / z))
if (a <= (-22000000000.0d0)) then
tmp = (x + (y * (z / t))) / a
else if (a <= (-8.5d-305)) then
tmp = t_1
else if (a <= 1.3d-255) then
tmp = z / b
else if (a <= 1.85d-58) then
tmp = t_1
else if (a <= 2.3d+67) then
tmp = z / b
else
tmp = t_1 / 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 + (y / (t / z));
double tmp;
if (a <= -22000000000.0) {
tmp = (x + (y * (z / t))) / a;
} else if (a <= -8.5e-305) {
tmp = t_1;
} else if (a <= 1.3e-255) {
tmp = z / b;
} else if (a <= 1.85e-58) {
tmp = t_1;
} else if (a <= 2.3e+67) {
tmp = z / b;
} else {
tmp = t_1 / a;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (y / (t / z)) tmp = 0 if a <= -22000000000.0: tmp = (x + (y * (z / t))) / a elif a <= -8.5e-305: tmp = t_1 elif a <= 1.3e-255: tmp = z / b elif a <= 1.85e-58: tmp = t_1 elif a <= 2.3e+67: tmp = z / b else: tmp = t_1 / a return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(y / Float64(t / z))) tmp = 0.0 if (a <= -22000000000.0) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / a); elseif (a <= -8.5e-305) tmp = t_1; elseif (a <= 1.3e-255) tmp = Float64(z / b); elseif (a <= 1.85e-58) tmp = t_1; elseif (a <= 2.3e+67) tmp = Float64(z / b); else tmp = Float64(t_1 / a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (y / (t / z)); tmp = 0.0; if (a <= -22000000000.0) tmp = (x + (y * (z / t))) / a; elseif (a <= -8.5e-305) tmp = t_1; elseif (a <= 1.3e-255) tmp = z / b; elseif (a <= 1.85e-58) tmp = t_1; elseif (a <= 2.3e+67) tmp = z / b; else tmp = t_1 / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -22000000000.0], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[a, -8.5e-305], t$95$1, If[LessEqual[a, 1.3e-255], N[(z / b), $MachinePrecision], If[LessEqual[a, 1.85e-58], t$95$1, If[LessEqual[a, 2.3e+67], N[(z / b), $MachinePrecision], N[(t$95$1 / a), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y}{\frac{t}{z}}\\
\mathbf{if}\;a \leq -22000000000:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a}\\
\mathbf{elif}\;a \leq -8.5 \cdot 10^{-305}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 1.3 \cdot 10^{-255}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;a \leq 1.85 \cdot 10^{-58}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 2.3 \cdot 10^{+67}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{t_1}{a}\\
\end{array}
\end{array}
if a < -2.2e10Initial program 76.7%
*-commutative76.7%
associate-*l/73.0%
*-commutative73.0%
associate-*l/78.2%
Simplified78.2%
Taylor expanded in a around inf 62.8%
if -2.2e10 < a < -8.4999999999999997e-305 or 1.3000000000000001e-255 < a < 1.8500000000000001e-58Initial program 83.7%
associate-/l*84.8%
associate-+l+84.8%
associate-/l*81.8%
Simplified81.8%
*-un-lft-identity81.8%
div-inv81.9%
times-frac84.8%
Applied egg-rr84.8%
Taylor expanded in b around 0 63.4%
associate-/l*64.5%
Simplified64.5%
Taylor expanded in a around 0 63.4%
associate-/l*64.5%
Simplified64.5%
if -8.4999999999999997e-305 < a < 1.3000000000000001e-255 or 1.8500000000000001e-58 < a < 2.2999999999999999e67Initial program 53.1%
*-commutative53.1%
associate-*l/47.9%
*-commutative47.9%
associate-*l/50.4%
Simplified50.4%
Taylor expanded in t around 0 66.3%
if 2.2999999999999999e67 < a Initial program 79.4%
associate-/l*79.3%
associate-+l+79.3%
associate-/l*75.6%
Simplified75.6%
*-un-lft-identity75.6%
div-inv75.5%
times-frac79.3%
Applied egg-rr79.3%
Taylor expanded in a around inf 67.8%
associate-/l*67.9%
Simplified67.9%
Final simplification64.9%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -4.8e+194)
(/ z b)
(if (<= z -1.9e+156)
(+ x (/ (* y z) t))
(if (or (<= z -1e+116) (not (<= z 1e+134)))
(* (/ y t) (/ z (+ a 1.0)))
(/ x (+ 1.0 (+ a (/ (* y b) t))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -4.8e+194) {
tmp = z / b;
} else if (z <= -1.9e+156) {
tmp = x + ((y * z) / t);
} else if ((z <= -1e+116) || !(z <= 1e+134)) {
tmp = (y / t) * (z / (a + 1.0));
} else {
tmp = x / (1.0 + (a + ((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 (z <= (-4.8d+194)) then
tmp = z / b
else if (z <= (-1.9d+156)) then
tmp = x + ((y * z) / t)
else if ((z <= (-1d+116)) .or. (.not. (z <= 1d+134))) then
tmp = (y / t) * (z / (a + 1.0d0))
else
tmp = x / (1.0d0 + (a + ((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 (z <= -4.8e+194) {
tmp = z / b;
} else if (z <= -1.9e+156) {
tmp = x + ((y * z) / t);
} else if ((z <= -1e+116) || !(z <= 1e+134)) {
tmp = (y / t) * (z / (a + 1.0));
} else {
tmp = x / (1.0 + (a + ((y * b) / t)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -4.8e+194: tmp = z / b elif z <= -1.9e+156: tmp = x + ((y * z) / t) elif (z <= -1e+116) or not (z <= 1e+134): tmp = (y / t) * (z / (a + 1.0)) else: tmp = x / (1.0 + (a + ((y * b) / t))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -4.8e+194) tmp = Float64(z / b); elseif (z <= -1.9e+156) tmp = Float64(x + Float64(Float64(y * z) / t)); elseif ((z <= -1e+116) || !(z <= 1e+134)) tmp = Float64(Float64(y / t) * Float64(z / Float64(a + 1.0))); else tmp = Float64(x / Float64(1.0 + Float64(a + Float64(Float64(y * b) / t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -4.8e+194) tmp = z / b; elseif (z <= -1.9e+156) tmp = x + ((y * z) / t); elseif ((z <= -1e+116) || ~((z <= 1e+134))) tmp = (y / t) * (z / (a + 1.0)); else tmp = x / (1.0 + (a + ((y * b) / t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -4.8e+194], N[(z / b), $MachinePrecision], If[LessEqual[z, -1.9e+156], N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -1e+116], N[Not[LessEqual[z, 1e+134]], $MachinePrecision]], N[(N[(y / t), $MachinePrecision] * N[(z / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(1.0 + N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.8 \cdot 10^{+194}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;z \leq -1.9 \cdot 10^{+156}:\\
\;\;\;\;x + \frac{y \cdot z}{t}\\
\mathbf{elif}\;z \leq -1 \cdot 10^{+116} \lor \neg \left(z \leq 10^{+134}\right):\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\
\end{array}
\end{array}
if z < -4.8e194Initial program 62.4%
*-commutative62.4%
associate-*l/62.5%
*-commutative62.5%
associate-*l/67.0%
Simplified67.0%
Taylor expanded in t around 0 54.3%
if -4.8e194 < z < -1.90000000000000012e156Initial program 80.5%
associate-/l*74.9%
associate-+l+74.9%
associate-/l*84.6%
Simplified84.6%
*-un-lft-identity84.6%
div-inv84.6%
times-frac74.9%
Applied egg-rr74.9%
Taylor expanded in b around 0 80.8%
associate-/l*76.8%
Simplified76.8%
Taylor expanded in a around 0 70.8%
if -1.90000000000000012e156 < z < -1.00000000000000002e116 or 9.99999999999999921e133 < z Initial program 57.8%
*-commutative57.8%
associate-*l/57.9%
*-commutative57.9%
associate-*l/59.7%
Simplified59.7%
Taylor expanded in x around 0 43.6%
Taylor expanded in y around 0 41.9%
times-frac57.3%
Simplified57.3%
if -1.00000000000000002e116 < z < 9.99999999999999921e133Initial program 84.0%
*-commutative84.0%
associate-*l/81.8%
*-commutative81.8%
associate-*l/80.1%
Simplified80.1%
Taylor expanded in x around inf 69.7%
Final simplification65.8%
(FPCore (x y z t a b)
:precision binary64
(if (<= a -22000000000.0)
(/ x a)
(if (<= a -2.7e-305)
x
(if (<= a 2.8e-255)
(/ z b)
(if (<= a 1.22e-198) x (if (<= a 2.3e+69) (/ z b) (/ x a)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -22000000000.0) {
tmp = x / a;
} else if (a <= -2.7e-305) {
tmp = x;
} else if (a <= 2.8e-255) {
tmp = z / b;
} else if (a <= 1.22e-198) {
tmp = x;
} else if (a <= 2.3e+69) {
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 <= (-22000000000.0d0)) then
tmp = x / a
else if (a <= (-2.7d-305)) then
tmp = x
else if (a <= 2.8d-255) then
tmp = z / b
else if (a <= 1.22d-198) then
tmp = x
else if (a <= 2.3d+69) 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 <= -22000000000.0) {
tmp = x / a;
} else if (a <= -2.7e-305) {
tmp = x;
} else if (a <= 2.8e-255) {
tmp = z / b;
} else if (a <= 1.22e-198) {
tmp = x;
} else if (a <= 2.3e+69) {
tmp = z / b;
} else {
tmp = x / a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -22000000000.0: tmp = x / a elif a <= -2.7e-305: tmp = x elif a <= 2.8e-255: tmp = z / b elif a <= 1.22e-198: tmp = x elif a <= 2.3e+69: tmp = z / b else: tmp = x / a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -22000000000.0) tmp = Float64(x / a); elseif (a <= -2.7e-305) tmp = x; elseif (a <= 2.8e-255) tmp = Float64(z / b); elseif (a <= 1.22e-198) tmp = x; elseif (a <= 2.3e+69) 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 <= -22000000000.0) tmp = x / a; elseif (a <= -2.7e-305) tmp = x; elseif (a <= 2.8e-255) tmp = z / b; elseif (a <= 1.22e-198) tmp = x; elseif (a <= 2.3e+69) tmp = z / b; else tmp = x / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -22000000000.0], N[(x / a), $MachinePrecision], If[LessEqual[a, -2.7e-305], x, If[LessEqual[a, 2.8e-255], N[(z / b), $MachinePrecision], If[LessEqual[a, 1.22e-198], x, If[LessEqual[a, 2.3e+69], N[(z / b), $MachinePrecision], N[(x / a), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -22000000000:\\
\;\;\;\;\frac{x}{a}\\
\mathbf{elif}\;a \leq -2.7 \cdot 10^{-305}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 2.8 \cdot 10^{-255}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;a \leq 1.22 \cdot 10^{-198}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 2.3 \cdot 10^{+69}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a}\\
\end{array}
\end{array}
if a < -2.2e10 or 2.30000000000000017e69 < a Initial program 77.8%
*-commutative77.8%
associate-*l/75.6%
*-commutative75.6%
associate-*l/77.1%
Simplified77.1%
Taylor expanded in x around inf 60.7%
Taylor expanded in a around inf 50.9%
if -2.2e10 < a < -2.6999999999999999e-305 or 2.80000000000000011e-255 < a < 1.22e-198Initial program 86.3%
*-commutative86.3%
associate-*l/86.1%
*-commutative86.1%
associate-*l/84.7%
Simplified84.7%
Taylor expanded in t around inf 51.4%
Taylor expanded in a around 0 51.4%
if -2.6999999999999999e-305 < a < 2.80000000000000011e-255 or 1.22e-198 < a < 2.30000000000000017e69Initial program 64.8%
*-commutative64.8%
associate-*l/62.3%
*-commutative62.3%
associate-*l/60.9%
Simplified60.9%
Taylor expanded in t around 0 56.5%
Final simplification52.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -1.5e-133) (not (<= t 1.7e-211))) (/ (+ x (* z (/ y t))) (+ a (+ 1.0 (/ y (/ t b))))) (/ (* y z) (+ (* y b) (* t (+ a 1.0))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -1.5e-133) || !(t <= 1.7e-211)) {
tmp = (x + (z * (y / t))) / (a + (1.0 + (y / (t / b))));
} else {
tmp = (y * z) / ((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) :: tmp
if ((t <= (-1.5d-133)) .or. (.not. (t <= 1.7d-211))) then
tmp = (x + (z * (y / t))) / (a + (1.0d0 + (y / (t / b))))
else
tmp = (y * z) / ((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 tmp;
if ((t <= -1.5e-133) || !(t <= 1.7e-211)) {
tmp = (x + (z * (y / t))) / (a + (1.0 + (y / (t / b))));
} else {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -1.5e-133) or not (t <= 1.7e-211): tmp = (x + (z * (y / t))) / (a + (1.0 + (y / (t / b)))) else: tmp = (y * z) / ((y * b) + (t * (a + 1.0))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -1.5e-133) || !(t <= 1.7e-211)) tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(a + Float64(1.0 + Float64(y / Float64(t / b))))); else tmp = Float64(Float64(y * z) / Float64(Float64(y * b) + Float64(t * Float64(a + 1.0)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -1.5e-133) || ~((t <= 1.7e-211))) tmp = (x + (z * (y / t))) / (a + (1.0 + (y / (t / b)))); else tmp = (y * z) / ((y * b) + (t * (a + 1.0))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -1.5e-133], N[Not[LessEqual[t, 1.7e-211]], $MachinePrecision]], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + N[(1.0 + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * z), $MachinePrecision] / N[(N[(y * b), $MachinePrecision] + N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.5 \cdot 10^{-133} \lor \neg \left(t \leq 1.7 \cdot 10^{-211}\right):\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + \left(1 + \frac{y}{\frac{t}{b}}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot z}{y \cdot b + t \cdot \left(a + 1\right)}\\
\end{array}
\end{array}
if t < -1.5000000000000001e-133 or 1.7e-211 < t Initial program 80.4%
associate-/l*82.6%
associate-+l+82.6%
associate-/l*84.1%
Simplified84.1%
associate-/r/83.4%
Applied egg-rr83.4%
if -1.5000000000000001e-133 < t < 1.7e-211Initial program 62.5%
*-commutative62.5%
associate-*l/49.1%
*-commutative49.1%
associate-*l/43.9%
Simplified43.9%
Taylor expanded in x around 0 51.0%
Taylor expanded in t around 0 71.1%
Final simplification80.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -8.5e-133) (not (<= t 5.7e-210))) (/ (+ x (/ y (/ t z))) (+ a (+ 1.0 (* b (/ y t))))) (/ (* y z) (+ (* y b) (* t (+ a 1.0))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -8.5e-133) || !(t <= 5.7e-210)) {
tmp = (x + (y / (t / z))) / (a + (1.0 + (b * (y / t))));
} else {
tmp = (y * z) / ((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) :: tmp
if ((t <= (-8.5d-133)) .or. (.not. (t <= 5.7d-210))) then
tmp = (x + (y / (t / z))) / (a + (1.0d0 + (b * (y / t))))
else
tmp = (y * z) / ((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 tmp;
if ((t <= -8.5e-133) || !(t <= 5.7e-210)) {
tmp = (x + (y / (t / z))) / (a + (1.0 + (b * (y / t))));
} else {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -8.5e-133) or not (t <= 5.7e-210): tmp = (x + (y / (t / z))) / (a + (1.0 + (b * (y / t)))) else: tmp = (y * z) / ((y * b) + (t * (a + 1.0))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -8.5e-133) || !(t <= 5.7e-210)) tmp = Float64(Float64(x + Float64(y / Float64(t / z))) / Float64(a + Float64(1.0 + Float64(b * Float64(y / t))))); else tmp = Float64(Float64(y * z) / Float64(Float64(y * b) + Float64(t * Float64(a + 1.0)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -8.5e-133) || ~((t <= 5.7e-210))) tmp = (x + (y / (t / z))) / (a + (1.0 + (b * (y / t)))); else tmp = (y * z) / ((y * b) + (t * (a + 1.0))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -8.5e-133], N[Not[LessEqual[t, 5.7e-210]], $MachinePrecision]], N[(N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + N[(1.0 + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * z), $MachinePrecision] / N[(N[(y * b), $MachinePrecision] + N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8.5 \cdot 10^{-133} \lor \neg \left(t \leq 5.7 \cdot 10^{-210}\right):\\
\;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{a + \left(1 + b \cdot \frac{y}{t}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot z}{y \cdot b + t \cdot \left(a + 1\right)}\\
\end{array}
\end{array}
if t < -8.49999999999999957e-133 or 5.69999999999999971e-210 < t Initial program 80.4%
associate-/l*82.6%
associate-+l+82.6%
associate-/l*84.1%
Simplified84.1%
*-un-lft-identity84.1%
div-inv84.1%
times-frac82.6%
Applied egg-rr82.6%
Taylor expanded in t around 0 82.6%
*-commutative82.6%
associate-*l/84.5%
Simplified84.5%
if -8.49999999999999957e-133 < t < 5.69999999999999971e-210Initial program 62.5%
*-commutative62.5%
associate-*l/49.1%
*-commutative49.1%
associate-*l/43.9%
Simplified43.9%
Taylor expanded in x around 0 51.0%
Taylor expanded in t around 0 71.1%
Final simplification81.5%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -1.8e-76)
(/ (+ x (* y (/ z t))) (+ (+ a 1.0) (* y (/ b t))))
(if (<= t 5.5e-210)
(/ (* y z) (+ (* y b) (* t (+ a 1.0))))
(/ (+ x (* z (/ y 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 <= -1.8e-76) {
tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t)));
} else if (t <= 5.5e-210) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} else {
tmp = (x + (z * (y / 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 <= (-1.8d-76)) then
tmp = (x + (y * (z / t))) / ((a + 1.0d0) + (y * (b / t)))
else if (t <= 5.5d-210) then
tmp = (y * z) / ((y * b) + (t * (a + 1.0d0)))
else
tmp = (x + (z * (y / 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 <= -1.8e-76) {
tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t)));
} else if (t <= 5.5e-210) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} else {
tmp = (x + (z * (y / t))) / (a + (1.0 + (y / (t / b))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -1.8e-76: tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t))) elif t <= 5.5e-210: tmp = (y * z) / ((y * b) + (t * (a + 1.0))) else: tmp = (x + (z * (y / t))) / (a + (1.0 + (y / (t / b)))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -1.8e-76) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(Float64(a + 1.0) + Float64(y * Float64(b / t)))); elseif (t <= 5.5e-210) tmp = Float64(Float64(y * z) / Float64(Float64(y * b) + Float64(t * Float64(a + 1.0)))); else tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(a + Float64(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 <= -1.8e-76) tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t))); elseif (t <= 5.5e-210) tmp = (y * z) / ((y * b) + (t * (a + 1.0))); else tmp = (x + (z * (y / t))) / (a + (1.0 + (y / (t / b)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -1.8e-76], 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], If[LessEqual[t, 5.5e-210], N[(N[(y * z), $MachinePrecision] / N[(N[(y * b), $MachinePrecision] + N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + N[(1.0 + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.8 \cdot 10^{-76}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
\mathbf{elif}\;t \leq 5.5 \cdot 10^{-210}:\\
\;\;\;\;\frac{y \cdot z}{y \cdot b + t \cdot \left(a + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + \left(1 + \frac{y}{\frac{t}{b}}\right)}\\
\end{array}
\end{array}
if t < -1.8e-76Initial program 85.7%
*-commutative85.7%
associate-*l/91.3%
*-commutative91.3%
associate-*l/92.4%
Simplified92.4%
if -1.8e-76 < t < 5.50000000000000024e-210Initial program 62.9%
*-commutative62.9%
associate-*l/50.9%
*-commutative50.9%
associate-*l/46.7%
Simplified46.7%
Taylor expanded in x around 0 51.1%
Taylor expanded in t around 0 68.6%
if 5.50000000000000024e-210 < t Initial program 77.9%
associate-/l*78.0%
associate-+l+78.0%
associate-/l*80.0%
Simplified80.0%
associate-/r/79.0%
Applied egg-rr79.0%
Final simplification80.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (/ y (/ t z)))))
(if (<= t -1.52e-133)
(/ t_1 (+ a (+ 1.0 (/ y (/ t b)))))
(if (<= t 5.7e-210)
(/ (* y z) (+ (* y b) (* t (+ a 1.0))))
(/ t_1 (+ a (+ 1.0 (* b (/ y t)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (y / (t / z));
double tmp;
if (t <= -1.52e-133) {
tmp = t_1 / (a + (1.0 + (y / (t / b))));
} else if (t <= 5.7e-210) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} else {
tmp = t_1 / (a + (1.0 + (b * (y / t))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x + (y / (t / z))
if (t <= (-1.52d-133)) then
tmp = t_1 / (a + (1.0d0 + (y / (t / b))))
else if (t <= 5.7d-210) then
tmp = (y * z) / ((y * b) + (t * (a + 1.0d0)))
else
tmp = t_1 / (a + (1.0d0 + (b * (y / t))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (y / (t / z));
double tmp;
if (t <= -1.52e-133) {
tmp = t_1 / (a + (1.0 + (y / (t / b))));
} else if (t <= 5.7e-210) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} else {
tmp = t_1 / (a + (1.0 + (b * (y / t))));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (y / (t / z)) tmp = 0 if t <= -1.52e-133: tmp = t_1 / (a + (1.0 + (y / (t / b)))) elif t <= 5.7e-210: tmp = (y * z) / ((y * b) + (t * (a + 1.0))) else: tmp = t_1 / (a + (1.0 + (b * (y / t)))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(y / Float64(t / z))) tmp = 0.0 if (t <= -1.52e-133) tmp = Float64(t_1 / Float64(a + Float64(1.0 + Float64(y / Float64(t / b))))); elseif (t <= 5.7e-210) tmp = Float64(Float64(y * z) / Float64(Float64(y * b) + Float64(t * Float64(a + 1.0)))); else tmp = Float64(t_1 / Float64(a + Float64(1.0 + Float64(b * Float64(y / t))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (y / (t / z)); tmp = 0.0; if (t <= -1.52e-133) tmp = t_1 / (a + (1.0 + (y / (t / b)))); elseif (t <= 5.7e-210) tmp = (y * z) / ((y * b) + (t * (a + 1.0))); else tmp = t_1 / (a + (1.0 + (b * (y / t)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.52e-133], N[(t$95$1 / N[(a + N[(1.0 + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.7e-210], N[(N[(y * z), $MachinePrecision] / N[(N[(y * b), $MachinePrecision] + N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 / N[(a + N[(1.0 + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y}{\frac{t}{z}}\\
\mathbf{if}\;t \leq -1.52 \cdot 10^{-133}:\\
\;\;\;\;\frac{t_1}{a + \left(1 + \frac{y}{\frac{t}{b}}\right)}\\
\mathbf{elif}\;t \leq 5.7 \cdot 10^{-210}:\\
\;\;\;\;\frac{y \cdot z}{y \cdot b + t \cdot \left(a + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{t_1}{a + \left(1 + b \cdot \frac{y}{t}\right)}\\
\end{array}
\end{array}
if t < -1.52000000000000001e-133Initial program 82.8%
associate-/l*87.1%
associate-+l+87.1%
associate-/l*88.0%
Simplified88.0%
if -1.52000000000000001e-133 < t < 5.69999999999999971e-210Initial program 62.5%
*-commutative62.5%
associate-*l/49.1%
*-commutative49.1%
associate-*l/43.9%
Simplified43.9%
Taylor expanded in x around 0 51.0%
Taylor expanded in t around 0 71.1%
if 5.69999999999999971e-210 < t Initial program 77.9%
associate-/l*78.0%
associate-+l+78.0%
associate-/l*80.0%
Simplified80.0%
*-un-lft-identity80.0%
div-inv80.0%
times-frac77.9%
Applied egg-rr77.9%
Taylor expanded in t around 0 78.0%
*-commutative78.0%
associate-*l/80.8%
Simplified80.8%
Final simplification81.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -5.5e+118) (not (<= b 6.5e+191))) (/ z 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 ((b <= -5.5e+118) || !(b <= 6.5e+191)) {
tmp = z / 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 ((b <= (-5.5d+118)) .or. (.not. (b <= 6.5d+191))) then
tmp = z / 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 ((b <= -5.5e+118) || !(b <= 6.5e+191)) {
tmp = z / b;
} else {
tmp = (x + (y * (z / t))) / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -5.5e+118) or not (b <= 6.5e+191): tmp = z / b else: tmp = (x + (y * (z / t))) / (a + 1.0) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -5.5e+118) || !(b <= 6.5e+191)) tmp = Float64(z / 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 ((b <= -5.5e+118) || ~((b <= 6.5e+191))) tmp = z / b; else tmp = (x + (y * (z / t))) / (a + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -5.5e+118], N[Not[LessEqual[b, 6.5e+191]], $MachinePrecision]], N[(z / b), $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}\;b \leq -5.5 \cdot 10^{+118} \lor \neg \left(b \leq 6.5 \cdot 10^{+191}\right):\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + 1}\\
\end{array}
\end{array}
if b < -5.5000000000000003e118 or 6.50000000000000008e191 < b Initial program 59.2%
*-commutative59.2%
associate-*l/53.7%
*-commutative53.7%
associate-*l/51.0%
Simplified51.0%
Taylor expanded in t around 0 65.4%
if -5.5000000000000003e118 < b < 6.50000000000000008e191Initial program 82.9%
*-commutative82.9%
associate-*l/82.5%
*-commutative82.5%
associate-*l/83.5%
Simplified83.5%
Taylor expanded in b around 0 72.9%
Final simplification70.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -2.25e+119) (not (<= b 8e+191))) (/ z b) (/ (+ x (/ y (/ t z))) (+ a 1.0))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -2.25e+119) || !(b <= 8e+191)) {
tmp = z / b;
} else {
tmp = (x + (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) :: tmp
if ((b <= (-2.25d+119)) .or. (.not. (b <= 8d+191))) then
tmp = z / b
else
tmp = (x + (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 tmp;
if ((b <= -2.25e+119) || !(b <= 8e+191)) {
tmp = z / b;
} else {
tmp = (x + (y / (t / z))) / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -2.25e+119) or not (b <= 8e+191): tmp = z / b else: tmp = (x + (y / (t / z))) / (a + 1.0) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -2.25e+119) || !(b <= 8e+191)) tmp = Float64(z / b); else tmp = Float64(Float64(x + Float64(y / Float64(t / z))) / Float64(a + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -2.25e+119) || ~((b <= 8e+191))) tmp = z / b; else tmp = (x + (y / (t / z))) / (a + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -2.25e+119], N[Not[LessEqual[b, 8e+191]], $MachinePrecision]], N[(z / b), $MachinePrecision], N[(N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.25 \cdot 10^{+119} \lor \neg \left(b \leq 8 \cdot 10^{+191}\right):\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{a + 1}\\
\end{array}
\end{array}
if b < -2.2500000000000001e119 or 8.00000000000000058e191 < b Initial program 59.2%
*-commutative59.2%
associate-*l/53.7%
*-commutative53.7%
associate-*l/51.0%
Simplified51.0%
Taylor expanded in t around 0 65.4%
if -2.2500000000000001e119 < b < 8.00000000000000058e191Initial program 82.9%
associate-/l*83.3%
associate-+l+83.3%
associate-/l*84.3%
Simplified84.3%
*-un-lft-identity84.3%
div-inv84.3%
times-frac83.2%
Applied egg-rr83.2%
Taylor expanded in b around 0 72.8%
associate-/l*73.7%
Simplified73.7%
Final simplification71.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -3.4e-80) (not (<= t 8.5e-92))) (/ x (+ a 1.0)) (/ z b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -3.4e-80) || !(t <= 8.5e-92)) {
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 <= (-3.4d-80)) .or. (.not. (t <= 8.5d-92))) 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 <= -3.4e-80) || !(t <= 8.5e-92)) {
tmp = x / (a + 1.0);
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -3.4e-80) or not (t <= 8.5e-92): tmp = x / (a + 1.0) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -3.4e-80) || !(t <= 8.5e-92)) 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 <= -3.4e-80) || ~((t <= 8.5e-92))) 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, -3.4e-80], N[Not[LessEqual[t, 8.5e-92]], $MachinePrecision]], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.4 \cdot 10^{-80} \lor \neg \left(t \leq 8.5 \cdot 10^{-92}\right):\\
\;\;\;\;\frac{x}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if t < -3.4000000000000001e-80 or 8.50000000000000067e-92 < t Initial program 83.5%
*-commutative83.5%
associate-*l/87.3%
*-commutative87.3%
associate-*l/90.3%
Simplified90.3%
Taylor expanded in t around inf 57.4%
if -3.4000000000000001e-80 < t < 8.50000000000000067e-92Initial program 64.9%
*-commutative64.9%
associate-*l/54.0%
*-commutative54.0%
associate-*l/49.0%
Simplified49.0%
Taylor expanded in t around 0 53.6%
Final simplification55.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -22000000000.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 <= -22000000000.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 <= (-22000000000.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 <= -22000000000.0) || !(a <= 1.0)) {
tmp = x / a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -22000000000.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 <= -22000000000.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 <= -22000000000.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, -22000000000.0], N[Not[LessEqual[a, 1.0]], $MachinePrecision]], N[(x / a), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -22000000000 \lor \neg \left(a \leq 1\right):\\
\;\;\;\;\frac{x}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -2.2e10 or 1 < a Initial program 74.8%
*-commutative74.8%
associate-*l/72.8%
*-commutative72.8%
associate-*l/74.8%
Simplified74.8%
Taylor expanded in x around inf 58.3%
Taylor expanded in a around inf 46.3%
if -2.2e10 < a < 1Initial program 78.4%
*-commutative78.4%
associate-*l/76.8%
*-commutative76.8%
associate-*l/74.4%
Simplified74.4%
Taylor expanded in t around inf 40.3%
Taylor expanded in a around 0 39.8%
Final simplification43.3%
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
return x;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x;
}
def code(x, y, z, t, a, b): return x
function code(x, y, z, t, a, b) return x end
function tmp = code(x, y, z, t, a, b) tmp = x; end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 76.4%
*-commutative76.4%
associate-*l/74.6%
*-commutative74.6%
associate-*l/74.6%
Simplified74.6%
Taylor expanded in t around inf 43.8%
Taylor expanded in a around 0 20.3%
Final simplification20.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 2024019
(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))))