
(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 16 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 (- (* y (- (log z) t)) (* a (+ z b))))))
double code(double x, double y, double z, double t, double a, double b) {
return x * exp(((y * (log(z) - t)) - (a * (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 * (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 * (z + b))));
}
def code(x, y, z, t, a, b): return x * math.exp(((y * (math.log(z) - t)) - (a * (z + b))))
function code(x, y, z, t, a, b) return Float64(x * exp(Float64(Float64(y * Float64(log(z) - t)) - Float64(a * Float64(z + b))))) end
function tmp = code(x, y, z, t, a, b) tmp = x * exp(((y * (log(z) - t)) - (a * (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[(z + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot e^{y \cdot \left(\log z - t\right) - a \cdot \left(z + b\right)}
\end{array}
Initial program 98.4%
Taylor expanded in z around 0 100.0%
mul-1-neg100.0%
Simplified100.0%
Final simplification100.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -180000.0) (not (<= t 5.6e-67))) (* x (exp (- (* a (- (- b) z)) (* y t)))) (* x (exp (- (* y (log z)) (* a b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -180000.0) || !(t <= 5.6e-67)) {
tmp = x * exp(((a * (-b - z)) - (y * t)));
} else {
tmp = x * exp(((y * log(z)) - (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 ((t <= (-180000.0d0)) .or. (.not. (t <= 5.6d-67))) then
tmp = x * exp(((a * (-b - z)) - (y * t)))
else
tmp = x * exp(((y * log(z)) - (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 ((t <= -180000.0) || !(t <= 5.6e-67)) {
tmp = x * Math.exp(((a * (-b - z)) - (y * t)));
} else {
tmp = x * Math.exp(((y * Math.log(z)) - (a * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -180000.0) or not (t <= 5.6e-67): tmp = x * math.exp(((a * (-b - z)) - (y * t))) else: tmp = x * math.exp(((y * math.log(z)) - (a * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -180000.0) || !(t <= 5.6e-67)) tmp = Float64(x * exp(Float64(Float64(a * Float64(Float64(-b) - z)) - Float64(y * t)))); else tmp = Float64(x * exp(Float64(Float64(y * log(z)) - Float64(a * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -180000.0) || ~((t <= 5.6e-67))) tmp = x * exp(((a * (-b - z)) - (y * t))); else tmp = x * exp(((y * log(z)) - (a * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -180000.0], N[Not[LessEqual[t, 5.6e-67]], $MachinePrecision]], N[(x * N[Exp[N[(N[(a * N[((-b) - z), $MachinePrecision]), $MachinePrecision] - N[(y * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(x * N[Exp[N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] - N[(a * b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -180000 \lor \neg \left(t \leq 5.6 \cdot 10^{-67}\right):\\
\;\;\;\;x \cdot e^{a \cdot \left(\left(-b\right) - z\right) - y \cdot t}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{y \cdot \log z - a \cdot b}\\
\end{array}
\end{array}
if t < -1.8e5 or 5.60000000000000021e-67 < t Initial program 98.4%
Taylor expanded in z around 0 100.0%
mul-1-neg100.0%
Simplified100.0%
Taylor expanded in t around inf 100.0%
neg-mul-171.1%
Simplified100.0%
if -1.8e5 < t < 5.60000000000000021e-67Initial program 98.3%
fma-define98.3%
sub-neg98.3%
log1p-define100.0%
Simplified100.0%
Taylor expanded in z around 0 97.5%
*-commutative97.5%
+-commutative97.5%
mul-1-neg97.5%
sub-neg97.5%
Simplified97.5%
Taylor expanded in t around 0 97.5%
Final simplification98.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.35e-12) (not (<= y 2.15e+96))) (* x (exp (* y (- (log z) t)))) (* x (exp (- (* a (- (- b) z)) (* y t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.35e-12) || !(y <= 2.15e+96)) {
tmp = x * exp((y * (log(z) - t)));
} else {
tmp = x * exp(((a * (-b - z)) - (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 <= (-1.35d-12)) .or. (.not. (y <= 2.15d+96))) then
tmp = x * exp((y * (log(z) - t)))
else
tmp = x * exp(((a * (-b - z)) - (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 <= -1.35e-12) || !(y <= 2.15e+96)) {
tmp = x * Math.exp((y * (Math.log(z) - t)));
} else {
tmp = x * Math.exp(((a * (-b - z)) - (y * t)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1.35e-12) or not (y <= 2.15e+96): tmp = x * math.exp((y * (math.log(z) - t))) else: tmp = x * math.exp(((a * (-b - z)) - (y * t))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1.35e-12) || !(y <= 2.15e+96)) tmp = Float64(x * exp(Float64(y * Float64(log(z) - t)))); else tmp = Float64(x * exp(Float64(Float64(a * Float64(Float64(-b) - z)) - Float64(y * t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -1.35e-12) || ~((y <= 2.15e+96))) tmp = x * exp((y * (log(z) - t))); else tmp = x * exp(((a * (-b - z)) - (y * t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1.35e-12], N[Not[LessEqual[y, 2.15e+96]], $MachinePrecision]], N[(x * N[Exp[N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(x * N[Exp[N[(N[(a * N[((-b) - z), $MachinePrecision]), $MachinePrecision] - N[(y * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.35 \cdot 10^{-12} \lor \neg \left(y \leq 2.15 \cdot 10^{+96}\right):\\
\;\;\;\;x \cdot e^{y \cdot \left(\log z - t\right)}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{a \cdot \left(\left(-b\right) - z\right) - y \cdot t}\\
\end{array}
\end{array}
if y < -1.3499999999999999e-12 or 2.15000000000000001e96 < y Initial program 100.0%
Taylor expanded in a around 0 92.9%
if -1.3499999999999999e-12 < y < 2.15000000000000001e96Initial program 97.3%
Taylor expanded in z around 0 100.0%
mul-1-neg100.0%
Simplified100.0%
Taylor expanded in t around inf 97.3%
neg-mul-147.4%
Simplified97.3%
Final simplification95.5%
(FPCore (x y z t a b) :precision binary64 (* x (exp (- (* y (- (log z) t)) (* a b)))))
double code(double x, double y, double z, double t, double a, double b) {
return x * exp(((y * (log(z) - t)) - (a * 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 * 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 * b)));
}
def code(x, y, z, t, a, b): return x * math.exp(((y * (math.log(z) - t)) - (a * b)))
function code(x, y, z, t, a, b) return Float64(x * exp(Float64(Float64(y * Float64(log(z) - t)) - Float64(a * b)))) end
function tmp = code(x, y, z, t, a, b) tmp = x * exp(((y * (log(z) - t)) - (a * 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 * b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot e^{y \cdot \left(\log z - t\right) - a \cdot b}
\end{array}
Initial program 98.4%
fma-define98.4%
sub-neg98.4%
log1p-define100.0%
Simplified100.0%
Taylor expanded in z around 0 98.0%
*-commutative98.0%
+-commutative98.0%
mul-1-neg98.0%
sub-neg98.0%
Simplified98.0%
Final simplification98.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (exp (* a (- b))))))
(if (<= b -2.1e-62)
t_1
(if (<= b -7e-155)
(* x (pow z y))
(if (<= b 2.2e-54) (* x (exp (* y (- t)))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * exp((a * -b));
double tmp;
if (b <= -2.1e-62) {
tmp = t_1;
} else if (b <= -7e-155) {
tmp = x * pow(z, y);
} else if (b <= 2.2e-54) {
tmp = x * exp((y * -t));
} 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((a * -b))
if (b <= (-2.1d-62)) then
tmp = t_1
else if (b <= (-7d-155)) then
tmp = x * (z ** y)
else if (b <= 2.2d-54) then
tmp = x * exp((y * -t))
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((a * -b));
double tmp;
if (b <= -2.1e-62) {
tmp = t_1;
} else if (b <= -7e-155) {
tmp = x * Math.pow(z, y);
} else if (b <= 2.2e-54) {
tmp = x * Math.exp((y * -t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x * math.exp((a * -b)) tmp = 0 if b <= -2.1e-62: tmp = t_1 elif b <= -7e-155: tmp = x * math.pow(z, y) elif b <= 2.2e-54: tmp = x * math.exp((y * -t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x * exp(Float64(a * Float64(-b)))) tmp = 0.0 if (b <= -2.1e-62) tmp = t_1; elseif (b <= -7e-155) tmp = Float64(x * (z ^ y)); elseif (b <= 2.2e-54) tmp = Float64(x * exp(Float64(y * Float64(-t)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x * exp((a * -b)); tmp = 0.0; if (b <= -2.1e-62) tmp = t_1; elseif (b <= -7e-155) tmp = x * (z ^ y); elseif (b <= 2.2e-54) tmp = x * exp((y * -t)); 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[(a * (-b)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -2.1e-62], t$95$1, If[LessEqual[b, -7e-155], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.2e-54], N[(x * N[Exp[N[(y * (-t)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot e^{a \cdot \left(-b\right)}\\
\mathbf{if}\;b \leq -2.1 \cdot 10^{-62}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -7 \cdot 10^{-155}:\\
\;\;\;\;x \cdot {z}^{y}\\
\mathbf{elif}\;b \leq 2.2 \cdot 10^{-54}:\\
\;\;\;\;x \cdot e^{y \cdot \left(-t\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -2.0999999999999999e-62 or 2.2e-54 < b Initial program 100.0%
Taylor expanded in b around inf 80.9%
mul-1-neg80.9%
distribute-rgt-neg-out80.9%
Simplified80.9%
if -2.0999999999999999e-62 < b < -7.00000000000000031e-155Initial program 95.7%
Taylor expanded in a around 0 87.3%
Taylor expanded in t around 0 78.9%
if -7.00000000000000031e-155 < b < 2.2e-54Initial program 96.6%
Taylor expanded in a around 0 92.6%
Taylor expanded in t around inf 79.6%
neg-mul-179.6%
Simplified79.6%
Final simplification80.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -9.5e-88) (not (<= b 1.22e+14))) (* x (exp (* a (- b)))) (* x (exp (- (* y (- t)) (* z a))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -9.5e-88) || !(b <= 1.22e+14)) {
tmp = x * exp((a * -b));
} else {
tmp = x * exp(((y * -t) - (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 ((b <= (-9.5d-88)) .or. (.not. (b <= 1.22d+14))) then
tmp = x * exp((a * -b))
else
tmp = x * exp(((y * -t) - (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 ((b <= -9.5e-88) || !(b <= 1.22e+14)) {
tmp = x * Math.exp((a * -b));
} else {
tmp = x * Math.exp(((y * -t) - (z * a)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -9.5e-88) or not (b <= 1.22e+14): tmp = x * math.exp((a * -b)) else: tmp = x * math.exp(((y * -t) - (z * a))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -9.5e-88) || !(b <= 1.22e+14)) tmp = Float64(x * exp(Float64(a * Float64(-b)))); else tmp = Float64(x * exp(Float64(Float64(y * Float64(-t)) - Float64(z * a)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -9.5e-88) || ~((b <= 1.22e+14))) tmp = x * exp((a * -b)); else tmp = x * exp(((y * -t) - (z * a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -9.5e-88], N[Not[LessEqual[b, 1.22e+14]], $MachinePrecision]], N[(x * N[Exp[N[(a * (-b)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(x * N[Exp[N[(N[(y * (-t)), $MachinePrecision] - N[(z * a), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -9.5 \cdot 10^{-88} \lor \neg \left(b \leq 1.22 \cdot 10^{+14}\right):\\
\;\;\;\;x \cdot e^{a \cdot \left(-b\right)}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{y \cdot \left(-t\right) - z \cdot a}\\
\end{array}
\end{array}
if b < -9.5e-88 or 1.22e14 < b Initial program 100.0%
Taylor expanded in b around inf 80.4%
mul-1-neg80.4%
distribute-rgt-neg-out80.4%
Simplified80.4%
if -9.5e-88 < b < 1.22e14Initial program 96.5%
Taylor expanded in z around 0 99.9%
mul-1-neg99.9%
Simplified99.9%
Taylor expanded in t around inf 86.7%
neg-mul-175.1%
Simplified86.7%
Taylor expanded in b around 0 82.7%
distribute-lft-out82.7%
Simplified82.7%
Final simplification81.4%
(FPCore (x y z t a b) :precision binary64 (if (<= y -5e+240) (* x (pow z y)) (* x (exp (- (* a (- (- b) z)) (* y t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -5e+240) {
tmp = x * pow(z, y);
} else {
tmp = x * exp(((a * (-b - z)) - (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 <= (-5d+240)) then
tmp = x * (z ** y)
else
tmp = x * exp(((a * (-b - z)) - (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 <= -5e+240) {
tmp = x * Math.pow(z, y);
} else {
tmp = x * Math.exp(((a * (-b - z)) - (y * t)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -5e+240: tmp = x * math.pow(z, y) else: tmp = x * math.exp(((a * (-b - z)) - (y * t))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -5e+240) tmp = Float64(x * (z ^ y)); else tmp = Float64(x * exp(Float64(Float64(a * Float64(Float64(-b) - z)) - Float64(y * t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -5e+240) tmp = x * (z ^ y); else tmp = x * exp(((a * (-b - z)) - (y * t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -5e+240], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision], N[(x * N[Exp[N[(N[(a * N[((-b) - z), $MachinePrecision]), $MachinePrecision] - N[(y * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5 \cdot 10^{+240}:\\
\;\;\;\;x \cdot {z}^{y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{a \cdot \left(\left(-b\right) - z\right) - y \cdot t}\\
\end{array}
\end{array}
if y < -5.0000000000000003e240Initial program 100.0%
Taylor expanded in a around 0 95.7%
Taylor expanded in t around 0 87.2%
if -5.0000000000000003e240 < y Initial program 98.2%
Taylor expanded in z around 0 100.0%
mul-1-neg100.0%
Simplified100.0%
Taylor expanded in t around inf 91.3%
neg-mul-152.7%
Simplified91.3%
Final simplification90.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.35e-12) (not (<= y 1.2e+85))) (* 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 <= -1.35e-12) || !(y <= 1.2e+85)) {
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 <= (-1.35d-12)) .or. (.not. (y <= 1.2d+85))) 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 <= -1.35e-12) || !(y <= 1.2e+85)) {
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 <= -1.35e-12) or not (y <= 1.2e+85): 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 <= -1.35e-12) || !(y <= 1.2e+85)) 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 <= -1.35e-12) || ~((y <= 1.2e+85))) 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, -1.35e-12], N[Not[LessEqual[y, 1.2e+85]], $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 -1.35 \cdot 10^{-12} \lor \neg \left(y \leq 1.2 \cdot 10^{+85}\right):\\
\;\;\;\;x \cdot {z}^{y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{a \cdot \left(-b\right)}\\
\end{array}
\end{array}
if y < -1.3499999999999999e-12 or 1.19999999999999998e85 < y Initial program 100.0%
Taylor expanded in a around 0 92.1%
Taylor expanded in t around 0 71.9%
if -1.3499999999999999e-12 < y < 1.19999999999999998e85Initial program 97.2%
Taylor expanded in b around inf 79.7%
mul-1-neg79.7%
distribute-rgt-neg-out79.7%
Simplified79.7%
Final simplification76.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -9e-14) (not (<= y 1.85e-36))) (* x (pow z y)) (* x (- 1.0 (* a b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -9e-14) || !(y <= 1.85e-36)) {
tmp = x * pow(z, y);
} else {
tmp = x * (1.0 - (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 <= (-9d-14)) .or. (.not. (y <= 1.85d-36))) then
tmp = x * (z ** y)
else
tmp = x * (1.0d0 - (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 <= -9e-14) || !(y <= 1.85e-36)) {
tmp = x * Math.pow(z, y);
} else {
tmp = x * (1.0 - (a * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -9e-14) or not (y <= 1.85e-36): tmp = x * math.pow(z, y) else: tmp = x * (1.0 - (a * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -9e-14) || !(y <= 1.85e-36)) tmp = Float64(x * (z ^ y)); else tmp = Float64(x * Float64(1.0 - Float64(a * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -9e-14) || ~((y <= 1.85e-36))) tmp = x * (z ^ y); else tmp = x * (1.0 - (a * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -9e-14], N[Not[LessEqual[y, 1.85e-36]], $MachinePrecision]], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 - N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9 \cdot 10^{-14} \lor \neg \left(y \leq 1.85 \cdot 10^{-36}\right):\\
\;\;\;\;x \cdot {z}^{y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - a \cdot b\right)\\
\end{array}
\end{array}
if y < -8.9999999999999995e-14 or 1.85000000000000001e-36 < y Initial program 100.0%
Taylor expanded in a around 0 86.4%
Taylor expanded in t around 0 66.0%
if -8.9999999999999995e-14 < y < 1.85000000000000001e-36Initial program 96.6%
Taylor expanded in b around inf 82.4%
mul-1-neg82.4%
distribute-rgt-neg-out82.4%
Simplified82.4%
Taylor expanded in a around 0 40.8%
mul-1-neg40.8%
unsub-neg40.8%
Simplified40.8%
Taylor expanded in x around 0 43.2%
Final simplification55.2%
(FPCore (x y z t a b) :precision binary64 (if (<= y -5.2e+159) (- x (* t (* x y))) (if (<= y 0.00052) (* x (- 1.0 (* a b))) (* x (* a (- b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -5.2e+159) {
tmp = x - (t * (x * y));
} else if (y <= 0.00052) {
tmp = x * (1.0 - (a * b));
} else {
tmp = x * (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 <= (-5.2d+159)) then
tmp = x - (t * (x * y))
else if (y <= 0.00052d0) then
tmp = x * (1.0d0 - (a * b))
else
tmp = x * (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 <= -5.2e+159) {
tmp = x - (t * (x * y));
} else if (y <= 0.00052) {
tmp = x * (1.0 - (a * b));
} else {
tmp = x * (a * -b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -5.2e+159: tmp = x - (t * (x * y)) elif y <= 0.00052: tmp = x * (1.0 - (a * b)) else: tmp = x * (a * -b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -5.2e+159) tmp = Float64(x - Float64(t * Float64(x * y))); elseif (y <= 0.00052) tmp = Float64(x * Float64(1.0 - Float64(a * b))); else tmp = Float64(x * Float64(a * Float64(-b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -5.2e+159) tmp = x - (t * (x * y)); elseif (y <= 0.00052) tmp = x * (1.0 - (a * b)); else tmp = x * (a * -b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -5.2e+159], N[(x - N[(t * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 0.00052], N[(x * N[(1.0 - N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(a * (-b)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.2 \cdot 10^{+159}:\\
\;\;\;\;x - t \cdot \left(x \cdot y\right)\\
\mathbf{elif}\;y \leq 0.00052:\\
\;\;\;\;x \cdot \left(1 - a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(a \cdot \left(-b\right)\right)\\
\end{array}
\end{array}
if y < -5.2000000000000001e159Initial program 100.0%
Taylor expanded in a around 0 92.8%
Taylor expanded in t around inf 59.4%
neg-mul-159.4%
Simplified59.4%
Taylor expanded in y around 0 28.7%
mul-1-neg28.7%
unsub-neg28.7%
*-commutative28.7%
Simplified28.7%
if -5.2000000000000001e159 < y < 5.19999999999999954e-4Initial program 97.4%
Taylor expanded in b around inf 73.6%
mul-1-neg73.6%
distribute-rgt-neg-out73.6%
Simplified73.6%
Taylor expanded in a around 0 36.2%
mul-1-neg36.2%
unsub-neg36.2%
Simplified36.2%
Taylor expanded in x around 0 38.1%
if 5.19999999999999954e-4 < y Initial program 100.0%
Taylor expanded in b around inf 45.8%
mul-1-neg45.8%
distribute-rgt-neg-out45.8%
Simplified45.8%
Taylor expanded in a around 0 12.0%
mul-1-neg12.0%
unsub-neg12.0%
Simplified12.0%
Taylor expanded in a around inf 28.7%
mul-1-neg28.7%
associate-*r*38.6%
distribute-rgt-neg-out38.6%
Simplified38.6%
Final simplification36.7%
(FPCore (x y z t a b) :precision binary64 (if (<= y -1e+166) (* x (- 1.0 (* y t))) (if (<= y 6.8e-5) (* x (- 1.0 (* a b))) (* x (* a (- b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1e+166) {
tmp = x * (1.0 - (y * t));
} else if (y <= 6.8e-5) {
tmp = x * (1.0 - (a * b));
} else {
tmp = x * (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 <= (-1d+166)) then
tmp = x * (1.0d0 - (y * t))
else if (y <= 6.8d-5) then
tmp = x * (1.0d0 - (a * b))
else
tmp = x * (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 <= -1e+166) {
tmp = x * (1.0 - (y * t));
} else if (y <= 6.8e-5) {
tmp = x * (1.0 - (a * b));
} else {
tmp = x * (a * -b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -1e+166: tmp = x * (1.0 - (y * t)) elif y <= 6.8e-5: tmp = x * (1.0 - (a * b)) else: tmp = x * (a * -b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -1e+166) tmp = Float64(x * Float64(1.0 - Float64(y * t))); elseif (y <= 6.8e-5) tmp = Float64(x * Float64(1.0 - Float64(a * b))); else tmp = Float64(x * Float64(a * Float64(-b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -1e+166) tmp = x * (1.0 - (y * t)); elseif (y <= 6.8e-5) tmp = x * (1.0 - (a * b)); else tmp = x * (a * -b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1e+166], N[(x * N[(1.0 - N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.8e-5], N[(x * N[(1.0 - N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(a * (-b)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1 \cdot 10^{+166}:\\
\;\;\;\;x \cdot \left(1 - y \cdot t\right)\\
\mathbf{elif}\;y \leq 6.8 \cdot 10^{-5}:\\
\;\;\;\;x \cdot \left(1 - a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(a \cdot \left(-b\right)\right)\\
\end{array}
\end{array}
if y < -9.9999999999999994e165Initial program 100.0%
Taylor expanded in a around 0 92.8%
Taylor expanded in t around inf 59.4%
neg-mul-159.4%
Simplified59.4%
Taylor expanded in y around 0 35.7%
associate-*r*35.7%
mul-1-neg35.7%
Simplified35.7%
if -9.9999999999999994e165 < y < 6.7999999999999999e-5Initial program 97.4%
Taylor expanded in b around inf 73.4%
mul-1-neg73.4%
distribute-rgt-neg-out73.4%
Simplified73.4%
Taylor expanded in a around 0 36.5%
mul-1-neg36.5%
unsub-neg36.5%
Simplified36.5%
Taylor expanded in x around 0 38.3%
if 6.7999999999999999e-5 < y Initial program 100.0%
Taylor expanded in b around inf 46.8%
mul-1-neg46.8%
distribute-rgt-neg-out46.8%
Simplified46.8%
Taylor expanded in a around 0 11.8%
mul-1-neg11.8%
unsub-neg11.8%
Simplified11.8%
Taylor expanded in a around inf 28.3%
mul-1-neg28.3%
associate-*r*37.9%
distribute-rgt-neg-out37.9%
Simplified37.9%
Final simplification37.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -2.2e-50) (not (<= y 0.00016))) (* a (* x (- b))) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -2.2e-50) || !(y <= 0.00016)) {
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 ((y <= (-2.2d-50)) .or. (.not. (y <= 0.00016d0))) 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 ((y <= -2.2e-50) || !(y <= 0.00016)) {
tmp = a * (x * -b);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -2.2e-50) or not (y <= 0.00016): tmp = a * (x * -b) else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -2.2e-50) || !(y <= 0.00016)) 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 ((y <= -2.2e-50) || ~((y <= 0.00016))) tmp = a * (x * -b); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -2.2e-50], N[Not[LessEqual[y, 0.00016]], $MachinePrecision]], N[(a * N[(x * (-b)), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.2 \cdot 10^{-50} \lor \neg \left(y \leq 0.00016\right):\\
\;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -2.1999999999999999e-50 or 1.60000000000000013e-4 < y Initial program 99.3%
Taylor expanded in b around inf 42.7%
mul-1-neg42.7%
distribute-rgt-neg-out42.7%
Simplified42.7%
Taylor expanded in a around 0 15.9%
mul-1-neg15.9%
unsub-neg15.9%
Simplified15.9%
Taylor expanded in a around inf 23.9%
mul-1-neg23.9%
*-commutative23.9%
distribute-rgt-neg-in23.9%
distribute-rgt-neg-in23.9%
Simplified23.9%
if -2.1999999999999999e-50 < y < 1.60000000000000013e-4Initial program 97.3%
Taylor expanded in b around inf 83.4%
mul-1-neg83.4%
distribute-rgt-neg-out83.4%
Simplified83.4%
Taylor expanded in a around 0 34.7%
Final simplification28.9%
(FPCore (x y z t a b) :precision binary64 (if (<= y -2.4e-50) (* a (* x (- b))) (if (<= y 0.003) x (* a (* x (- z))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -2.4e-50) {
tmp = a * (x * -b);
} else if (y <= 0.003) {
tmp = x;
} 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 <= (-2.4d-50)) then
tmp = a * (x * -b)
else if (y <= 0.003d0) then
tmp = x
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 <= -2.4e-50) {
tmp = a * (x * -b);
} else if (y <= 0.003) {
tmp = x;
} else {
tmp = a * (x * -z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -2.4e-50: tmp = a * (x * -b) elif y <= 0.003: tmp = x else: tmp = a * (x * -z) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -2.4e-50) tmp = Float64(a * Float64(x * Float64(-b))); elseif (y <= 0.003) tmp = x; 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 <= -2.4e-50) tmp = a * (x * -b); elseif (y <= 0.003) tmp = x; else tmp = a * (x * -z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -2.4e-50], N[(a * N[(x * (-b)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 0.003], x, N[(a * N[(x * (-z)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.4 \cdot 10^{-50}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\
\mathbf{elif}\;y \leq 0.003:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-z\right)\right)\\
\end{array}
\end{array}
if y < -2.40000000000000002e-50Initial program 98.8%
Taylor expanded in b around inf 40.4%
mul-1-neg40.4%
distribute-rgt-neg-out40.4%
Simplified40.4%
Taylor expanded in a around 0 18.7%
mul-1-neg18.7%
unsub-neg18.7%
Simplified18.7%
Taylor expanded in a around inf 20.5%
mul-1-neg20.5%
*-commutative20.5%
distribute-rgt-neg-in20.5%
distribute-rgt-neg-in20.5%
Simplified20.5%
if -2.40000000000000002e-50 < y < 0.0030000000000000001Initial program 97.3%
Taylor expanded in b around inf 83.5%
mul-1-neg83.5%
distribute-rgt-neg-out83.5%
Simplified83.5%
Taylor expanded in a around 0 34.4%
if 0.0030000000000000001 < y Initial program 100.0%
Taylor expanded in z around 0 100.0%
mul-1-neg100.0%
Simplified100.0%
Taylor expanded in z around inf 12.0%
associate-*r*12.0%
neg-mul-112.0%
Simplified12.0%
Taylor expanded in a around 0 3.6%
mul-1-neg3.6%
unsub-neg3.6%
associate-*r*5.0%
*-commutative5.0%
Simplified5.0%
Taylor expanded in z around inf 30.4%
associate-*r*30.4%
neg-mul-130.4%
*-commutative30.4%
distribute-lft-neg-in30.4%
distribute-rgt-neg-in30.4%
distribute-rgt-neg-in30.4%
Simplified30.4%
Final simplification29.1%
(FPCore (x y z t a b) :precision binary64 (if (<= y -2.12e-50) (* a (* x (- b))) (if (<= y 0.00016) x (* x (* a (- b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -2.12e-50) {
tmp = a * (x * -b);
} else if (y <= 0.00016) {
tmp = x;
} else {
tmp = x * (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 <= (-2.12d-50)) then
tmp = a * (x * -b)
else if (y <= 0.00016d0) then
tmp = x
else
tmp = x * (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 <= -2.12e-50) {
tmp = a * (x * -b);
} else if (y <= 0.00016) {
tmp = x;
} else {
tmp = x * (a * -b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -2.12e-50: tmp = a * (x * -b) elif y <= 0.00016: tmp = x else: tmp = x * (a * -b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -2.12e-50) tmp = Float64(a * Float64(x * Float64(-b))); elseif (y <= 0.00016) tmp = x; else tmp = Float64(x * Float64(a * Float64(-b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -2.12e-50) tmp = a * (x * -b); elseif (y <= 0.00016) tmp = x; else tmp = x * (a * -b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -2.12e-50], N[(a * N[(x * (-b)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 0.00016], x, N[(x * N[(a * (-b)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.12 \cdot 10^{-50}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\
\mathbf{elif}\;y \leq 0.00016:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(a \cdot \left(-b\right)\right)\\
\end{array}
\end{array}
if y < -2.1199999999999999e-50Initial program 98.8%
Taylor expanded in b around inf 40.4%
mul-1-neg40.4%
distribute-rgt-neg-out40.4%
Simplified40.4%
Taylor expanded in a around 0 18.7%
mul-1-neg18.7%
unsub-neg18.7%
Simplified18.7%
Taylor expanded in a around inf 20.5%
mul-1-neg20.5%
*-commutative20.5%
distribute-rgt-neg-in20.5%
distribute-rgt-neg-in20.5%
Simplified20.5%
if -2.1199999999999999e-50 < y < 1.60000000000000013e-4Initial program 97.3%
Taylor expanded in b around inf 83.4%
mul-1-neg83.4%
distribute-rgt-neg-out83.4%
Simplified83.4%
Taylor expanded in a around 0 34.7%
if 1.60000000000000013e-4 < y Initial program 100.0%
Taylor expanded in b around inf 45.8%
mul-1-neg45.8%
distribute-rgt-neg-out45.8%
Simplified45.8%
Taylor expanded in a around 0 12.0%
mul-1-neg12.0%
unsub-neg12.0%
Simplified12.0%
Taylor expanded in a around inf 28.7%
mul-1-neg28.7%
associate-*r*38.6%
distribute-rgt-neg-out38.6%
Simplified38.6%
Final simplification31.1%
(FPCore (x y z t a b) :precision binary64 (if (<= y 0.0003) (* x (- 1.0 (* a b))) (* x (* a (- b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= 0.0003) {
tmp = x * (1.0 - (a * b));
} else {
tmp = x * (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 <= 0.0003d0) then
tmp = x * (1.0d0 - (a * b))
else
tmp = x * (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 <= 0.0003) {
tmp = x * (1.0 - (a * b));
} else {
tmp = x * (a * -b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= 0.0003: tmp = x * (1.0 - (a * b)) else: tmp = x * (a * -b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= 0.0003) tmp = Float64(x * Float64(1.0 - Float64(a * b))); else tmp = Float64(x * Float64(a * Float64(-b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= 0.0003) tmp = x * (1.0 - (a * b)); else tmp = x * (a * -b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, 0.0003], N[(x * N[(1.0 - N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(a * (-b)), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 0.0003:\\
\;\;\;\;x \cdot \left(1 - a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(a \cdot \left(-b\right)\right)\\
\end{array}
\end{array}
if y < 2.99999999999999974e-4Initial program 97.9%
Taylor expanded in b around inf 65.9%
mul-1-neg65.9%
distribute-rgt-neg-out65.9%
Simplified65.9%
Taylor expanded in a around 0 31.3%
mul-1-neg31.3%
unsub-neg31.3%
Simplified31.3%
Taylor expanded in x around 0 32.3%
if 2.99999999999999974e-4 < y Initial program 100.0%
Taylor expanded in b around inf 45.8%
mul-1-neg45.8%
distribute-rgt-neg-out45.8%
Simplified45.8%
Taylor expanded in a around 0 12.0%
mul-1-neg12.0%
unsub-neg12.0%
Simplified12.0%
Taylor expanded in a around inf 28.7%
mul-1-neg28.7%
associate-*r*38.6%
distribute-rgt-neg-out38.6%
Simplified38.6%
Final simplification33.7%
(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 98.4%
Taylor expanded in b around inf 61.4%
mul-1-neg61.4%
distribute-rgt-neg-out61.4%
Simplified61.4%
Taylor expanded in a around 0 18.8%
Final simplification18.8%
herbie shell --seed 2024084
(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))))))