
(FPCore (x y z t a b) :precision binary64 (* x (exp (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b))))))
double code(double x, double y, double z, double t, double a, double b) {
return x * exp(((y * (log(z) - t)) + (a * (log((1.0 - z)) - b))));
}
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 * exp(((y * (log(z) - t)) + (a * (log((1.0d0 - z)) - b))))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x * Math.exp(((y * (Math.log(z) - t)) + (a * (Math.log((1.0 - z)) - b))));
}
def code(x, y, z, t, a, b): return x * math.exp(((y * (math.log(z) - t)) + (a * (math.log((1.0 - z)) - b))))
function code(x, y, z, t, a, b) return Float64(x * exp(Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(log(Float64(1.0 - z)) - b))))) end
function tmp = code(x, y, z, t, a, b) tmp = x * exp(((y * (log(z) - t)) + (a * (log((1.0 - z)) - b)))); end
code[x_, y_, z_, t_, a_, b_] := N[(x * N[Exp[N[(N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision] + N[(a * N[(N[Log[N[(1.0 - z), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (* x (exp (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b))))))
double code(double x, double y, double z, double t, double a, double b) {
return x * exp(((y * (log(z) - t)) + (a * (log((1.0 - z)) - b))));
}
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 * exp(((y * (log(z) - t)) + (a * (log((1.0d0 - z)) - b))))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x * Math.exp(((y * (Math.log(z) - t)) + (a * (Math.log((1.0 - z)) - b))));
}
def code(x, y, z, t, a, b): return x * math.exp(((y * (math.log(z) - t)) + (a * (math.log((1.0 - z)) - b))))
function code(x, y, z, t, a, b) return Float64(x * exp(Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(log(Float64(1.0 - z)) - b))))) end
function tmp = code(x, y, z, t, a, b) tmp = x * exp(((y * (log(z) - t)) + (a * (log((1.0 - z)) - b)))); end
code[x_, y_, z_, t_, a_, b_] := N[(x * N[Exp[N[(N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision] + N[(a * N[(N[Log[N[(1.0 - z), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)}
\end{array}
(FPCore (x y z t a b) :precision binary64 (* x (exp (fma y (- (log z) t) (* a (- (log1p (- z)) b))))))
double code(double x, double y, double z, double t, double a, double b) {
return x * exp(fma(y, (log(z) - t), (a * (log1p(-z) - b))));
}
function code(x, y, z, t, a, b) return Float64(x * exp(fma(y, Float64(log(z) - t), Float64(a * Float64(log1p(Float64(-z)) - b))))) end
code[x_, y_, z_, t_, a_, b_] := N[(x * N[Exp[N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision] + N[(a * N[(N[Log[1 + (-z)], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot e^{\mathsf{fma}\left(y, \log z - t, a \cdot \left(\mathsf{log1p}\left(-z\right) - b\right)\right)}
\end{array}
Initial program 97.4%
fma-define97.4%
sub-neg97.4%
log1p-define99.2%
Simplified99.2%
(FPCore (x y z t a b) :precision binary64 (* x (exp (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b))))))
double code(double x, double y, double z, double t, double a, double b) {
return x * exp(((y * (log(z) - t)) + (a * (log((1.0 - z)) - b))));
}
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 * exp(((y * (log(z) - t)) + (a * (log((1.0d0 - z)) - b))))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x * Math.exp(((y * (Math.log(z) - t)) + (a * (Math.log((1.0 - z)) - b))));
}
def code(x, y, z, t, a, b): return x * math.exp(((y * (math.log(z) - t)) + (a * (math.log((1.0 - z)) - b))))
function code(x, y, z, t, a, b) return Float64(x * exp(Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(log(Float64(1.0 - z)) - b))))) end
function tmp = code(x, y, z, t, a, b) tmp = x * exp(((y * (log(z) - t)) + (a * (log((1.0 - z)) - b)))); end
code[x_, y_, z_, t_, a_, b_] := N[(x * N[Exp[N[(N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision] + N[(a * N[(N[Log[N[(1.0 - z), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)}
\end{array}
Initial program 97.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.05e-11) (not (<= y 6.3e-12))) (* x (exp (* y (- (log z) t)))) (* x (exp (* a (- (+ z b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.05e-11) || !(y <= 6.3e-12)) {
tmp = x * exp((y * (log(z) - t)));
} else {
tmp = x * exp((a * -(z + b)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-1.05d-11)) .or. (.not. (y <= 6.3d-12))) then
tmp = x * exp((y * (log(z) - t)))
else
tmp = x * exp((a * -(z + b)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.05e-11) || !(y <= 6.3e-12)) {
tmp = x * Math.exp((y * (Math.log(z) - t)));
} else {
tmp = x * Math.exp((a * -(z + b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1.05e-11) or not (y <= 6.3e-12): tmp = x * math.exp((y * (math.log(z) - t))) else: tmp = x * math.exp((a * -(z + b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1.05e-11) || !(y <= 6.3e-12)) tmp = Float64(x * exp(Float64(y * Float64(log(z) - t)))); else tmp = Float64(x * exp(Float64(a * Float64(-Float64(z + b))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -1.05e-11) || ~((y <= 6.3e-12))) tmp = x * exp((y * (log(z) - t))); else tmp = x * exp((a * -(z + b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1.05e-11], N[Not[LessEqual[y, 6.3e-12]], $MachinePrecision]], N[(x * N[Exp[N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(x * N[Exp[N[(a * (-N[(z + b), $MachinePrecision])), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.05 \cdot 10^{-11} \lor \neg \left(y \leq 6.3 \cdot 10^{-12}\right):\\
\;\;\;\;x \cdot e^{y \cdot \left(\log z - t\right)}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{a \cdot \left(-\left(z + b\right)\right)}\\
\end{array}
\end{array}
if y < -1.0499999999999999e-11 or 6.3000000000000002e-12 < y Initial program 97.6%
Taylor expanded in y around inf 87.3%
if -1.0499999999999999e-11 < y < 6.3000000000000002e-12Initial program 97.2%
Taylor expanded in y around 0 87.8%
sub-neg87.8%
log1p-define91.3%
Simplified91.3%
Taylor expanded in z around 0 91.3%
+-commutative91.3%
associate-*r*91.3%
associate-*r*91.3%
distribute-lft-out91.3%
mul-1-neg91.3%
Simplified91.3%
Final simplification89.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -4.3e+136) (not (<= y 2.6e+25))) (* x (pow z y)) (* x (exp (* a (- (+ z b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -4.3e+136) || !(y <= 2.6e+25)) {
tmp = x * pow(z, y);
} else {
tmp = x * exp((a * -(z + b)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-4.3d+136)) .or. (.not. (y <= 2.6d+25))) then
tmp = x * (z ** y)
else
tmp = x * exp((a * -(z + b)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -4.3e+136) || !(y <= 2.6e+25)) {
tmp = x * Math.pow(z, y);
} else {
tmp = x * Math.exp((a * -(z + b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -4.3e+136) or not (y <= 2.6e+25): tmp = x * math.pow(z, y) else: tmp = x * math.exp((a * -(z + b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -4.3e+136) || !(y <= 2.6e+25)) tmp = Float64(x * (z ^ y)); else tmp = Float64(x * exp(Float64(a * Float64(-Float64(z + b))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -4.3e+136) || ~((y <= 2.6e+25))) tmp = x * (z ^ y); else tmp = x * exp((a * -(z + b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -4.3e+136], N[Not[LessEqual[y, 2.6e+25]], $MachinePrecision]], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision], N[(x * N[Exp[N[(a * (-N[(z + b), $MachinePrecision])), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.3 \cdot 10^{+136} \lor \neg \left(y \leq 2.6 \cdot 10^{+25}\right):\\
\;\;\;\;x \cdot {z}^{y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{a \cdot \left(-\left(z + b\right)\right)}\\
\end{array}
\end{array}
if y < -4.2999999999999999e136 or 2.5999999999999998e25 < y Initial program 97.5%
Taylor expanded in y around inf 92.7%
Taylor expanded in t around 0 72.0%
if -4.2999999999999999e136 < y < 2.5999999999999998e25Initial program 97.3%
Taylor expanded in y around 0 79.8%
sub-neg79.8%
log1p-define83.5%
Simplified83.5%
Taylor expanded in z around 0 83.5%
+-commutative83.5%
associate-*r*83.5%
associate-*r*83.5%
distribute-lft-out83.5%
mul-1-neg83.5%
Simplified83.5%
Final simplification79.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -4.4e+136) (not (<= y 1.1e-8))) (* x (pow z y)) (* x (exp (* a (- b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -4.4e+136) || !(y <= 1.1e-8)) {
tmp = x * pow(z, y);
} else {
tmp = x * exp((a * -b));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-4.4d+136)) .or. (.not. (y <= 1.1d-8))) then
tmp = x * (z ** y)
else
tmp = x * exp((a * -b))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -4.4e+136) || !(y <= 1.1e-8)) {
tmp = x * Math.pow(z, y);
} else {
tmp = x * Math.exp((a * -b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -4.4e+136) or not (y <= 1.1e-8): tmp = x * math.pow(z, y) else: tmp = x * math.exp((a * -b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -4.4e+136) || !(y <= 1.1e-8)) tmp = Float64(x * (z ^ y)); else tmp = Float64(x * exp(Float64(a * Float64(-b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -4.4e+136) || ~((y <= 1.1e-8))) tmp = x * (z ^ y); else tmp = x * exp((a * -b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -4.4e+136], N[Not[LessEqual[y, 1.1e-8]], $MachinePrecision]], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision], N[(x * N[Exp[N[(a * (-b)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.4 \cdot 10^{+136} \lor \neg \left(y \leq 1.1 \cdot 10^{-8}\right):\\
\;\;\;\;x \cdot {z}^{y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{a \cdot \left(-b\right)}\\
\end{array}
\end{array}
if y < -4.3999999999999999e136 or 1.0999999999999999e-8 < y Initial program 96.8%
Taylor expanded in y around inf 91.6%
Taylor expanded in t around 0 68.6%
if -4.3999999999999999e136 < y < 1.0999999999999999e-8Initial program 97.7%
Taylor expanded in b around inf 83.1%
mul-1-neg83.1%
distribute-rgt-neg-out83.1%
Simplified83.1%
Final simplification77.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -9e-15) (not (<= y 2.2e-34))) (* x (pow z y)) (* x (* z (- (/ (- 1.0 (* a b)) z) a)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -9e-15) || !(y <= 2.2e-34)) {
tmp = x * pow(z, y);
} else {
tmp = x * (z * (((1.0 - (a * b)) / z) - 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 ((y <= (-9d-15)) .or. (.not. (y <= 2.2d-34))) then
tmp = x * (z ** y)
else
tmp = x * (z * (((1.0d0 - (a * b)) / z) - 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 ((y <= -9e-15) || !(y <= 2.2e-34)) {
tmp = x * Math.pow(z, y);
} else {
tmp = x * (z * (((1.0 - (a * b)) / z) - a));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -9e-15) or not (y <= 2.2e-34): tmp = x * math.pow(z, y) else: tmp = x * (z * (((1.0 - (a * b)) / z) - a)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -9e-15) || !(y <= 2.2e-34)) tmp = Float64(x * (z ^ y)); else tmp = Float64(x * Float64(z * Float64(Float64(Float64(1.0 - Float64(a * b)) / z) - a))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -9e-15) || ~((y <= 2.2e-34))) tmp = x * (z ^ y); else tmp = x * (z * (((1.0 - (a * b)) / z) - a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -9e-15], N[Not[LessEqual[y, 2.2e-34]], $MachinePrecision]], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision], N[(x * N[(z * N[(N[(N[(1.0 - N[(a * b), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9 \cdot 10^{-15} \lor \neg \left(y \leq 2.2 \cdot 10^{-34}\right):\\
\;\;\;\;x \cdot {z}^{y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(z \cdot \left(\frac{1 - a \cdot b}{z} - a\right)\right)\\
\end{array}
\end{array}
if y < -8.9999999999999995e-15 or 2.1999999999999999e-34 < y Initial program 97.0%
Taylor expanded in y around inf 84.4%
Taylor expanded in t around 0 62.9%
if -8.9999999999999995e-15 < y < 2.1999999999999999e-34Initial program 97.8%
Taylor expanded in y around 0 88.0%
sub-neg88.0%
log1p-define90.9%
Simplified90.9%
Taylor expanded in z around 0 90.9%
+-commutative90.9%
associate-*r*90.9%
associate-*r*90.9%
distribute-lft-out90.9%
mul-1-neg90.9%
Simplified90.9%
Taylor expanded in a around 0 49.9%
associate-*r*49.9%
mul-1-neg49.9%
Simplified49.9%
Taylor expanded in z around inf 55.1%
+-commutative55.1%
mul-1-neg55.1%
unsub-neg55.1%
+-commutative55.1%
mul-1-neg55.1%
unsub-neg55.1%
div-sub55.1%
Simplified55.1%
Final simplification59.1%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -4.1e+33)
(* t (- (/ x t) (* x y)))
(if (<= y 1.32e+16)
(* x (* z (- (/ (- 1.0 (* a b)) z) a)))
(* a (* x (- z))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -4.1e+33) {
tmp = t * ((x / t) - (x * y));
} else if (y <= 1.32e+16) {
tmp = x * (z * (((1.0 - (a * b)) / z) - a));
} else {
tmp = a * (x * -z);
}
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.1d+33)) then
tmp = t * ((x / t) - (x * y))
else if (y <= 1.32d+16) then
tmp = x * (z * (((1.0d0 - (a * b)) / z) - a))
else
tmp = a * (x * -z)
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.1e+33) {
tmp = t * ((x / t) - (x * y));
} else if (y <= 1.32e+16) {
tmp = x * (z * (((1.0 - (a * b)) / z) - a));
} else {
tmp = a * (x * -z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -4.1e+33: tmp = t * ((x / t) - (x * y)) elif y <= 1.32e+16: tmp = x * (z * (((1.0 - (a * b)) / z) - a)) else: tmp = a * (x * -z) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -4.1e+33) tmp = Float64(t * Float64(Float64(x / t) - Float64(x * y))); elseif (y <= 1.32e+16) tmp = Float64(x * Float64(z * Float64(Float64(Float64(1.0 - Float64(a * b)) / z) - a))); else tmp = Float64(a * Float64(x * Float64(-z))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -4.1e+33) tmp = t * ((x / t) - (x * y)); elseif (y <= 1.32e+16) tmp = x * (z * (((1.0 - (a * b)) / z) - a)); else tmp = a * (x * -z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -4.1e+33], N[(t * N[(N[(x / t), $MachinePrecision] - N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.32e+16], N[(x * N[(z * N[(N[(N[(1.0 - N[(a * b), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(x * (-z)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.1 \cdot 10^{+33}:\\
\;\;\;\;t \cdot \left(\frac{x}{t} - x \cdot y\right)\\
\mathbf{elif}\;y \leq 1.32 \cdot 10^{+16}:\\
\;\;\;\;x \cdot \left(z \cdot \left(\frac{1 - a \cdot b}{z} - a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-z\right)\right)\\
\end{array}
\end{array}
if y < -4.09999999999999995e33Initial program 97.8%
Taylor expanded in t around inf 58.8%
mul-1-neg58.8%
distribute-lft-neg-out58.8%
*-commutative58.8%
Simplified58.8%
Taylor expanded in y around 0 15.8%
mul-1-neg15.8%
*-commutative15.8%
unsub-neg15.8%
Simplified15.8%
Taylor expanded in t around inf 22.0%
neg-mul-122.0%
+-commutative22.0%
sub-neg22.0%
Simplified22.0%
if -4.09999999999999995e33 < y < 1.32e16Initial program 97.6%
Taylor expanded in y around 0 82.2%
sub-neg82.2%
log1p-define86.4%
Simplified86.4%
Taylor expanded in z around 0 86.4%
+-commutative86.4%
associate-*r*86.4%
associate-*r*86.4%
distribute-lft-out86.4%
mul-1-neg86.4%
Simplified86.4%
Taylor expanded in a around 0 45.2%
associate-*r*45.2%
mul-1-neg45.2%
Simplified45.2%
Taylor expanded in z around inf 50.5%
+-commutative50.5%
mul-1-neg50.5%
unsub-neg50.5%
+-commutative50.5%
mul-1-neg50.5%
unsub-neg50.5%
div-sub50.5%
Simplified50.5%
if 1.32e16 < y Initial program 96.4%
Taylor expanded in y around 0 32.9%
sub-neg32.9%
log1p-define32.8%
Simplified32.8%
Taylor expanded in z around 0 32.8%
+-commutative32.8%
associate-*r*32.8%
associate-*r*32.8%
distribute-lft-out32.8%
mul-1-neg32.8%
Simplified32.8%
Taylor expanded in a around 0 8.1%
associate-*r*8.1%
mul-1-neg8.1%
Simplified8.1%
Taylor expanded in z around inf 30.3%
associate-*r*30.3%
mul-1-neg30.3%
Simplified30.3%
Final simplification41.2%
(FPCore (x y z t a b) :precision binary64 (if (<= y -4e-109) (* t (- (/ x t) (* x y))) (if (<= y 1.06e+17) (- x (* a (* x (+ z b)))) (* a (* x (- z))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -4e-109) {
tmp = t * ((x / t) - (x * y));
} else if (y <= 1.06e+17) {
tmp = x - (a * (x * (z + b)));
} else {
tmp = a * (x * -z);
}
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 <= (-4d-109)) then
tmp = t * ((x / t) - (x * y))
else if (y <= 1.06d+17) then
tmp = x - (a * (x * (z + b)))
else
tmp = a * (x * -z)
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 <= -4e-109) {
tmp = t * ((x / t) - (x * y));
} else if (y <= 1.06e+17) {
tmp = x - (a * (x * (z + b)));
} else {
tmp = a * (x * -z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -4e-109: tmp = t * ((x / t) - (x * y)) elif y <= 1.06e+17: tmp = x - (a * (x * (z + b))) else: tmp = a * (x * -z) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -4e-109) tmp = Float64(t * Float64(Float64(x / t) - Float64(x * y))); elseif (y <= 1.06e+17) tmp = Float64(x - Float64(a * Float64(x * Float64(z + b)))); else tmp = Float64(a * Float64(x * Float64(-z))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -4e-109) tmp = t * ((x / t) - (x * y)); elseif (y <= 1.06e+17) tmp = x - (a * (x * (z + b))); else tmp = a * (x * -z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -4e-109], N[(t * N[(N[(x / t), $MachinePrecision] - N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.06e+17], N[(x - N[(a * N[(x * N[(z + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(x * (-z)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4 \cdot 10^{-109}:\\
\;\;\;\;t \cdot \left(\frac{x}{t} - x \cdot y\right)\\
\mathbf{elif}\;y \leq 1.06 \cdot 10^{+17}:\\
\;\;\;\;x - a \cdot \left(x \cdot \left(z + b\right)\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-z\right)\right)\\
\end{array}
\end{array}
if y < -4e-109Initial program 98.7%
Taylor expanded in t around inf 56.3%
mul-1-neg56.3%
distribute-lft-neg-out56.3%
*-commutative56.3%
Simplified56.3%
Taylor expanded in y around 0 25.5%
mul-1-neg25.5%
*-commutative25.5%
unsub-neg25.5%
Simplified25.5%
Taylor expanded in t around inf 31.5%
neg-mul-131.5%
+-commutative31.5%
sub-neg31.5%
Simplified31.5%
if -4e-109 < y < 1.06e17Initial program 97.0%
Taylor expanded in y around 0 84.8%
sub-neg84.8%
log1p-define90.2%
Simplified90.2%
Taylor expanded in z around 0 90.2%
+-commutative90.2%
associate-*r*90.2%
associate-*r*90.2%
distribute-lft-out90.2%
mul-1-neg90.2%
Simplified90.2%
Taylor expanded in a around 0 46.6%
mul-1-neg46.6%
unsub-neg46.6%
*-commutative46.6%
Simplified46.6%
if 1.06e17 < y Initial program 96.4%
Taylor expanded in y around 0 32.9%
sub-neg32.9%
log1p-define32.8%
Simplified32.8%
Taylor expanded in z around 0 32.8%
+-commutative32.8%
associate-*r*32.8%
associate-*r*32.8%
distribute-lft-out32.8%
mul-1-neg32.8%
Simplified32.8%
Taylor expanded in a around 0 8.1%
associate-*r*8.1%
mul-1-neg8.1%
Simplified8.1%
Taylor expanded in z around inf 30.3%
associate-*r*30.3%
mul-1-neg30.3%
Simplified30.3%
Final simplification38.4%
(FPCore (x y z t a b) :precision binary64 (if (<= y -6.2e-106) (* t (- (/ x t) (* x y))) (if (<= y 1.15e+16) (- x (* a (* x b))) (* a (* x (- z))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -6.2e-106) {
tmp = t * ((x / t) - (x * y));
} else if (y <= 1.15e+16) {
tmp = x - (a * (x * b));
} else {
tmp = a * (x * -z);
}
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.2d-106)) then
tmp = t * ((x / t) - (x * y))
else if (y <= 1.15d+16) then
tmp = x - (a * (x * b))
else
tmp = a * (x * -z)
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.2e-106) {
tmp = t * ((x / t) - (x * y));
} else if (y <= 1.15e+16) {
tmp = x - (a * (x * b));
} else {
tmp = a * (x * -z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -6.2e-106: tmp = t * ((x / t) - (x * y)) elif y <= 1.15e+16: tmp = x - (a * (x * b)) else: tmp = a * (x * -z) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -6.2e-106) tmp = Float64(t * Float64(Float64(x / t) - Float64(x * y))); elseif (y <= 1.15e+16) tmp = Float64(x - Float64(a * Float64(x * b))); else tmp = Float64(a * Float64(x * Float64(-z))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -6.2e-106) tmp = t * ((x / t) - (x * y)); elseif (y <= 1.15e+16) tmp = x - (a * (x * b)); else tmp = a * (x * -z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -6.2e-106], N[(t * N[(N[(x / t), $MachinePrecision] - N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.15e+16], N[(x - N[(a * N[(x * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(x * (-z)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.2 \cdot 10^{-106}:\\
\;\;\;\;t \cdot \left(\frac{x}{t} - x \cdot y\right)\\
\mathbf{elif}\;y \leq 1.15 \cdot 10^{+16}:\\
\;\;\;\;x - a \cdot \left(x \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-z\right)\right)\\
\end{array}
\end{array}
if y < -6.19999999999999971e-106Initial program 98.7%
Taylor expanded in t around inf 56.3%
mul-1-neg56.3%
distribute-lft-neg-out56.3%
*-commutative56.3%
Simplified56.3%
Taylor expanded in y around 0 25.5%
mul-1-neg25.5%
*-commutative25.5%
unsub-neg25.5%
Simplified25.5%
Taylor expanded in t around inf 31.5%
neg-mul-131.5%
+-commutative31.5%
sub-neg31.5%
Simplified31.5%
if -6.19999999999999971e-106 < y < 1.15e16Initial program 97.0%
Taylor expanded in b around inf 84.8%
mul-1-neg84.8%
distribute-rgt-neg-out84.8%
Simplified84.8%
Taylor expanded in a around 0 46.6%
mul-1-neg46.6%
unsub-neg46.6%
*-commutative46.6%
Simplified46.6%
if 1.15e16 < y Initial program 96.4%
Taylor expanded in y around 0 32.9%
sub-neg32.9%
log1p-define32.8%
Simplified32.8%
Taylor expanded in z around 0 32.8%
+-commutative32.8%
associate-*r*32.8%
associate-*r*32.8%
distribute-lft-out32.8%
mul-1-neg32.8%
Simplified32.8%
Taylor expanded in a around 0 8.1%
associate-*r*8.1%
mul-1-neg8.1%
Simplified8.1%
Taylor expanded in z around inf 30.3%
associate-*r*30.3%
mul-1-neg30.3%
Simplified30.3%
Final simplification38.4%
(FPCore (x y z t a b) :precision binary64 (if (<= y -1.05e+24) (- x (* t (* x y))) (if (<= y 6e+17) (* x (- 1.0 (* a b))) (* a (* x (- z))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.05e+24) {
tmp = x - (t * (x * y));
} else if (y <= 6e+17) {
tmp = x * (1.0 - (a * b));
} else {
tmp = a * (x * -z);
}
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 <= (-1.05d+24)) then
tmp = x - (t * (x * y))
else if (y <= 6d+17) then
tmp = x * (1.0d0 - (a * b))
else
tmp = a * (x * -z)
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 <= -1.05e+24) {
tmp = x - (t * (x * y));
} else if (y <= 6e+17) {
tmp = x * (1.0 - (a * b));
} else {
tmp = a * (x * -z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -1.05e+24: tmp = x - (t * (x * y)) elif y <= 6e+17: tmp = x * (1.0 - (a * b)) else: tmp = a * (x * -z) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -1.05e+24) tmp = Float64(x - Float64(t * Float64(x * y))); elseif (y <= 6e+17) tmp = Float64(x * Float64(1.0 - Float64(a * b))); else tmp = Float64(a * Float64(x * Float64(-z))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -1.05e+24) tmp = x - (t * (x * y)); elseif (y <= 6e+17) tmp = x * (1.0 - (a * b)); else tmp = a * (x * -z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.05e+24], N[(x - N[(t * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6e+17], N[(x * N[(1.0 - N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(x * (-z)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.05 \cdot 10^{+24}:\\
\;\;\;\;x - t \cdot \left(x \cdot y\right)\\
\mathbf{elif}\;y \leq 6 \cdot 10^{+17}:\\
\;\;\;\;x \cdot \left(1 - a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-z\right)\right)\\
\end{array}
\end{array}
if y < -1.0500000000000001e24Initial program 97.8%
Taylor expanded in t around inf 57.6%
mul-1-neg57.6%
distribute-lft-neg-out57.6%
*-commutative57.6%
Simplified57.6%
Taylor expanded in y around 0 17.6%
mul-1-neg17.6%
unsub-neg17.6%
Simplified17.6%
if -1.0500000000000001e24 < y < 6e17Initial program 97.6%
Taylor expanded in b around inf 82.1%
mul-1-neg82.1%
distribute-rgt-neg-out82.1%
Simplified82.1%
Taylor expanded in a around 0 45.4%
mul-1-neg45.4%
unsub-neg45.4%
Simplified45.4%
if 6e17 < y Initial program 96.4%
Taylor expanded in y around 0 32.9%
sub-neg32.9%
log1p-define32.8%
Simplified32.8%
Taylor expanded in z around 0 32.8%
+-commutative32.8%
associate-*r*32.8%
associate-*r*32.8%
distribute-lft-out32.8%
mul-1-neg32.8%
Simplified32.8%
Taylor expanded in a around 0 8.1%
associate-*r*8.1%
mul-1-neg8.1%
Simplified8.1%
Taylor expanded in z around inf 30.3%
associate-*r*30.3%
mul-1-neg30.3%
Simplified30.3%
Final simplification37.2%
(FPCore (x y z t a b) :precision binary64 (if (<= y -3.8e+23) (* t (* x (- y))) (if (<= y 4.1e+16) (* x (- 1.0 (* a b))) (* a (* x (- z))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -3.8e+23) {
tmp = t * (x * -y);
} else if (y <= 4.1e+16) {
tmp = x * (1.0 - (a * b));
} else {
tmp = a * (x * -z);
}
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 <= (-3.8d+23)) then
tmp = t * (x * -y)
else if (y <= 4.1d+16) then
tmp = x * (1.0d0 - (a * b))
else
tmp = a * (x * -z)
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 <= -3.8e+23) {
tmp = t * (x * -y);
} else if (y <= 4.1e+16) {
tmp = x * (1.0 - (a * b));
} else {
tmp = a * (x * -z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -3.8e+23: tmp = t * (x * -y) elif y <= 4.1e+16: tmp = x * (1.0 - (a * b)) else: tmp = a * (x * -z) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -3.8e+23) tmp = Float64(t * Float64(x * Float64(-y))); elseif (y <= 4.1e+16) tmp = Float64(x * Float64(1.0 - Float64(a * b))); else tmp = Float64(a * Float64(x * Float64(-z))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -3.8e+23) tmp = t * (x * -y); elseif (y <= 4.1e+16) tmp = x * (1.0 - (a * b)); else tmp = a * (x * -z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -3.8e+23], N[(t * N[(x * (-y)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.1e+16], N[(x * N[(1.0 - N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(x * (-z)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.8 \cdot 10^{+23}:\\
\;\;\;\;t \cdot \left(x \cdot \left(-y\right)\right)\\
\mathbf{elif}\;y \leq 4.1 \cdot 10^{+16}:\\
\;\;\;\;x \cdot \left(1 - a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-z\right)\right)\\
\end{array}
\end{array}
if y < -3.79999999999999975e23Initial program 97.8%
Taylor expanded in t around inf 57.6%
mul-1-neg57.6%
distribute-lft-neg-out57.6%
*-commutative57.6%
Simplified57.6%
Taylor expanded in y around 0 15.5%
mul-1-neg15.5%
*-commutative15.5%
unsub-neg15.5%
Simplified15.5%
Taylor expanded in y around inf 17.4%
if -3.79999999999999975e23 < y < 4.1e16Initial program 97.6%
Taylor expanded in b around inf 82.1%
mul-1-neg82.1%
distribute-rgt-neg-out82.1%
Simplified82.1%
Taylor expanded in a around 0 45.4%
mul-1-neg45.4%
unsub-neg45.4%
Simplified45.4%
if 4.1e16 < y Initial program 96.4%
Taylor expanded in y around 0 32.9%
sub-neg32.9%
log1p-define32.8%
Simplified32.8%
Taylor expanded in z around 0 32.8%
+-commutative32.8%
associate-*r*32.8%
associate-*r*32.8%
distribute-lft-out32.8%
mul-1-neg32.8%
Simplified32.8%
Taylor expanded in a around 0 8.1%
associate-*r*8.1%
mul-1-neg8.1%
Simplified8.1%
Taylor expanded in z around inf 30.3%
associate-*r*30.3%
mul-1-neg30.3%
Simplified30.3%
Final simplification37.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -2.5e+121) (not (<= b 1.35e+87))) (* a (* x (- b))) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -2.5e+121) || !(b <= 1.35e+87)) {
tmp = a * (x * -b);
} 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 ((b <= (-2.5d+121)) .or. (.not. (b <= 1.35d+87))) then
tmp = a * (x * -b)
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 ((b <= -2.5e+121) || !(b <= 1.35e+87)) {
tmp = a * (x * -b);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -2.5e+121) or not (b <= 1.35e+87): tmp = a * (x * -b) else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -2.5e+121) || !(b <= 1.35e+87)) tmp = Float64(a * Float64(x * Float64(-b))); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -2.5e+121) || ~((b <= 1.35e+87))) tmp = a * (x * -b); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -2.5e+121], N[Not[LessEqual[b, 1.35e+87]], $MachinePrecision]], N[(a * N[(x * (-b)), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.5 \cdot 10^{+121} \lor \neg \left(b \leq 1.35 \cdot 10^{+87}\right):\\
\;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if b < -2.50000000000000004e121 or 1.35000000000000003e87 < b Initial program 98.9%
Taylor expanded in b around inf 81.3%
mul-1-neg81.3%
distribute-rgt-neg-out81.3%
Simplified81.3%
Taylor expanded in a around 0 30.3%
mul-1-neg30.3%
unsub-neg30.3%
*-commutative30.3%
Simplified30.3%
Taylor expanded in a around inf 30.3%
associate-*r*30.3%
mul-1-neg30.3%
*-commutative30.3%
Simplified30.3%
if -2.50000000000000004e121 < b < 1.35000000000000003e87Initial program 96.6%
Taylor expanded in y around inf 80.3%
Taylor expanded in y around 0 28.8%
Final simplification29.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -8.6e+68) (not (<= y 6.4))) (* x (* t (- y))) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -8.6e+68) || !(y <= 6.4)) {
tmp = x * (t * -y);
} 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 ((y <= (-8.6d+68)) .or. (.not. (y <= 6.4d0))) then
tmp = x * (t * -y)
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 ((y <= -8.6e+68) || !(y <= 6.4)) {
tmp = x * (t * -y);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -8.6e+68) or not (y <= 6.4): tmp = x * (t * -y) else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -8.6e+68) || !(y <= 6.4)) tmp = Float64(x * Float64(t * Float64(-y))); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -8.6e+68) || ~((y <= 6.4))) tmp = x * (t * -y); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -8.6e+68], N[Not[LessEqual[y, 6.4]], $MachinePrecision]], N[(x * N[(t * (-y)), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.6 \cdot 10^{+68} \lor \neg \left(y \leq 6.4\right):\\
\;\;\;\;x \cdot \left(t \cdot \left(-y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -8.6000000000000002e68 or 6.4000000000000004 < y Initial program 97.0%
Taylor expanded in t around inf 60.0%
mul-1-neg60.0%
distribute-lft-neg-out60.0%
*-commutative60.0%
Simplified60.0%
Taylor expanded in y around 0 17.1%
mul-1-neg17.1%
*-commutative17.1%
unsub-neg17.1%
Simplified17.1%
Taylor expanded in y around inf 16.2%
associate-*r*16.2%
neg-mul-116.2%
*-commutative16.2%
associate-*r*18.1%
*-commutative18.1%
neg-mul-118.1%
associate-*r*18.1%
mul-1-neg18.1%
distribute-rgt-neg-in18.1%
Simplified18.1%
if -8.6000000000000002e68 < y < 6.4000000000000004Initial program 97.6%
Taylor expanded in y around inf 54.2%
Taylor expanded in y around 0 31.7%
Final simplification26.4%
(FPCore (x y z t a b) :precision binary64 (if (<= y -1.25e+70) (* x (* t (- y))) (if (<= y 1.12e+16) x (* x (* z (- a))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.25e+70) {
tmp = x * (t * -y);
} else if (y <= 1.12e+16) {
tmp = x;
} else {
tmp = x * (z * -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 (y <= (-1.25d+70)) then
tmp = x * (t * -y)
else if (y <= 1.12d+16) then
tmp = x
else
tmp = x * (z * -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 (y <= -1.25e+70) {
tmp = x * (t * -y);
} else if (y <= 1.12e+16) {
tmp = x;
} else {
tmp = x * (z * -a);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -1.25e+70: tmp = x * (t * -y) elif y <= 1.12e+16: tmp = x else: tmp = x * (z * -a) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -1.25e+70) tmp = Float64(x * Float64(t * Float64(-y))); elseif (y <= 1.12e+16) tmp = x; else tmp = Float64(x * Float64(z * Float64(-a))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -1.25e+70) tmp = x * (t * -y); elseif (y <= 1.12e+16) tmp = x; else tmp = x * (z * -a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.25e+70], N[(x * N[(t * (-y)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.12e+16], x, N[(x * N[(z * (-a)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.25 \cdot 10^{+70}:\\
\;\;\;\;x \cdot \left(t \cdot \left(-y\right)\right)\\
\mathbf{elif}\;y \leq 1.12 \cdot 10^{+16}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(z \cdot \left(-a\right)\right)\\
\end{array}
\end{array}
if y < -1.2500000000000001e70Initial program 97.4%
Taylor expanded in t around inf 59.9%
mul-1-neg59.9%
distribute-lft-neg-out59.9%
*-commutative59.9%
Simplified59.9%
Taylor expanded in y around 0 17.6%
mul-1-neg17.6%
*-commutative17.6%
unsub-neg17.6%
Simplified17.6%
Taylor expanded in y around inf 19.8%
associate-*r*19.8%
neg-mul-119.8%
*-commutative19.8%
associate-*r*17.4%
*-commutative17.4%
neg-mul-117.4%
associate-*r*17.4%
mul-1-neg17.4%
distribute-rgt-neg-in17.4%
Simplified17.4%
if -1.2500000000000001e70 < y < 1.12e16Initial program 97.7%
Taylor expanded in y around inf 55.3%
Taylor expanded in y around 0 30.6%
if 1.12e16 < y Initial program 96.4%
Taylor expanded in y around 0 32.9%
sub-neg32.9%
log1p-define32.8%
Simplified32.8%
Taylor expanded in z around 0 32.8%
+-commutative32.8%
associate-*r*32.8%
associate-*r*32.8%
distribute-lft-out32.8%
mul-1-neg32.8%
Simplified32.8%
Taylor expanded in a around 0 8.1%
associate-*r*8.1%
mul-1-neg8.1%
Simplified8.1%
Taylor expanded in z around inf 30.3%
mul-1-neg30.3%
associate-*r*25.1%
*-commutative25.1%
associate-*l*28.6%
*-commutative28.6%
distribute-rgt-neg-out28.6%
distribute-rgt-neg-in28.6%
Simplified28.6%
(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 97.4%
Taylor expanded in y around inf 67.1%
Taylor expanded in y around 0 20.7%
herbie shell --seed 2024089
(FPCore (x y z t a b)
:name "Numeric.SpecFunctions:incompleteBetaApprox from math-functions-0.1.5.2, B"
:precision binary64
(* x (exp (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b))))))