
(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 20 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 96.9%
fma-define96.9%
sub-neg96.9%
log1p-define99.2%
Simplified99.2%
Final simplification99.2%
(FPCore (x y z t a b) :precision binary64 (* x (exp (+ (* y (- (log z) t)) (* a (- (* z (+ (* z -0.5) -1.0)) b))))))
double code(double x, double y, double z, double t, double a, double b) {
return x * exp(((y * (log(z) - t)) + (a * ((z * ((z * -0.5) + -1.0)) - 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 * ((z * ((z * (-0.5d0)) + (-1.0d0))) - 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 * ((z * ((z * -0.5) + -1.0)) - b))));
}
def code(x, y, z, t, a, b): return x * math.exp(((y * (math.log(z) - t)) + (a * ((z * ((z * -0.5) + -1.0)) - b))))
function code(x, y, z, t, a, b) return Float64(x * exp(Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(Float64(z * Float64(Float64(z * -0.5) + -1.0)) - b))))) end
function tmp = code(x, y, z, t, a, b) tmp = x * exp(((y * (log(z) - t)) + (a * ((z * ((z * -0.5) + -1.0)) - 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[(z * N[(N[(z * -0.5), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(z \cdot \left(z \cdot -0.5 + -1\right) - b\right)}
\end{array}
Initial program 96.9%
Taylor expanded in z around 0 99.2%
Final simplification99.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.8e-20) (not (<= y 8.8e-8))) (* x (exp (* y (- (log z) t)))) (* x (exp (* a (- (* z (+ (* z -0.5) -1.0)) b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.8e-20) || !(y <= 8.8e-8)) {
tmp = x * exp((y * (log(z) - t)));
} else {
tmp = x * exp((a * ((z * ((z * -0.5) + -1.0)) - 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.8d-20)) .or. (.not. (y <= 8.8d-8))) then
tmp = x * exp((y * (log(z) - t)))
else
tmp = x * exp((a * ((z * ((z * (-0.5d0)) + (-1.0d0))) - 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.8e-20) || !(y <= 8.8e-8)) {
tmp = x * Math.exp((y * (Math.log(z) - t)));
} else {
tmp = x * Math.exp((a * ((z * ((z * -0.5) + -1.0)) - b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1.8e-20) or not (y <= 8.8e-8): tmp = x * math.exp((y * (math.log(z) - t))) else: tmp = x * math.exp((a * ((z * ((z * -0.5) + -1.0)) - b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1.8e-20) || !(y <= 8.8e-8)) tmp = Float64(x * exp(Float64(y * Float64(log(z) - t)))); else tmp = Float64(x * exp(Float64(a * Float64(Float64(z * Float64(Float64(z * -0.5) + -1.0)) - b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -1.8e-20) || ~((y <= 8.8e-8))) tmp = x * exp((y * (log(z) - t))); else tmp = x * exp((a * ((z * ((z * -0.5) + -1.0)) - b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1.8e-20], N[Not[LessEqual[y, 8.8e-8]], $MachinePrecision]], N[(x * N[Exp[N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(x * N[Exp[N[(a * N[(N[(z * N[(N[(z * -0.5), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.8 \cdot 10^{-20} \lor \neg \left(y \leq 8.8 \cdot 10^{-8}\right):\\
\;\;\;\;x \cdot e^{y \cdot \left(\log z - t\right)}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{a \cdot \left(z \cdot \left(z \cdot -0.5 + -1\right) - b\right)}\\
\end{array}
\end{array}
if y < -1.79999999999999987e-20 or 8.7999999999999994e-8 < y Initial program 98.5%
Taylor expanded in y around inf 89.4%
if -1.79999999999999987e-20 < y < 8.7999999999999994e-8Initial program 94.9%
Taylor expanded in z around 0 99.9%
Taylor expanded in y around 0 89.6%
Final simplification89.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (exp (* y (- t))))))
(if (<= t -1.7e+33)
t_1
(if (<= t -1.2e-65)
(* x (exp (* a (- (- z) b))))
(if (<= t -1.35e-112)
(* x (pow z y))
(if (<= t 2.25e+50)
(* x (exp (* a (- (* z (+ (* z -0.5) -1.0)) b))))
t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * exp((y * -t));
double tmp;
if (t <= -1.7e+33) {
tmp = t_1;
} else if (t <= -1.2e-65) {
tmp = x * exp((a * (-z - b)));
} else if (t <= -1.35e-112) {
tmp = x * pow(z, y);
} else if (t <= 2.25e+50) {
tmp = x * exp((a * ((z * ((z * -0.5) + -1.0)) - b)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x * exp((y * -t))
if (t <= (-1.7d+33)) then
tmp = t_1
else if (t <= (-1.2d-65)) then
tmp = x * exp((a * (-z - b)))
else if (t <= (-1.35d-112)) then
tmp = x * (z ** y)
else if (t <= 2.25d+50) then
tmp = x * exp((a * ((z * ((z * (-0.5d0)) + (-1.0d0))) - b)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * Math.exp((y * -t));
double tmp;
if (t <= -1.7e+33) {
tmp = t_1;
} else if (t <= -1.2e-65) {
tmp = x * Math.exp((a * (-z - b)));
} else if (t <= -1.35e-112) {
tmp = x * Math.pow(z, y);
} else if (t <= 2.25e+50) {
tmp = x * Math.exp((a * ((z * ((z * -0.5) + -1.0)) - b)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x * math.exp((y * -t)) tmp = 0 if t <= -1.7e+33: tmp = t_1 elif t <= -1.2e-65: tmp = x * math.exp((a * (-z - b))) elif t <= -1.35e-112: tmp = x * math.pow(z, y) elif t <= 2.25e+50: tmp = x * math.exp((a * ((z * ((z * -0.5) + -1.0)) - b))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x * exp(Float64(y * Float64(-t)))) tmp = 0.0 if (t <= -1.7e+33) tmp = t_1; elseif (t <= -1.2e-65) tmp = Float64(x * exp(Float64(a * Float64(Float64(-z) - b)))); elseif (t <= -1.35e-112) tmp = Float64(x * (z ^ y)); elseif (t <= 2.25e+50) tmp = Float64(x * exp(Float64(a * Float64(Float64(z * Float64(Float64(z * -0.5) + -1.0)) - b)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x * exp((y * -t)); tmp = 0.0; if (t <= -1.7e+33) tmp = t_1; elseif (t <= -1.2e-65) tmp = x * exp((a * (-z - b))); elseif (t <= -1.35e-112) tmp = x * (z ^ y); elseif (t <= 2.25e+50) tmp = x * exp((a * ((z * ((z * -0.5) + -1.0)) - b))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[Exp[N[(y * (-t)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.7e+33], t$95$1, If[LessEqual[t, -1.2e-65], N[(x * N[Exp[N[(a * N[((-z) - b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.35e-112], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.25e+50], N[(x * N[Exp[N[(a * N[(N[(z * N[(N[(z * -0.5), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot e^{y \cdot \left(-t\right)}\\
\mathbf{if}\;t \leq -1.7 \cdot 10^{+33}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.2 \cdot 10^{-65}:\\
\;\;\;\;x \cdot e^{a \cdot \left(\left(-z\right) - b\right)}\\
\mathbf{elif}\;t \leq -1.35 \cdot 10^{-112}:\\
\;\;\;\;x \cdot {z}^{y}\\
\mathbf{elif}\;t \leq 2.25 \cdot 10^{+50}:\\
\;\;\;\;x \cdot e^{a \cdot \left(z \cdot \left(z \cdot -0.5 + -1\right) - b\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.7e33 or 2.25000000000000007e50 < t Initial program 97.6%
Taylor expanded in t around inf 83.6%
mul-1-neg83.6%
distribute-lft-neg-out83.6%
*-commutative83.6%
Simplified83.6%
if -1.7e33 < t < -1.2000000000000001e-65Initial program 95.5%
Taylor expanded in y around 0 85.7%
sub-neg85.7%
log1p-define90.2%
Simplified90.2%
Taylor expanded in z around 0 90.2%
associate-*r*90.2%
associate-*r*90.2%
distribute-lft-out90.2%
mul-1-neg90.2%
Simplified90.2%
if -1.2000000000000001e-65 < t < -1.35e-112Initial program 100.0%
Taylor expanded in y around inf 78.9%
Taylor expanded in t around 0 78.9%
if -1.35e-112 < t < 2.25000000000000007e50Initial program 95.9%
Taylor expanded in z around 0 98.9%
Taylor expanded in y around 0 76.4%
Final simplification81.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (exp (* a (- (- z) b))))) (t_2 (* x (exp (* y (- t))))))
(if (<= t -3.4e+35)
t_2
(if (<= t -5.5e-69)
t_1
(if (<= t -5.5e-109) (* x (pow z y)) (if (<= t 1.45e+50) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * exp((a * (-z - b)));
double t_2 = x * exp((y * -t));
double tmp;
if (t <= -3.4e+35) {
tmp = t_2;
} else if (t <= -5.5e-69) {
tmp = t_1;
} else if (t <= -5.5e-109) {
tmp = x * pow(z, y);
} else if (t <= 1.45e+50) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x * exp((a * (-z - b)))
t_2 = x * exp((y * -t))
if (t <= (-3.4d+35)) then
tmp = t_2
else if (t <= (-5.5d-69)) then
tmp = t_1
else if (t <= (-5.5d-109)) then
tmp = x * (z ** y)
else if (t <= 1.45d+50) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * Math.exp((a * (-z - b)));
double t_2 = x * Math.exp((y * -t));
double tmp;
if (t <= -3.4e+35) {
tmp = t_2;
} else if (t <= -5.5e-69) {
tmp = t_1;
} else if (t <= -5.5e-109) {
tmp = x * Math.pow(z, y);
} else if (t <= 1.45e+50) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x * math.exp((a * (-z - b))) t_2 = x * math.exp((y * -t)) tmp = 0 if t <= -3.4e+35: tmp = t_2 elif t <= -5.5e-69: tmp = t_1 elif t <= -5.5e-109: tmp = x * math.pow(z, y) elif t <= 1.45e+50: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x * exp(Float64(a * Float64(Float64(-z) - b)))) t_2 = Float64(x * exp(Float64(y * Float64(-t)))) tmp = 0.0 if (t <= -3.4e+35) tmp = t_2; elseif (t <= -5.5e-69) tmp = t_1; elseif (t <= -5.5e-109) tmp = Float64(x * (z ^ y)); elseif (t <= 1.45e+50) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x * exp((a * (-z - b))); t_2 = x * exp((y * -t)); tmp = 0.0; if (t <= -3.4e+35) tmp = t_2; elseif (t <= -5.5e-69) tmp = t_1; elseif (t <= -5.5e-109) tmp = x * (z ^ y); elseif (t <= 1.45e+50) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[Exp[N[(a * N[((-z) - b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[Exp[N[(y * (-t)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.4e+35], t$95$2, If[LessEqual[t, -5.5e-69], t$95$1, If[LessEqual[t, -5.5e-109], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.45e+50], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot e^{a \cdot \left(\left(-z\right) - b\right)}\\
t_2 := x \cdot e^{y \cdot \left(-t\right)}\\
\mathbf{if}\;t \leq -3.4 \cdot 10^{+35}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -5.5 \cdot 10^{-69}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -5.5 \cdot 10^{-109}:\\
\;\;\;\;x \cdot {z}^{y}\\
\mathbf{elif}\;t \leq 1.45 \cdot 10^{+50}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -3.4000000000000001e35 or 1.45e50 < t Initial program 97.6%
Taylor expanded in t around inf 83.6%
mul-1-neg83.6%
distribute-lft-neg-out83.6%
*-commutative83.6%
Simplified83.6%
if -3.4000000000000001e35 < t < -5.50000000000000006e-69 or -5.5000000000000003e-109 < t < 1.45e50Initial program 95.9%
Taylor expanded in y around 0 73.9%
sub-neg73.9%
log1p-define78.7%
Simplified78.7%
Taylor expanded in z around 0 78.6%
associate-*r*78.6%
associate-*r*78.6%
distribute-lft-out78.6%
mul-1-neg78.6%
Simplified78.6%
if -5.50000000000000006e-69 < t < -5.5000000000000003e-109Initial program 100.0%
Taylor expanded in y around inf 78.9%
Taylor expanded in t around 0 78.9%
Final simplification81.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -400000000000.0) (not (<= y 7.2e+34))) (* 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 <= -400000000000.0) || !(y <= 7.2e+34)) {
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 <= (-400000000000.0d0)) .or. (.not. (y <= 7.2d+34))) 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 <= -400000000000.0) || !(y <= 7.2e+34)) {
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 <= -400000000000.0) or not (y <= 7.2e+34): 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 <= -400000000000.0) || !(y <= 7.2e+34)) 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 <= -400000000000.0) || ~((y <= 7.2e+34))) 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, -400000000000.0], N[Not[LessEqual[y, 7.2e+34]], $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 -400000000000 \lor \neg \left(y \leq 7.2 \cdot 10^{+34}\right):\\
\;\;\;\;x \cdot {z}^{y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{a \cdot \left(-b\right)}\\
\end{array}
\end{array}
if y < -4e11 or 7.2000000000000001e34 < y Initial program 98.3%
Taylor expanded in y around inf 93.3%
Taylor expanded in t around 0 70.6%
if -4e11 < y < 7.2000000000000001e34Initial program 95.8%
Taylor expanded in b around inf 76.0%
mul-1-neg76.0%
distribute-rgt-neg-out76.0%
Simplified76.0%
Final simplification73.5%
(FPCore (x y z t a b) :precision binary64 (if (<= y -750000000000.0) (* x (pow z y)) (if (<= y 0.029) (* x (exp (* a (- b)))) (* x (exp (* y (- t)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -750000000000.0) {
tmp = x * pow(z, y);
} else if (y <= 0.029) {
tmp = x * exp((a * -b));
} else {
tmp = x * exp((y * -t));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-750000000000.0d0)) then
tmp = x * (z ** y)
else if (y <= 0.029d0) then
tmp = x * exp((a * -b))
else
tmp = x * exp((y * -t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -750000000000.0) {
tmp = x * Math.pow(z, y);
} else if (y <= 0.029) {
tmp = x * Math.exp((a * -b));
} else {
tmp = x * Math.exp((y * -t));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -750000000000.0: tmp = x * math.pow(z, y) elif y <= 0.029: tmp = x * math.exp((a * -b)) else: tmp = x * math.exp((y * -t)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -750000000000.0) tmp = Float64(x * (z ^ y)); elseif (y <= 0.029) tmp = Float64(x * exp(Float64(a * Float64(-b)))); else tmp = Float64(x * exp(Float64(y * Float64(-t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -750000000000.0) tmp = x * (z ^ y); elseif (y <= 0.029) tmp = x * exp((a * -b)); else tmp = x * exp((y * -t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -750000000000.0], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 0.029], N[(x * N[Exp[N[(a * (-b)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(x * N[Exp[N[(y * (-t)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -750000000000:\\
\;\;\;\;x \cdot {z}^{y}\\
\mathbf{elif}\;y \leq 0.029:\\
\;\;\;\;x \cdot e^{a \cdot \left(-b\right)}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{y \cdot \left(-t\right)}\\
\end{array}
\end{array}
if y < -7.5e11Initial program 96.3%
Taylor expanded in y around inf 92.7%
Taylor expanded in t around 0 76.3%
if -7.5e11 < y < 0.0290000000000000015Initial program 95.4%
Taylor expanded in b around inf 78.7%
mul-1-neg78.7%
distribute-rgt-neg-out78.7%
Simplified78.7%
if 0.0290000000000000015 < y Initial program 100.0%
Taylor expanded in t around inf 69.5%
mul-1-neg69.5%
distribute-lft-neg-out69.5%
*-commutative69.5%
Simplified69.5%
Final simplification75.6%
(FPCore (x y z t a b) :precision binary64 (if (<= t -1.2e+105) (* x (- 1.0 (* y t))) (* x (pow z y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1.2e+105) {
tmp = x * (1.0 - (y * t));
} else {
tmp = x * pow(z, y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= (-1.2d+105)) then
tmp = x * (1.0d0 - (y * t))
else
tmp = x * (z ** y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1.2e+105) {
tmp = x * (1.0 - (y * t));
} else {
tmp = x * Math.pow(z, y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -1.2e+105: tmp = x * (1.0 - (y * t)) else: tmp = x * math.pow(z, y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -1.2e+105) tmp = Float64(x * Float64(1.0 - Float64(y * t))); else tmp = Float64(x * (z ^ y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -1.2e+105) tmp = x * (1.0 - (y * t)); else tmp = x * (z ^ y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -1.2e+105], N[(x * N[(1.0 - N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.2 \cdot 10^{+105}:\\
\;\;\;\;x \cdot \left(1 - y \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot {z}^{y}\\
\end{array}
\end{array}
if t < -1.19999999999999987e105Initial program 100.0%
Taylor expanded in t around inf 80.0%
mul-1-neg80.0%
distribute-lft-neg-out80.0%
*-commutative80.0%
Simplified80.0%
Taylor expanded in y around 0 51.8%
mul-1-neg51.8%
unsub-neg51.8%
*-commutative51.8%
Simplified51.8%
if -1.19999999999999987e105 < t Initial program 96.4%
Taylor expanded in y around inf 70.2%
Taylor expanded in t around 0 57.1%
Final simplification56.3%
(FPCore (x y z t a b)
:precision binary64
(if (<= x 3.45e-186)
(* a (* x (- z)))
(if (<= x 8e-79)
(* x (- 1.0 (* y t)))
(if (<= x 4.2e+99)
(* z (- (/ (- x (* a (* x b))) z) (* x a)))
(- x (* t (* x y)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= 3.45e-186) {
tmp = a * (x * -z);
} else if (x <= 8e-79) {
tmp = x * (1.0 - (y * t));
} else if (x <= 4.2e+99) {
tmp = z * (((x - (a * (x * b))) / z) - (x * a));
} else {
tmp = x - (t * (x * y));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (x <= 3.45d-186) then
tmp = a * (x * -z)
else if (x <= 8d-79) then
tmp = x * (1.0d0 - (y * t))
else if (x <= 4.2d+99) then
tmp = z * (((x - (a * (x * b))) / z) - (x * a))
else
tmp = x - (t * (x * y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= 3.45e-186) {
tmp = a * (x * -z);
} else if (x <= 8e-79) {
tmp = x * (1.0 - (y * t));
} else if (x <= 4.2e+99) {
tmp = z * (((x - (a * (x * b))) / z) - (x * a));
} else {
tmp = x - (t * (x * y));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= 3.45e-186: tmp = a * (x * -z) elif x <= 8e-79: tmp = x * (1.0 - (y * t)) elif x <= 4.2e+99: tmp = z * (((x - (a * (x * b))) / z) - (x * a)) else: tmp = x - (t * (x * y)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= 3.45e-186) tmp = Float64(a * Float64(x * Float64(-z))); elseif (x <= 8e-79) tmp = Float64(x * Float64(1.0 - Float64(y * t))); elseif (x <= 4.2e+99) tmp = Float64(z * Float64(Float64(Float64(x - Float64(a * Float64(x * b))) / z) - Float64(x * a))); else tmp = Float64(x - Float64(t * Float64(x * y))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= 3.45e-186) tmp = a * (x * -z); elseif (x <= 8e-79) tmp = x * (1.0 - (y * t)); elseif (x <= 4.2e+99) tmp = z * (((x - (a * (x * b))) / z) - (x * a)); else tmp = x - (t * (x * y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, 3.45e-186], N[(a * N[(x * (-z)), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 8e-79], N[(x * N[(1.0 - N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.2e+99], N[(z * N[(N[(N[(x - N[(a * N[(x * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] - N[(x * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(t * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 3.45 \cdot 10^{-186}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-z\right)\right)\\
\mathbf{elif}\;x \leq 8 \cdot 10^{-79}:\\
\;\;\;\;x \cdot \left(1 - y \cdot t\right)\\
\mathbf{elif}\;x \leq 4.2 \cdot 10^{+99}:\\
\;\;\;\;z \cdot \left(\frac{x - a \cdot \left(x \cdot b\right)}{z} - x \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;x - t \cdot \left(x \cdot y\right)\\
\end{array}
\end{array}
if x < 3.4500000000000001e-186Initial program 96.4%
Taylor expanded in y around 0 59.5%
sub-neg59.5%
log1p-define63.0%
Simplified63.0%
Taylor expanded in z around 0 62.8%
associate-*r*62.8%
associate-*r*62.8%
distribute-lft-out62.8%
mul-1-neg62.8%
Simplified62.8%
Taylor expanded in a around 0 24.0%
mul-1-neg24.0%
unsub-neg24.0%
+-commutative24.0%
Simplified24.0%
Taylor expanded in z around inf 20.1%
mul-1-neg20.1%
*-commutative20.1%
distribute-rgt-neg-in20.1%
Simplified20.1%
if 3.4500000000000001e-186 < x < 8e-79Initial program 96.1%
Taylor expanded in t around inf 72.9%
mul-1-neg72.9%
distribute-lft-neg-out72.9%
*-commutative72.9%
Simplified72.9%
Taylor expanded in y around 0 37.8%
mul-1-neg37.8%
unsub-neg37.8%
*-commutative37.8%
Simplified37.8%
if 8e-79 < x < 4.2000000000000002e99Initial program 96.4%
Taylor expanded in y around 0 69.5%
sub-neg69.5%
log1p-define73.1%
Simplified73.1%
Taylor expanded in z around 0 73.1%
associate-*r*73.1%
associate-*r*73.1%
distribute-lft-out73.1%
mul-1-neg73.1%
Simplified73.1%
Taylor expanded in a around 0 22.2%
mul-1-neg22.2%
unsub-neg22.2%
+-commutative22.2%
Simplified22.2%
Taylor expanded in z around -inf 37.7%
if 4.2000000000000002e99 < x Initial program 100.0%
Taylor expanded in t around inf 56.0%
mul-1-neg56.0%
distribute-lft-neg-out56.0%
*-commutative56.0%
Simplified56.0%
Taylor expanded in y around 0 37.9%
mul-1-neg37.9%
unsub-neg37.9%
*-commutative37.9%
Simplified37.9%
Final simplification27.0%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -1.65e+190)
(* x (* z (- a)))
(if (<= b 6e+136)
(* x (- 1.0 (* y t)))
(- x (* z (+ (* x a) (/ (* a (* x b)) z)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.65e+190) {
tmp = x * (z * -a);
} else if (b <= 6e+136) {
tmp = x * (1.0 - (y * t));
} else {
tmp = x - (z * ((x * a) + ((a * (x * b)) / 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 (b <= (-1.65d+190)) then
tmp = x * (z * -a)
else if (b <= 6d+136) then
tmp = x * (1.0d0 - (y * t))
else
tmp = x - (z * ((x * a) + ((a * (x * b)) / 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 (b <= -1.65e+190) {
tmp = x * (z * -a);
} else if (b <= 6e+136) {
tmp = x * (1.0 - (y * t));
} else {
tmp = x - (z * ((x * a) + ((a * (x * b)) / z)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -1.65e+190: tmp = x * (z * -a) elif b <= 6e+136: tmp = x * (1.0 - (y * t)) else: tmp = x - (z * ((x * a) + ((a * (x * b)) / z))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1.65e+190) tmp = Float64(x * Float64(z * Float64(-a))); elseif (b <= 6e+136) tmp = Float64(x * Float64(1.0 - Float64(y * t))); else tmp = Float64(x - Float64(z * Float64(Float64(x * a) + Float64(Float64(a * Float64(x * b)) / z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -1.65e+190) tmp = x * (z * -a); elseif (b <= 6e+136) tmp = x * (1.0 - (y * t)); else tmp = x - (z * ((x * a) + ((a * (x * b)) / z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.65e+190], N[(x * N[(z * (-a)), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 6e+136], N[(x * N[(1.0 - N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(z * N[(N[(x * a), $MachinePrecision] + N[(N[(a * N[(x * b), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.65 \cdot 10^{+190}:\\
\;\;\;\;x \cdot \left(z \cdot \left(-a\right)\right)\\
\mathbf{elif}\;b \leq 6 \cdot 10^{+136}:\\
\;\;\;\;x \cdot \left(1 - y \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;x - z \cdot \left(x \cdot a + \frac{a \cdot \left(x \cdot b\right)}{z}\right)\\
\end{array}
\end{array}
if b < -1.65e190Initial program 94.7%
Taylor expanded in y around 0 79.8%
sub-neg79.8%
log1p-define79.8%
Simplified79.8%
Taylor expanded in z around 0 79.8%
associate-*r*79.8%
associate-*r*79.8%
distribute-lft-out79.8%
mul-1-neg79.8%
Simplified79.8%
Taylor expanded in a around 0 11.0%
mul-1-neg11.0%
unsub-neg11.0%
+-commutative11.0%
Simplified11.0%
Taylor expanded in z around inf 41.5%
mul-1-neg41.5%
associate-*r*41.4%
*-commutative41.4%
associate-*l*49.1%
Simplified49.1%
if -1.65e190 < b < 5.99999999999999958e136Initial program 96.6%
Taylor expanded in t around inf 63.0%
mul-1-neg63.0%
distribute-lft-neg-out63.0%
*-commutative63.0%
Simplified63.0%
Taylor expanded in y around 0 35.0%
mul-1-neg35.0%
unsub-neg35.0%
*-commutative35.0%
Simplified35.0%
if 5.99999999999999958e136 < b Initial program 100.0%
Taylor expanded in y around 0 84.0%
sub-neg84.0%
log1p-define84.0%
Simplified84.0%
Taylor expanded in z around 0 84.0%
associate-*r*84.0%
associate-*r*84.0%
distribute-lft-out84.0%
mul-1-neg84.0%
Simplified84.0%
Taylor expanded in a around 0 25.2%
mul-1-neg25.2%
unsub-neg25.2%
+-commutative25.2%
Simplified25.2%
Taylor expanded in z around inf 35.5%
Final simplification36.1%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -4e+190)
(* x (* z (- a)))
(if (<= b 4.4e+173)
(* x (- 1.0 (* y t)))
(- x (* a (* z (+ x (* b (/ x z)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -4e+190) {
tmp = x * (z * -a);
} else if (b <= 4.4e+173) {
tmp = x * (1.0 - (y * t));
} else {
tmp = x - (a * (z * (x + (b * (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 (b <= (-4d+190)) then
tmp = x * (z * -a)
else if (b <= 4.4d+173) then
tmp = x * (1.0d0 - (y * t))
else
tmp = x - (a * (z * (x + (b * (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 (b <= -4e+190) {
tmp = x * (z * -a);
} else if (b <= 4.4e+173) {
tmp = x * (1.0 - (y * t));
} else {
tmp = x - (a * (z * (x + (b * (x / z)))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -4e+190: tmp = x * (z * -a) elif b <= 4.4e+173: tmp = x * (1.0 - (y * t)) else: tmp = x - (a * (z * (x + (b * (x / z))))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -4e+190) tmp = Float64(x * Float64(z * Float64(-a))); elseif (b <= 4.4e+173) tmp = Float64(x * Float64(1.0 - Float64(y * t))); else tmp = Float64(x - Float64(a * Float64(z * Float64(x + Float64(b * Float64(x / z)))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -4e+190) tmp = x * (z * -a); elseif (b <= 4.4e+173) tmp = x * (1.0 - (y * t)); else tmp = x - (a * (z * (x + (b * (x / z))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -4e+190], N[(x * N[(z * (-a)), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 4.4e+173], N[(x * N[(1.0 - N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(a * N[(z * N[(x + N[(b * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -4 \cdot 10^{+190}:\\
\;\;\;\;x \cdot \left(z \cdot \left(-a\right)\right)\\
\mathbf{elif}\;b \leq 4.4 \cdot 10^{+173}:\\
\;\;\;\;x \cdot \left(1 - y \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;x - a \cdot \left(z \cdot \left(x + b \cdot \frac{x}{z}\right)\right)\\
\end{array}
\end{array}
if b < -4.0000000000000003e190Initial program 94.7%
Taylor expanded in y around 0 79.8%
sub-neg79.8%
log1p-define79.8%
Simplified79.8%
Taylor expanded in z around 0 79.8%
associate-*r*79.8%
associate-*r*79.8%
distribute-lft-out79.8%
mul-1-neg79.8%
Simplified79.8%
Taylor expanded in a around 0 11.0%
mul-1-neg11.0%
unsub-neg11.0%
+-commutative11.0%
Simplified11.0%
Taylor expanded in z around inf 41.5%
mul-1-neg41.5%
associate-*r*41.4%
*-commutative41.4%
associate-*l*49.1%
Simplified49.1%
if -4.0000000000000003e190 < b < 4.4e173Initial program 96.7%
Taylor expanded in t around inf 62.8%
mul-1-neg62.8%
distribute-lft-neg-out62.8%
*-commutative62.8%
Simplified62.8%
Taylor expanded in y around 0 34.4%
mul-1-neg34.4%
unsub-neg34.4%
*-commutative34.4%
Simplified34.4%
if 4.4e173 < b Initial program 100.0%
Taylor expanded in y around 0 90.0%
sub-neg90.0%
log1p-define90.0%
Simplified90.0%
Taylor expanded in z around 0 90.0%
associate-*r*90.0%
associate-*r*90.0%
distribute-lft-out90.0%
mul-1-neg90.0%
Simplified90.0%
Taylor expanded in a around 0 27.1%
mul-1-neg27.1%
unsub-neg27.1%
+-commutative27.1%
Simplified27.1%
Taylor expanded in z around inf 39.9%
associate-/l*39.9%
Simplified39.9%
Final simplification36.1%
(FPCore (x y z t a b) :precision binary64 (if (<= b -5e+194) (* x (* z (- a))) (if (<= b 1.05e+136) (* x (- 1.0 (* y t))) (* b (- (/ x b) (* x a))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -5e+194) {
tmp = x * (z * -a);
} else if (b <= 1.05e+136) {
tmp = x * (1.0 - (y * t));
} else {
tmp = b * ((x / b) - (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 (b <= (-5d+194)) then
tmp = x * (z * -a)
else if (b <= 1.05d+136) then
tmp = x * (1.0d0 - (y * t))
else
tmp = b * ((x / b) - (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 (b <= -5e+194) {
tmp = x * (z * -a);
} else if (b <= 1.05e+136) {
tmp = x * (1.0 - (y * t));
} else {
tmp = b * ((x / b) - (x * a));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -5e+194: tmp = x * (z * -a) elif b <= 1.05e+136: tmp = x * (1.0 - (y * t)) else: tmp = b * ((x / b) - (x * a)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -5e+194) tmp = Float64(x * Float64(z * Float64(-a))); elseif (b <= 1.05e+136) tmp = Float64(x * Float64(1.0 - Float64(y * t))); else tmp = Float64(b * Float64(Float64(x / b) - Float64(x * a))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -5e+194) tmp = x * (z * -a); elseif (b <= 1.05e+136) tmp = x * (1.0 - (y * t)); else tmp = b * ((x / b) - (x * a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -5e+194], N[(x * N[(z * (-a)), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.05e+136], N[(x * N[(1.0 - N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * N[(N[(x / b), $MachinePrecision] - N[(x * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -5 \cdot 10^{+194}:\\
\;\;\;\;x \cdot \left(z \cdot \left(-a\right)\right)\\
\mathbf{elif}\;b \leq 1.05 \cdot 10^{+136}:\\
\;\;\;\;x \cdot \left(1 - y \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(\frac{x}{b} - x \cdot a\right)\\
\end{array}
\end{array}
if b < -4.99999999999999989e194Initial program 94.7%
Taylor expanded in y around 0 79.8%
sub-neg79.8%
log1p-define79.8%
Simplified79.8%
Taylor expanded in z around 0 79.8%
associate-*r*79.8%
associate-*r*79.8%
distribute-lft-out79.8%
mul-1-neg79.8%
Simplified79.8%
Taylor expanded in a around 0 11.0%
mul-1-neg11.0%
unsub-neg11.0%
+-commutative11.0%
Simplified11.0%
Taylor expanded in z around inf 41.5%
mul-1-neg41.5%
associate-*r*41.4%
*-commutative41.4%
associate-*l*49.1%
Simplified49.1%
if -4.99999999999999989e194 < b < 1.05e136Initial program 96.6%
Taylor expanded in t around inf 63.0%
mul-1-neg63.0%
distribute-lft-neg-out63.0%
*-commutative63.0%
Simplified63.0%
Taylor expanded in y around 0 35.0%
mul-1-neg35.0%
unsub-neg35.0%
*-commutative35.0%
Simplified35.0%
if 1.05e136 < b Initial program 100.0%
Taylor expanded in b around inf 84.0%
mul-1-neg84.0%
distribute-rgt-neg-out84.0%
Simplified84.0%
Taylor expanded in a around 0 25.2%
mul-1-neg25.2%
unsub-neg25.2%
Simplified25.2%
Taylor expanded in b around inf 27.9%
Final simplification35.1%
(FPCore (x y z t a b) :precision binary64 (if (<= y -1.7e-51) (* x (- 1.0 (* y t))) (if (<= y 6.9e+34) (- x (* a (* x (+ z b)))) (* x (* z (- a))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.7e-51) {
tmp = x * (1.0 - (y * t));
} else if (y <= 6.9e+34) {
tmp = x - (a * (x * (z + b)));
} 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.7d-51)) then
tmp = x * (1.0d0 - (y * t))
else if (y <= 6.9d+34) then
tmp = x - (a * (x * (z + b)))
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.7e-51) {
tmp = x * (1.0 - (y * t));
} else if (y <= 6.9e+34) {
tmp = x - (a * (x * (z + b)));
} else {
tmp = x * (z * -a);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -1.7e-51: tmp = x * (1.0 - (y * t)) elif y <= 6.9e+34: tmp = x - (a * (x * (z + b))) else: tmp = x * (z * -a) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -1.7e-51) tmp = Float64(x * Float64(1.0 - Float64(y * t))); elseif (y <= 6.9e+34) tmp = Float64(x - Float64(a * Float64(x * Float64(z + b)))); 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.7e-51) tmp = x * (1.0 - (y * t)); elseif (y <= 6.9e+34) tmp = x - (a * (x * (z + b))); else tmp = x * (z * -a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.7e-51], N[(x * N[(1.0 - N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.9e+34], N[(x - N[(a * N[(x * N[(z + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(z * (-a)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.7 \cdot 10^{-51}:\\
\;\;\;\;x \cdot \left(1 - y \cdot t\right)\\
\mathbf{elif}\;y \leq 6.9 \cdot 10^{+34}:\\
\;\;\;\;x - a \cdot \left(x \cdot \left(z + b\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(z \cdot \left(-a\right)\right)\\
\end{array}
\end{array}
if y < -1.70000000000000001e-51Initial program 97.1%
Taylor expanded in t around inf 62.3%
mul-1-neg62.3%
distribute-lft-neg-out62.3%
*-commutative62.3%
Simplified62.3%
Taylor expanded in y around 0 28.1%
mul-1-neg28.1%
unsub-neg28.1%
*-commutative28.1%
Simplified28.1%
if -1.70000000000000001e-51 < y < 6.90000000000000037e34Initial program 95.2%
Taylor expanded in y around 0 79.8%
sub-neg79.8%
log1p-define85.3%
Simplified85.3%
Taylor expanded in z around 0 85.2%
associate-*r*85.2%
associate-*r*85.2%
distribute-lft-out85.2%
mul-1-neg85.2%
Simplified85.2%
Taylor expanded in a around 0 41.1%
mul-1-neg41.1%
unsub-neg41.1%
+-commutative41.1%
Simplified41.1%
if 6.90000000000000037e34 < y Initial program 100.0%
Taylor expanded in y around 0 35.8%
sub-neg35.8%
log1p-define35.8%
Simplified35.8%
Taylor expanded in z around 0 35.8%
associate-*r*35.8%
associate-*r*35.8%
distribute-lft-out35.8%
mul-1-neg35.8%
Simplified35.8%
Taylor expanded in a around 0 6.6%
mul-1-neg6.6%
unsub-neg6.6%
+-commutative6.6%
Simplified6.6%
Taylor expanded in z around inf 31.6%
mul-1-neg31.6%
associate-*r*28.6%
*-commutative28.6%
associate-*l*31.7%
Simplified31.7%
Final simplification35.2%
(FPCore (x y z t a b) :precision binary64 (if (<= b -9e+191) (* x (* z (- a))) (if (<= b 6.8e+141) (* x (- 1.0 (* y t))) (* a (* x (- b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -9e+191) {
tmp = x * (z * -a);
} else if (b <= 6.8e+141) {
tmp = x * (1.0 - (y * t));
} else {
tmp = a * (x * -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 (b <= (-9d+191)) then
tmp = x * (z * -a)
else if (b <= 6.8d+141) then
tmp = x * (1.0d0 - (y * t))
else
tmp = a * (x * -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 (b <= -9e+191) {
tmp = x * (z * -a);
} else if (b <= 6.8e+141) {
tmp = x * (1.0 - (y * t));
} else {
tmp = a * (x * -b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -9e+191: tmp = x * (z * -a) elif b <= 6.8e+141: tmp = x * (1.0 - (y * t)) else: tmp = a * (x * -b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -9e+191) tmp = Float64(x * Float64(z * Float64(-a))); elseif (b <= 6.8e+141) tmp = Float64(x * Float64(1.0 - Float64(y * t))); else tmp = Float64(a * Float64(x * Float64(-b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -9e+191) tmp = x * (z * -a); elseif (b <= 6.8e+141) tmp = x * (1.0 - (y * t)); else tmp = a * (x * -b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -9e+191], N[(x * N[(z * (-a)), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 6.8e+141], N[(x * N[(1.0 - N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(x * (-b)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -9 \cdot 10^{+191}:\\
\;\;\;\;x \cdot \left(z \cdot \left(-a\right)\right)\\
\mathbf{elif}\;b \leq 6.8 \cdot 10^{+141}:\\
\;\;\;\;x \cdot \left(1 - y \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\
\end{array}
\end{array}
if b < -9.0000000000000005e191Initial program 94.7%
Taylor expanded in y around 0 79.8%
sub-neg79.8%
log1p-define79.8%
Simplified79.8%
Taylor expanded in z around 0 79.8%
associate-*r*79.8%
associate-*r*79.8%
distribute-lft-out79.8%
mul-1-neg79.8%
Simplified79.8%
Taylor expanded in a around 0 11.0%
mul-1-neg11.0%
unsub-neg11.0%
+-commutative11.0%
Simplified11.0%
Taylor expanded in z around inf 41.5%
mul-1-neg41.5%
associate-*r*41.4%
*-commutative41.4%
associate-*l*49.1%
Simplified49.1%
if -9.0000000000000005e191 < b < 6.7999999999999996e141Initial program 96.6%
Taylor expanded in t around inf 63.0%
mul-1-neg63.0%
distribute-lft-neg-out63.0%
*-commutative63.0%
Simplified63.0%
Taylor expanded in y around 0 35.0%
mul-1-neg35.0%
unsub-neg35.0%
*-commutative35.0%
Simplified35.0%
if 6.7999999999999996e141 < b Initial program 100.0%
Taylor expanded in b around inf 84.0%
mul-1-neg84.0%
distribute-rgt-neg-out84.0%
Simplified84.0%
Taylor expanded in a around 0 25.2%
mul-1-neg25.2%
unsub-neg25.2%
Simplified25.2%
Taylor expanded in a around inf 27.7%
neg-mul-127.7%
distribute-rgt-neg-in27.7%
distribute-lft-neg-in27.7%
Simplified27.7%
Final simplification35.0%
(FPCore (x y z t a b) :precision binary64 (if (<= y -350000000000.0) (* a (* x (- b))) (if (<= y 4.8e-57) x (* x (* z (- a))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -350000000000.0) {
tmp = a * (x * -b);
} else if (y <= 4.8e-57) {
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 <= (-350000000000.0d0)) then
tmp = a * (x * -b)
else if (y <= 4.8d-57) 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 <= -350000000000.0) {
tmp = a * (x * -b);
} else if (y <= 4.8e-57) {
tmp = x;
} else {
tmp = x * (z * -a);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -350000000000.0: tmp = a * (x * -b) elif y <= 4.8e-57: tmp = x else: tmp = x * (z * -a) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -350000000000.0) tmp = Float64(a * Float64(x * Float64(-b))); elseif (y <= 4.8e-57) 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 <= -350000000000.0) tmp = a * (x * -b); elseif (y <= 4.8e-57) tmp = x; else tmp = x * (z * -a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -350000000000.0], N[(a * N[(x * (-b)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.8e-57], x, N[(x * N[(z * (-a)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -350000000000:\\
\;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\
\mathbf{elif}\;y \leq 4.8 \cdot 10^{-57}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(z \cdot \left(-a\right)\right)\\
\end{array}
\end{array}
if y < -3.5e11Initial program 96.4%
Taylor expanded in b around inf 39.9%
mul-1-neg39.9%
distribute-rgt-neg-out39.9%
Simplified39.9%
Taylor expanded in a around 0 11.6%
mul-1-neg11.6%
unsub-neg11.6%
Simplified11.6%
Taylor expanded in a around inf 11.2%
neg-mul-111.2%
distribute-rgt-neg-in11.2%
distribute-lft-neg-in11.2%
Simplified11.2%
if -3.5e11 < y < 4.80000000000000012e-57Initial program 95.1%
Taylor expanded in b around inf 79.7%
mul-1-neg79.7%
distribute-rgt-neg-out79.7%
Simplified79.7%
Taylor expanded in a around 0 35.7%
if 4.80000000000000012e-57 < y Initial program 100.0%
Taylor expanded in y around 0 38.5%
sub-neg38.5%
log1p-define38.4%
Simplified38.4%
Taylor expanded in z around 0 38.4%
associate-*r*38.4%
associate-*r*38.4%
distribute-lft-out38.4%
mul-1-neg38.4%
Simplified38.4%
Taylor expanded in a around 0 9.3%
mul-1-neg9.3%
unsub-neg9.3%
+-commutative9.3%
Simplified9.3%
Taylor expanded in z around inf 28.1%
mul-1-neg28.1%
associate-*r*26.9%
*-commutative26.9%
associate-*l*28.2%
Simplified28.2%
Final simplification28.1%
(FPCore (x y z t a b) :precision binary64 (if (<= y -350000000000.0) (* x (* a (- b))) (if (<= y 2.5e-56) x (* x (* z (- a))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -350000000000.0) {
tmp = x * (a * -b);
} else if (y <= 2.5e-56) {
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 <= (-350000000000.0d0)) then
tmp = x * (a * -b)
else if (y <= 2.5d-56) 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 <= -350000000000.0) {
tmp = x * (a * -b);
} else if (y <= 2.5e-56) {
tmp = x;
} else {
tmp = x * (z * -a);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -350000000000.0: tmp = x * (a * -b) elif y <= 2.5e-56: tmp = x else: tmp = x * (z * -a) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -350000000000.0) tmp = Float64(x * Float64(a * Float64(-b))); elseif (y <= 2.5e-56) 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 <= -350000000000.0) tmp = x * (a * -b); elseif (y <= 2.5e-56) tmp = x; else tmp = x * (z * -a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -350000000000.0], N[(x * N[(a * (-b)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.5e-56], x, N[(x * N[(z * (-a)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -350000000000:\\
\;\;\;\;x \cdot \left(a \cdot \left(-b\right)\right)\\
\mathbf{elif}\;y \leq 2.5 \cdot 10^{-56}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(z \cdot \left(-a\right)\right)\\
\end{array}
\end{array}
if y < -3.5e11Initial program 96.4%
Taylor expanded in b around inf 39.9%
mul-1-neg39.9%
distribute-rgt-neg-out39.9%
Simplified39.9%
Taylor expanded in a around 0 11.6%
mul-1-neg11.6%
unsub-neg11.6%
Simplified11.6%
Taylor expanded in a around inf 11.2%
neg-mul-111.2%
distribute-rgt-neg-in11.2%
distribute-lft-neg-in11.2%
Simplified11.2%
Taylor expanded in a around 0 11.2%
mul-1-neg11.2%
associate-*r*14.7%
*-commutative14.7%
distribute-rgt-neg-in14.7%
*-commutative14.7%
distribute-rgt-neg-in14.7%
Simplified14.7%
if -3.5e11 < y < 2.49999999999999999e-56Initial program 95.1%
Taylor expanded in b around inf 79.7%
mul-1-neg79.7%
distribute-rgt-neg-out79.7%
Simplified79.7%
Taylor expanded in a around 0 35.7%
if 2.49999999999999999e-56 < y Initial program 100.0%
Taylor expanded in y around 0 38.5%
sub-neg38.5%
log1p-define38.4%
Simplified38.4%
Taylor expanded in z around 0 38.4%
associate-*r*38.4%
associate-*r*38.4%
distribute-lft-out38.4%
mul-1-neg38.4%
Simplified38.4%
Taylor expanded in a around 0 9.3%
mul-1-neg9.3%
unsub-neg9.3%
+-commutative9.3%
Simplified9.3%
Taylor expanded in z around inf 28.1%
mul-1-neg28.1%
associate-*r*26.9%
*-commutative26.9%
associate-*l*28.2%
Simplified28.2%
Final simplification28.8%
(FPCore (x y z t a b) :precision binary64 (if (<= y 6.9e+34) (* x (- 1.0 (* a b))) (* x (* z (- a)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= 6.9e+34) {
tmp = x * (1.0 - (a * b));
} 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 <= 6.9d+34) then
tmp = x * (1.0d0 - (a * b))
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 <= 6.9e+34) {
tmp = x * (1.0 - (a * b));
} else {
tmp = x * (z * -a);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= 6.9e+34: tmp = x * (1.0 - (a * b)) else: tmp = x * (z * -a) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= 6.9e+34) tmp = Float64(x * Float64(1.0 - Float64(a * b))); 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 <= 6.9e+34) tmp = x * (1.0 - (a * b)); else tmp = x * (z * -a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, 6.9e+34], N[(x * N[(1.0 - N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(z * (-a)), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 6.9 \cdot 10^{+34}:\\
\;\;\;\;x \cdot \left(1 - a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(z \cdot \left(-a\right)\right)\\
\end{array}
\end{array}
if y < 6.90000000000000037e34Initial program 95.9%
Taylor expanded in b around inf 65.6%
mul-1-neg65.6%
distribute-rgt-neg-out65.6%
Simplified65.6%
Taylor expanded in a around 0 30.6%
mul-1-neg30.6%
unsub-neg30.6%
Simplified30.6%
if 6.90000000000000037e34 < y Initial program 100.0%
Taylor expanded in y around 0 35.8%
sub-neg35.8%
log1p-define35.8%
Simplified35.8%
Taylor expanded in z around 0 35.8%
associate-*r*35.8%
associate-*r*35.8%
distribute-lft-out35.8%
mul-1-neg35.8%
Simplified35.8%
Taylor expanded in a around 0 6.6%
mul-1-neg6.6%
unsub-neg6.6%
+-commutative6.6%
Simplified6.6%
Taylor expanded in z around inf 31.6%
mul-1-neg31.6%
associate-*r*28.6%
*-commutative28.6%
associate-*l*31.7%
Simplified31.7%
Final simplification30.8%
(FPCore (x y z t a b) :precision binary64 (if (<= y 4.3e-57) x (* x (* z (- a)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= 4.3e-57) {
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 <= 4.3d-57) 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 <= 4.3e-57) {
tmp = x;
} else {
tmp = x * (z * -a);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= 4.3e-57: tmp = x else: tmp = x * (z * -a) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= 4.3e-57) 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 <= 4.3e-57) tmp = x; else tmp = x * (z * -a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, 4.3e-57], x, N[(x * N[(z * (-a)), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 4.3 \cdot 10^{-57}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(z \cdot \left(-a\right)\right)\\
\end{array}
\end{array}
if y < 4.30000000000000022e-57Initial program 95.5%
Taylor expanded in b around inf 67.2%
mul-1-neg67.2%
distribute-rgt-neg-out67.2%
Simplified67.2%
Taylor expanded in a around 0 25.6%
if 4.30000000000000022e-57 < y Initial program 100.0%
Taylor expanded in y around 0 38.5%
sub-neg38.5%
log1p-define38.4%
Simplified38.4%
Taylor expanded in z around 0 38.4%
associate-*r*38.4%
associate-*r*38.4%
distribute-lft-out38.4%
mul-1-neg38.4%
Simplified38.4%
Taylor expanded in a around 0 9.3%
mul-1-neg9.3%
unsub-neg9.3%
+-commutative9.3%
Simplified9.3%
Taylor expanded in z around inf 28.1%
mul-1-neg28.1%
associate-*r*26.9%
*-commutative26.9%
associate-*l*28.2%
Simplified28.2%
Final simplification26.4%
(FPCore (x y z t a b) :precision binary64 (if (<= y 2.9e-56) x (* a (* x b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= 2.9e-56) {
tmp = x;
} else {
tmp = a * (x * 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 <= 2.9d-56) then
tmp = x
else
tmp = a * (x * 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 <= 2.9e-56) {
tmp = x;
} else {
tmp = a * (x * b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= 2.9e-56: tmp = x else: tmp = a * (x * b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= 2.9e-56) tmp = x; else tmp = Float64(a * Float64(x * b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= 2.9e-56) tmp = x; else tmp = a * (x * b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, 2.9e-56], x, N[(a * N[(x * b), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 2.9 \cdot 10^{-56}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(x \cdot b\right)\\
\end{array}
\end{array}
if y < 2.89999999999999991e-56Initial program 95.5%
Taylor expanded in b around inf 67.2%
mul-1-neg67.2%
distribute-rgt-neg-out67.2%
Simplified67.2%
Taylor expanded in a around 0 25.6%
if 2.89999999999999991e-56 < y Initial program 100.0%
Taylor expanded in b around inf 39.7%
mul-1-neg39.7%
distribute-rgt-neg-out39.7%
Simplified39.7%
Taylor expanded in a around 0 9.4%
mul-1-neg9.4%
unsub-neg9.4%
Simplified9.4%
cancel-sign-sub-inv9.4%
add-sqr-sqrt6.7%
sqrt-unprod10.1%
sqr-neg10.1%
sqrt-unprod1.3%
add-sqr-sqrt5.3%
associate-*r*2.9%
distribute-rgt1-in2.9%
Applied egg-rr2.9%
Taylor expanded in a around inf 14.5%
Final simplification22.1%
(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 96.9%
Taylor expanded in b around inf 58.6%
mul-1-neg58.6%
distribute-rgt-neg-out58.6%
Simplified58.6%
Taylor expanded in a around 0 18.8%
Final simplification18.8%
herbie shell --seed 2024095
(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))))))