
(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 17 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 95.4%
Taylor expanded in z around 0 100.0%
associate-+r+100.0%
+-commutative100.0%
distribute-lft-out100.0%
mul-1-neg100.0%
unsub-neg100.0%
distribute-lft-out100.0%
Simplified100.0%
Final simplification100.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -2.1e-49) (not (<= y 2.5e-148))) (* x (exp (* y (- (log z) t)))) (* x (exp (* a (- (log (- 1.0 z)) b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -2.1e-49) || !(y <= 2.5e-148)) {
tmp = x * exp((y * (log(z) - t)));
} else {
tmp = x * exp((a * (log((1.0 - z)) - b)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-2.1d-49)) .or. (.not. (y <= 2.5d-148))) then
tmp = x * exp((y * (log(z) - t)))
else
tmp = x * exp((a * (log((1.0d0 - z)) - b)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -2.1e-49) || !(y <= 2.5e-148)) {
tmp = x * Math.exp((y * (Math.log(z) - t)));
} else {
tmp = x * Math.exp((a * (Math.log((1.0 - z)) - b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -2.1e-49) or not (y <= 2.5e-148): tmp = x * math.exp((y * (math.log(z) - t))) else: tmp = x * math.exp((a * (math.log((1.0 - z)) - b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -2.1e-49) || !(y <= 2.5e-148)) tmp = Float64(x * exp(Float64(y * Float64(log(z) - t)))); else tmp = Float64(x * exp(Float64(a * Float64(log(Float64(1.0 - z)) - b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -2.1e-49) || ~((y <= 2.5e-148))) tmp = x * exp((y * (log(z) - t))); else tmp = x * exp((a * (log((1.0 - z)) - b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -2.1e-49], N[Not[LessEqual[y, 2.5e-148]], $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[Log[N[(1.0 - z), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.1 \cdot 10^{-49} \lor \neg \left(y \leq 2.5 \cdot 10^{-148}\right):\\
\;\;\;\;x \cdot e^{y \cdot \left(\log z - t\right)}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{a \cdot \left(\log \left(1 - z\right) - b\right)}\\
\end{array}
\end{array}
if y < -2.0999999999999999e-49 or 2.4999999999999999e-148 < y Initial program 96.6%
Taylor expanded in z around 0 96.6%
+-commutative96.6%
mul-1-neg96.6%
unsub-neg96.6%
Simplified96.6%
Taylor expanded in y around inf 83.4%
if -2.0999999999999999e-49 < y < 2.4999999999999999e-148Initial program 93.1%
Taylor expanded in y around 0 87.9%
Final simplification84.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -9.5e-50) (not (<= y 2.9e-148))) (* x (exp (* y (- (log z) t)))) (* x (exp (* a (- b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -9.5e-50) || !(y <= 2.9e-148)) {
tmp = x * exp((y * (log(z) - t)));
} 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 <= (-9.5d-50)) .or. (.not. (y <= 2.9d-148))) then
tmp = x * exp((y * (log(z) - t)))
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 <= -9.5e-50) || !(y <= 2.9e-148)) {
tmp = x * Math.exp((y * (Math.log(z) - t)));
} else {
tmp = x * Math.exp((a * -b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -9.5e-50) or not (y <= 2.9e-148): tmp = x * math.exp((y * (math.log(z) - t))) else: tmp = x * math.exp((a * -b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -9.5e-50) || !(y <= 2.9e-148)) tmp = Float64(x * exp(Float64(y * Float64(log(z) - t)))); 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 <= -9.5e-50) || ~((y <= 2.9e-148))) tmp = x * exp((y * (log(z) - t))); else tmp = x * exp((a * -b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -9.5e-50], N[Not[LessEqual[y, 2.9e-148]], $MachinePrecision]], N[(x * N[Exp[N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(x * N[Exp[N[(a * (-b)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.5 \cdot 10^{-50} \lor \neg \left(y \leq 2.9 \cdot 10^{-148}\right):\\
\;\;\;\;x \cdot e^{y \cdot \left(\log z - t\right)}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{a \cdot \left(-b\right)}\\
\end{array}
\end{array}
if y < -9.4999999999999993e-50 or 2.8999999999999998e-148 < y Initial program 96.6%
Taylor expanded in z around 0 96.6%
+-commutative96.6%
mul-1-neg96.6%
unsub-neg96.6%
Simplified96.6%
Taylor expanded in y around inf 83.4%
if -9.4999999999999993e-50 < y < 2.8999999999999998e-148Initial program 93.1%
Taylor expanded in z around 0 92.0%
+-commutative92.0%
mul-1-neg92.0%
unsub-neg92.0%
Simplified92.0%
Taylor expanded in y around 0 86.8%
associate-*r*86.8%
neg-mul-186.8%
Simplified86.8%
Final simplification84.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 95.4%
Taylor expanded in z around 0 95.0%
+-commutative95.0%
mul-1-neg95.0%
unsub-neg95.0%
Simplified95.0%
Final simplification95.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (exp (* a (- b))))) (t_2 (* x (exp (* y (- t))))))
(if (<= t -2050000.0)
t_2
(if (<= t 6.3e-298)
t_1
(if (<= t 2.6e+16) (* x (pow z y)) (if (<= t 1.26e+98) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * exp((a * -b));
double t_2 = x * exp((y * -t));
double tmp;
if (t <= -2050000.0) {
tmp = t_2;
} else if (t <= 6.3e-298) {
tmp = t_1;
} else if (t <= 2.6e+16) {
tmp = x * pow(z, y);
} else if (t <= 1.26e+98) {
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 * -b))
t_2 = x * exp((y * -t))
if (t <= (-2050000.0d0)) then
tmp = t_2
else if (t <= 6.3d-298) then
tmp = t_1
else if (t <= 2.6d+16) then
tmp = x * (z ** y)
else if (t <= 1.26d+98) 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 * -b));
double t_2 = x * Math.exp((y * -t));
double tmp;
if (t <= -2050000.0) {
tmp = t_2;
} else if (t <= 6.3e-298) {
tmp = t_1;
} else if (t <= 2.6e+16) {
tmp = x * Math.pow(z, y);
} else if (t <= 1.26e+98) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x * math.exp((a * -b)) t_2 = x * math.exp((y * -t)) tmp = 0 if t <= -2050000.0: tmp = t_2 elif t <= 6.3e-298: tmp = t_1 elif t <= 2.6e+16: tmp = x * math.pow(z, y) elif t <= 1.26e+98: 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(-b)))) t_2 = Float64(x * exp(Float64(y * Float64(-t)))) tmp = 0.0 if (t <= -2050000.0) tmp = t_2; elseif (t <= 6.3e-298) tmp = t_1; elseif (t <= 2.6e+16) tmp = Float64(x * (z ^ y)); elseif (t <= 1.26e+98) 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 * -b)); t_2 = x * exp((y * -t)); tmp = 0.0; if (t <= -2050000.0) tmp = t_2; elseif (t <= 6.3e-298) tmp = t_1; elseif (t <= 2.6e+16) tmp = x * (z ^ y); elseif (t <= 1.26e+98) 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 * (-b)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[Exp[N[(y * (-t)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2050000.0], t$95$2, If[LessEqual[t, 6.3e-298], t$95$1, If[LessEqual[t, 2.6e+16], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.26e+98], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot e^{a \cdot \left(-b\right)}\\
t_2 := x \cdot e^{y \cdot \left(-t\right)}\\
\mathbf{if}\;t \leq -2050000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 6.3 \cdot 10^{-298}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.6 \cdot 10^{+16}:\\
\;\;\;\;x \cdot {z}^{y}\\
\mathbf{elif}\;t \leq 1.26 \cdot 10^{+98}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -2.05e6 or 1.25999999999999999e98 < t Initial program 96.4%
Taylor expanded in z around 0 96.4%
+-commutative96.4%
mul-1-neg96.4%
unsub-neg96.4%
Simplified96.4%
Taylor expanded in t around inf 79.4%
mul-1-neg79.4%
distribute-rgt-neg-in79.4%
Simplified79.4%
if -2.05e6 < t < 6.2999999999999997e-298 or 2.6e16 < t < 1.25999999999999999e98Initial program 96.4%
Taylor expanded in z around 0 96.4%
+-commutative96.4%
mul-1-neg96.4%
unsub-neg96.4%
Simplified96.4%
Taylor expanded in y around 0 79.4%
associate-*r*79.4%
neg-mul-179.4%
Simplified79.4%
if 6.2999999999999997e-298 < t < 2.6e16Initial program 92.8%
Taylor expanded in z around 0 91.3%
+-commutative91.3%
mul-1-neg91.3%
unsub-neg91.3%
Simplified91.3%
Taylor expanded in y around inf 78.5%
Taylor expanded in t around 0 78.5%
Final simplification79.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -600000.0) (not (<= t 1e-59))) (* x (exp (* y (- t)))) (* x (pow z y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -600000.0) || !(t <= 1e-59)) {
tmp = x * exp((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 <= (-600000.0d0)) .or. (.not. (t <= 1d-59))) then
tmp = x * exp((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 <= -600000.0) || !(t <= 1e-59)) {
tmp = x * Math.exp((y * -t));
} else {
tmp = x * Math.pow(z, y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -600000.0) or not (t <= 1e-59): tmp = x * math.exp((y * -t)) else: tmp = x * math.pow(z, y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -600000.0) || !(t <= 1e-59)) tmp = Float64(x * exp(Float64(y * Float64(-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 <= -600000.0) || ~((t <= 1e-59))) tmp = x * exp((y * -t)); else tmp = x * (z ^ y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -600000.0], N[Not[LessEqual[t, 1e-59]], $MachinePrecision]], N[(x * N[Exp[N[(y * (-t)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -600000 \lor \neg \left(t \leq 10^{-59}\right):\\
\;\;\;\;x \cdot e^{y \cdot \left(-t\right)}\\
\mathbf{else}:\\
\;\;\;\;x \cdot {z}^{y}\\
\end{array}
\end{array}
if t < -6e5 or 1e-59 < t Initial program 95.9%
Taylor expanded in z around 0 95.9%
+-commutative95.9%
mul-1-neg95.9%
unsub-neg95.9%
Simplified95.9%
Taylor expanded in t around inf 78.5%
mul-1-neg78.5%
distribute-rgt-neg-in78.5%
Simplified78.5%
if -6e5 < t < 1e-59Initial program 94.8%
Taylor expanded in z around 0 93.9%
+-commutative93.9%
mul-1-neg93.9%
unsub-neg93.9%
Simplified93.9%
Taylor expanded in y around inf 63.6%
Taylor expanded in t around 0 63.6%
Final simplification72.0%
(FPCore (x y z t a b) :precision binary64 (if (<= t -1700000.0) (* a (- (/ x a) (* x z))) (* x (pow z y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1700000.0) {
tmp = a * ((x / a) - (x * z));
} 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 <= (-1700000.0d0)) then
tmp = a * ((x / a) - (x * z))
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 <= -1700000.0) {
tmp = a * ((x / a) - (x * z));
} else {
tmp = x * Math.pow(z, y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -1700000.0: tmp = a * ((x / a) - (x * z)) else: tmp = x * math.pow(z, y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -1700000.0) tmp = Float64(a * Float64(Float64(x / a) - Float64(x * z))); 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 <= -1700000.0) tmp = a * ((x / a) - (x * z)); else tmp = x * (z ^ y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -1700000.0], N[(a * N[(N[(x / a), $MachinePrecision] - N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1700000:\\
\;\;\;\;a \cdot \left(\frac{x}{a} - x \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot {z}^{y}\\
\end{array}
\end{array}
if t < -1.7e6Initial program 96.4%
Taylor expanded in z around 0 100.0%
associate-+r+100.0%
+-commutative100.0%
distribute-lft-out100.0%
mul-1-neg100.0%
unsub-neg100.0%
distribute-lft-out100.0%
Simplified100.0%
Taylor expanded in z around inf 21.7%
associate-*r*21.7%
neg-mul-121.7%
Simplified21.7%
Taylor expanded in a around 0 9.2%
associate-*r*9.2%
mul-1-neg9.2%
Simplified9.2%
Taylor expanded in a around inf 30.0%
+-commutative30.0%
mul-1-neg30.0%
unsub-neg30.0%
Simplified30.0%
if -1.7e6 < t Initial program 95.2%
Taylor expanded in z around 0 94.7%
+-commutative94.7%
mul-1-neg94.7%
unsub-neg94.7%
Simplified94.7%
Taylor expanded in y around inf 71.2%
Taylor expanded in t around 0 60.5%
Final simplification54.0%
(FPCore (x y z t a b) :precision binary64 (if (<= y -1.65e-277) (- x (* t (* x y))) (if (<= y 6.2e-12) (* a (- (/ x a) (* x z))) (* a (* x (- z))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.65e-277) {
tmp = x - (t * (x * y));
} else if (y <= 6.2e-12) {
tmp = a * ((x / a) - (x * z));
} else {
tmp = a * (x * -z);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-1.65d-277)) then
tmp = x - (t * (x * y))
else if (y <= 6.2d-12) then
tmp = a * ((x / a) - (x * z))
else
tmp = a * (x * -z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.65e-277) {
tmp = x - (t * (x * y));
} else if (y <= 6.2e-12) {
tmp = a * ((x / a) - (x * z));
} else {
tmp = a * (x * -z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -1.65e-277: tmp = x - (t * (x * y)) elif y <= 6.2e-12: tmp = a * ((x / a) - (x * z)) else: tmp = a * (x * -z) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -1.65e-277) tmp = Float64(x - Float64(t * Float64(x * y))); elseif (y <= 6.2e-12) tmp = Float64(a * Float64(Float64(x / a) - Float64(x * z))); else tmp = Float64(a * Float64(x * Float64(-z))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -1.65e-277) tmp = x - (t * (x * y)); elseif (y <= 6.2e-12) tmp = a * ((x / a) - (x * z)); else tmp = a * (x * -z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.65e-277], N[(x - N[(t * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.2e-12], N[(a * N[(N[(x / a), $MachinePrecision] - N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(x * (-z)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.65 \cdot 10^{-277}:\\
\;\;\;\;x - t \cdot \left(x \cdot y\right)\\
\mathbf{elif}\;y \leq 6.2 \cdot 10^{-12}:\\
\;\;\;\;a \cdot \left(\frac{x}{a} - x \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-z\right)\right)\\
\end{array}
\end{array}
if y < -1.64999999999999991e-277Initial program 100.0%
Taylor expanded in z around 0 100.0%
+-commutative100.0%
mul-1-neg100.0%
unsub-neg100.0%
Simplified100.0%
Taylor expanded in t around inf 64.0%
mul-1-neg64.0%
distribute-rgt-neg-in64.0%
Simplified64.0%
Taylor expanded in t around 0 31.3%
mul-1-neg31.3%
unsub-neg31.3%
*-commutative31.3%
Simplified31.3%
if -1.64999999999999991e-277 < y < 6.2000000000000002e-12Initial program 89.3%
Taylor expanded in z around 0 100.0%
associate-+r+100.0%
+-commutative100.0%
distribute-lft-out100.0%
mul-1-neg100.0%
unsub-neg100.0%
distribute-lft-out100.0%
Simplified100.0%
Taylor expanded in z around inf 56.7%
associate-*r*56.7%
neg-mul-156.7%
Simplified56.7%
Taylor expanded in a around 0 39.6%
associate-*r*39.6%
mul-1-neg39.6%
Simplified39.6%
Taylor expanded in a around inf 47.2%
+-commutative47.2%
mul-1-neg47.2%
unsub-neg47.2%
Simplified47.2%
if 6.2000000000000002e-12 < y Initial program 94.6%
Taylor expanded in z around 0 100.0%
associate-+r+100.0%
+-commutative100.0%
distribute-lft-out100.0%
mul-1-neg100.0%
unsub-neg100.0%
distribute-lft-out100.0%
Simplified100.0%
Taylor expanded in z around inf 23.2%
associate-*r*23.2%
neg-mul-123.2%
Simplified23.2%
Taylor expanded in a around 0 7.2%
associate-*r*7.2%
mul-1-neg7.2%
Simplified7.2%
Taylor expanded in a around inf 26.7%
associate-*r*26.7%
mul-1-neg26.7%
Simplified26.7%
Final simplification34.5%
(FPCore (x y z t a b) :precision binary64 (if (<= y -8.5e-252) (- x (* t (* x y))) (if (<= y 1.08e+59) (* z (- (/ x z) (* x a))) (* a (* x (- z))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -8.5e-252) {
tmp = x - (t * (x * y));
} else if (y <= 1.08e+59) {
tmp = z * ((x / z) - (x * a));
} else {
tmp = a * (x * -z);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-8.5d-252)) then
tmp = x - (t * (x * y))
else if (y <= 1.08d+59) then
tmp = z * ((x / z) - (x * a))
else
tmp = a * (x * -z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -8.5e-252) {
tmp = x - (t * (x * y));
} else if (y <= 1.08e+59) {
tmp = z * ((x / z) - (x * a));
} else {
tmp = a * (x * -z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -8.5e-252: tmp = x - (t * (x * y)) elif y <= 1.08e+59: tmp = z * ((x / z) - (x * a)) else: tmp = a * (x * -z) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -8.5e-252) tmp = Float64(x - Float64(t * Float64(x * y))); elseif (y <= 1.08e+59) tmp = Float64(z * Float64(Float64(x / z) - Float64(x * a))); else tmp = Float64(a * Float64(x * Float64(-z))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -8.5e-252) tmp = x - (t * (x * y)); elseif (y <= 1.08e+59) tmp = z * ((x / z) - (x * a)); else tmp = a * (x * -z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -8.5e-252], N[(x - N[(t * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.08e+59], N[(z * N[(N[(x / z), $MachinePrecision] - N[(x * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(x * (-z)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.5 \cdot 10^{-252}:\\
\;\;\;\;x - t \cdot \left(x \cdot y\right)\\
\mathbf{elif}\;y \leq 1.08 \cdot 10^{+59}:\\
\;\;\;\;z \cdot \left(\frac{x}{z} - x \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-z\right)\right)\\
\end{array}
\end{array}
if y < -8.50000000000000042e-252Initial program 100.0%
Taylor expanded in z around 0 100.0%
+-commutative100.0%
mul-1-neg100.0%
unsub-neg100.0%
Simplified100.0%
Taylor expanded in t around inf 64.4%
mul-1-neg64.4%
distribute-rgt-neg-in64.4%
Simplified64.4%
Taylor expanded in t around 0 30.5%
mul-1-neg30.5%
unsub-neg30.5%
*-commutative30.5%
Simplified30.5%
if -8.50000000000000042e-252 < y < 1.08e59Initial program 88.5%
Taylor expanded in z around 0 100.0%
associate-+r+100.0%
+-commutative100.0%
distribute-lft-out100.0%
mul-1-neg100.0%
unsub-neg100.0%
distribute-lft-out100.0%
Simplified100.0%
Taylor expanded in z around inf 53.4%
associate-*r*53.4%
neg-mul-153.4%
Simplified53.4%
Taylor expanded in a around 0 35.9%
associate-*r*35.9%
mul-1-neg35.9%
Simplified35.9%
Taylor expanded in z around inf 43.0%
+-commutative43.0%
mul-1-neg43.0%
unsub-neg43.0%
*-commutative43.0%
Simplified43.0%
if 1.08e59 < y Initial program 98.3%
Taylor expanded in z around 0 100.0%
associate-+r+100.0%
+-commutative100.0%
distribute-lft-out100.0%
mul-1-neg100.0%
unsub-neg100.0%
distribute-lft-out100.0%
Simplified100.0%
Taylor expanded in z around inf 18.7%
associate-*r*18.7%
neg-mul-118.7%
Simplified18.7%
Taylor expanded in a around 0 5.1%
associate-*r*5.1%
mul-1-neg5.1%
Simplified5.1%
Taylor expanded in a around inf 28.4%
associate-*r*28.4%
mul-1-neg28.4%
Simplified28.4%
Final simplification34.6%
(FPCore (x y z t a b) :precision binary64 (if (<= y -3.8e-39) (* t (* x (- y))) (if (<= y 4.8e-28) (* x (- 1.0 (* z a))) (* a (* x (- z))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -3.8e-39) {
tmp = t * (x * -y);
} else if (y <= 4.8e-28) {
tmp = x * (1.0 - (z * a));
} else {
tmp = a * (x * -z);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-3.8d-39)) then
tmp = t * (x * -y)
else if (y <= 4.8d-28) then
tmp = x * (1.0d0 - (z * a))
else
tmp = a * (x * -z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -3.8e-39) {
tmp = t * (x * -y);
} else if (y <= 4.8e-28) {
tmp = x * (1.0 - (z * a));
} else {
tmp = a * (x * -z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -3.8e-39: tmp = t * (x * -y) elif y <= 4.8e-28: tmp = x * (1.0 - (z * a)) else: tmp = a * (x * -z) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -3.8e-39) tmp = Float64(t * Float64(x * Float64(-y))); elseif (y <= 4.8e-28) tmp = Float64(x * Float64(1.0 - Float64(z * a))); else tmp = Float64(a * Float64(x * Float64(-z))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -3.8e-39) tmp = t * (x * -y); elseif (y <= 4.8e-28) tmp = x * (1.0 - (z * a)); else tmp = a * (x * -z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -3.8e-39], N[(t * N[(x * (-y)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.8e-28], N[(x * N[(1.0 - N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(x * (-z)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.8 \cdot 10^{-39}:\\
\;\;\;\;t \cdot \left(x \cdot \left(-y\right)\right)\\
\mathbf{elif}\;y \leq 4.8 \cdot 10^{-28}:\\
\;\;\;\;x \cdot \left(1 - z \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-z\right)\right)\\
\end{array}
\end{array}
if y < -3.8000000000000002e-39Initial program 100.0%
Taylor expanded in z around 0 100.0%
+-commutative100.0%
mul-1-neg100.0%
unsub-neg100.0%
Simplified100.0%
Taylor expanded in t around inf 68.9%
mul-1-neg68.9%
distribute-rgt-neg-in68.9%
Simplified68.9%
Taylor expanded in t around 0 27.7%
associate-*r*27.7%
neg-mul-127.7%
*-commutative27.7%
associate-*r*21.7%
distribute-rgt1-in21.7%
+-commutative21.7%
cancel-sign-sub-inv21.7%
Simplified21.7%
Taylor expanded in t around inf 29.1%
mul-1-neg29.1%
distribute-rgt-neg-out29.1%
distribute-rgt-neg-in29.1%
Simplified29.1%
if -3.8000000000000002e-39 < y < 4.8000000000000004e-28Initial program 94.4%
Taylor expanded in z around 0 100.0%
associate-+r+100.0%
+-commutative100.0%
distribute-lft-out100.0%
mul-1-neg100.0%
unsub-neg100.0%
distribute-lft-out100.0%
Simplified100.0%
Taylor expanded in z around inf 54.8%
associate-*r*54.8%
neg-mul-154.8%
Simplified54.8%
Taylor expanded in a around 0 38.1%
associate-*r*38.1%
mul-1-neg38.1%
Simplified38.1%
Taylor expanded in x around 0 38.1%
mul-1-neg38.1%
*-commutative38.1%
sub-neg38.1%
Simplified38.1%
if 4.8000000000000004e-28 < y Initial program 93.5%
Taylor expanded in z around 0 100.0%
associate-+r+100.0%
+-commutative100.0%
distribute-lft-out100.0%
mul-1-neg100.0%
unsub-neg100.0%
distribute-lft-out100.0%
Simplified100.0%
Taylor expanded in z around inf 24.5%
associate-*r*24.5%
neg-mul-124.5%
Simplified24.5%
Taylor expanded in a around 0 9.2%
associate-*r*9.2%
mul-1-neg9.2%
Simplified9.2%
Taylor expanded in a around inf 28.4%
associate-*r*28.4%
mul-1-neg28.4%
Simplified28.4%
Final simplification33.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -3.6e-39) (not (<= y 6e+168))) (* y (* x (- t))) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -3.6e-39) || !(y <= 6e+168)) {
tmp = y * (x * -t);
} 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 <= (-3.6d-39)) .or. (.not. (y <= 6d+168))) then
tmp = y * (x * -t)
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 <= -3.6e-39) || !(y <= 6e+168)) {
tmp = y * (x * -t);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -3.6e-39) or not (y <= 6e+168): tmp = y * (x * -t) else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -3.6e-39) || !(y <= 6e+168)) tmp = Float64(y * Float64(x * Float64(-t))); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -3.6e-39) || ~((y <= 6e+168))) tmp = y * (x * -t); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -3.6e-39], N[Not[LessEqual[y, 6e+168]], $MachinePrecision]], N[(y * N[(x * (-t)), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.6 \cdot 10^{-39} \lor \neg \left(y \leq 6 \cdot 10^{+168}\right):\\
\;\;\;\;y \cdot \left(x \cdot \left(-t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -3.6000000000000001e-39 or 5.9999999999999996e168 < y Initial program 98.9%
Taylor expanded in z around 0 98.9%
+-commutative98.9%
mul-1-neg98.9%
unsub-neg98.9%
Simplified98.9%
Taylor expanded in t around inf 64.8%
mul-1-neg64.8%
distribute-rgt-neg-in64.8%
Simplified64.8%
Taylor expanded in t around 0 22.2%
associate-*r*22.2%
neg-mul-122.2%
*-commutative22.2%
associate-*r*21.4%
distribute-rgt1-in21.4%
+-commutative21.4%
cancel-sign-sub-inv21.4%
Simplified21.4%
Taylor expanded in t around inf 23.2%
mul-1-neg23.2%
*-commutative23.2%
*-commutative23.2%
associate-*r*24.3%
Simplified24.3%
if -3.6000000000000001e-39 < y < 5.9999999999999996e168Initial program 93.5%
Taylor expanded in z around 0 92.9%
+-commutative92.9%
mul-1-neg92.9%
unsub-neg92.9%
Simplified92.9%
Taylor expanded in t around inf 58.9%
mul-1-neg58.9%
distribute-rgt-neg-in58.9%
Simplified58.9%
Taylor expanded in t around 0 27.2%
Final simplification26.2%
(FPCore (x y z t a b) :precision binary64 (if (<= y -2.5e-39) (* t (* x (- y))) (if (<= y 3.1e+168) x (* y (* x (- t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -2.5e-39) {
tmp = t * (x * -y);
} else if (y <= 3.1e+168) {
tmp = x;
} else {
tmp = y * (x * -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 <= (-2.5d-39)) then
tmp = t * (x * -y)
else if (y <= 3.1d+168) then
tmp = x
else
tmp = y * (x * -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 <= -2.5e-39) {
tmp = t * (x * -y);
} else if (y <= 3.1e+168) {
tmp = x;
} else {
tmp = y * (x * -t);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -2.5e-39: tmp = t * (x * -y) elif y <= 3.1e+168: tmp = x else: tmp = y * (x * -t) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -2.5e-39) tmp = Float64(t * Float64(x * Float64(-y))); elseif (y <= 3.1e+168) tmp = x; else tmp = Float64(y * Float64(x * Float64(-t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -2.5e-39) tmp = t * (x * -y); elseif (y <= 3.1e+168) tmp = x; else tmp = y * (x * -t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -2.5e-39], N[(t * N[(x * (-y)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.1e+168], x, N[(y * N[(x * (-t)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.5 \cdot 10^{-39}:\\
\;\;\;\;t \cdot \left(x \cdot \left(-y\right)\right)\\
\mathbf{elif}\;y \leq 3.1 \cdot 10^{+168}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(x \cdot \left(-t\right)\right)\\
\end{array}
\end{array}
if y < -2.4999999999999999e-39Initial program 100.0%
Taylor expanded in z around 0 100.0%
+-commutative100.0%
mul-1-neg100.0%
unsub-neg100.0%
Simplified100.0%
Taylor expanded in t around inf 68.9%
mul-1-neg68.9%
distribute-rgt-neg-in68.9%
Simplified68.9%
Taylor expanded in t around 0 27.7%
associate-*r*27.7%
neg-mul-127.7%
*-commutative27.7%
associate-*r*21.7%
distribute-rgt1-in21.7%
+-commutative21.7%
cancel-sign-sub-inv21.7%
Simplified21.7%
Taylor expanded in t around inf 29.1%
mul-1-neg29.1%
distribute-rgt-neg-out29.1%
distribute-rgt-neg-in29.1%
Simplified29.1%
if -2.4999999999999999e-39 < y < 3.09999999999999996e168Initial program 93.5%
Taylor expanded in z around 0 92.9%
+-commutative92.9%
mul-1-neg92.9%
unsub-neg92.9%
Simplified92.9%
Taylor expanded in t around inf 58.9%
mul-1-neg58.9%
distribute-rgt-neg-in58.9%
Simplified58.9%
Taylor expanded in t around 0 27.2%
if 3.09999999999999996e168 < y Initial program 96.9%
Taylor expanded in z around 0 96.9%
+-commutative96.9%
mul-1-neg96.9%
unsub-neg96.9%
Simplified96.9%
Taylor expanded in t around inf 57.3%
mul-1-neg57.3%
distribute-rgt-neg-in57.3%
Simplified57.3%
Taylor expanded in t around 0 12.1%
associate-*r*12.1%
neg-mul-112.1%
*-commutative12.1%
associate-*r*21.0%
distribute-rgt1-in21.0%
+-commutative21.0%
cancel-sign-sub-inv21.0%
Simplified21.0%
Taylor expanded in t around inf 12.3%
mul-1-neg12.3%
*-commutative12.3%
*-commutative12.3%
associate-*r*27.0%
Simplified27.0%
Final simplification27.6%
(FPCore (x y z t a b) :precision binary64 (if (<= y -3.8e-39) (* t (* x (- y))) (if (<= y 1.45e-24) x (* (* z a) (- x)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -3.8e-39) {
tmp = t * (x * -y);
} else if (y <= 1.45e-24) {
tmp = x;
} else {
tmp = (z * a) * -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 <= (-3.8d-39)) then
tmp = t * (x * -y)
else if (y <= 1.45d-24) then
tmp = x
else
tmp = (z * a) * -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 <= -3.8e-39) {
tmp = t * (x * -y);
} else if (y <= 1.45e-24) {
tmp = x;
} else {
tmp = (z * a) * -x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -3.8e-39: tmp = t * (x * -y) elif y <= 1.45e-24: tmp = x else: tmp = (z * a) * -x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -3.8e-39) tmp = Float64(t * Float64(x * Float64(-y))); elseif (y <= 1.45e-24) tmp = x; else tmp = Float64(Float64(z * a) * Float64(-x)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -3.8e-39) tmp = t * (x * -y); elseif (y <= 1.45e-24) tmp = x; else tmp = (z * a) * -x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -3.8e-39], N[(t * N[(x * (-y)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.45e-24], x, N[(N[(z * a), $MachinePrecision] * (-x)), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.8 \cdot 10^{-39}:\\
\;\;\;\;t \cdot \left(x \cdot \left(-y\right)\right)\\
\mathbf{elif}\;y \leq 1.45 \cdot 10^{-24}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\left(z \cdot a\right) \cdot \left(-x\right)\\
\end{array}
\end{array}
if y < -3.8000000000000002e-39Initial program 100.0%
Taylor expanded in z around 0 100.0%
+-commutative100.0%
mul-1-neg100.0%
unsub-neg100.0%
Simplified100.0%
Taylor expanded in t around inf 68.9%
mul-1-neg68.9%
distribute-rgt-neg-in68.9%
Simplified68.9%
Taylor expanded in t around 0 27.7%
associate-*r*27.7%
neg-mul-127.7%
*-commutative27.7%
associate-*r*21.7%
distribute-rgt1-in21.7%
+-commutative21.7%
cancel-sign-sub-inv21.7%
Simplified21.7%
Taylor expanded in t around inf 29.1%
mul-1-neg29.1%
distribute-rgt-neg-out29.1%
distribute-rgt-neg-in29.1%
Simplified29.1%
if -3.8000000000000002e-39 < y < 1.4499999999999999e-24Initial program 94.4%
Taylor expanded in z around 0 93.6%
+-commutative93.6%
mul-1-neg93.6%
unsub-neg93.6%
Simplified93.6%
Taylor expanded in t around inf 57.0%
mul-1-neg57.0%
distribute-rgt-neg-in57.0%
Simplified57.0%
Taylor expanded in t around 0 35.2%
if 1.4499999999999999e-24 < y Initial program 93.5%
Taylor expanded in z around 0 100.0%
associate-+r+100.0%
+-commutative100.0%
distribute-lft-out100.0%
mul-1-neg100.0%
unsub-neg100.0%
distribute-lft-out100.0%
Simplified100.0%
Taylor expanded in z around inf 24.5%
associate-*r*24.5%
neg-mul-124.5%
Simplified24.5%
Taylor expanded in a around 0 9.2%
associate-*r*9.2%
mul-1-neg9.2%
Simplified9.2%
Taylor expanded in a around inf 26.1%
associate-*r*26.1%
mul-1-neg26.1%
Simplified26.1%
Final simplification31.1%
(FPCore (x y z t a b) :precision binary64 (if (<= y -7.3e-40) (* t (* x (- y))) (if (<= y 2.05e-83) x (* a (* x (- z))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -7.3e-40) {
tmp = t * (x * -y);
} else if (y <= 2.05e-83) {
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 <= (-7.3d-40)) then
tmp = t * (x * -y)
else if (y <= 2.05d-83) 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 <= -7.3e-40) {
tmp = t * (x * -y);
} else if (y <= 2.05e-83) {
tmp = x;
} else {
tmp = a * (x * -z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -7.3e-40: tmp = t * (x * -y) elif y <= 2.05e-83: tmp = x else: tmp = a * (x * -z) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -7.3e-40) tmp = Float64(t * Float64(x * Float64(-y))); elseif (y <= 2.05e-83) 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 <= -7.3e-40) tmp = t * (x * -y); elseif (y <= 2.05e-83) tmp = x; else tmp = a * (x * -z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -7.3e-40], N[(t * N[(x * (-y)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.05e-83], x, N[(a * N[(x * (-z)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.3 \cdot 10^{-40}:\\
\;\;\;\;t \cdot \left(x \cdot \left(-y\right)\right)\\
\mathbf{elif}\;y \leq 2.05 \cdot 10^{-83}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-z\right)\right)\\
\end{array}
\end{array}
if y < -7.30000000000000005e-40Initial program 100.0%
Taylor expanded in z around 0 100.0%
+-commutative100.0%
mul-1-neg100.0%
unsub-neg100.0%
Simplified100.0%
Taylor expanded in t around inf 68.9%
mul-1-neg68.9%
distribute-rgt-neg-in68.9%
Simplified68.9%
Taylor expanded in t around 0 27.7%
associate-*r*27.7%
neg-mul-127.7%
*-commutative27.7%
associate-*r*21.7%
distribute-rgt1-in21.7%
+-commutative21.7%
cancel-sign-sub-inv21.7%
Simplified21.7%
Taylor expanded in t around inf 29.1%
mul-1-neg29.1%
distribute-rgt-neg-out29.1%
distribute-rgt-neg-in29.1%
Simplified29.1%
if -7.30000000000000005e-40 < y < 2.05e-83Initial program 94.3%
Taylor expanded in z around 0 93.3%
+-commutative93.3%
mul-1-neg93.3%
unsub-neg93.3%
Simplified93.3%
Taylor expanded in t around inf 57.0%
mul-1-neg57.0%
distribute-rgt-neg-in57.0%
Simplified57.0%
Taylor expanded in t around 0 37.9%
if 2.05e-83 < y Initial program 93.8%
Taylor expanded in z around 0 100.0%
associate-+r+100.0%
+-commutative100.0%
distribute-lft-out100.0%
mul-1-neg100.0%
unsub-neg100.0%
distribute-lft-out100.0%
Simplified100.0%
Taylor expanded in z around inf 26.6%
associate-*r*26.6%
neg-mul-126.6%
Simplified26.6%
Taylor expanded in a around 0 12.3%
associate-*r*12.3%
mul-1-neg12.3%
Simplified12.3%
Taylor expanded in a around inf 26.8%
associate-*r*26.8%
mul-1-neg26.8%
Simplified26.8%
Final simplification31.8%
(FPCore (x y z t a b) :precision binary64 (if (<= a -7.5e+112) (* z (* x (- a))) (* x (- 1.0 (* y t)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -7.5e+112) {
tmp = z * (x * -a);
} else {
tmp = x * (1.0 - (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 (a <= (-7.5d+112)) then
tmp = z * (x * -a)
else
tmp = x * (1.0d0 - (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 (a <= -7.5e+112) {
tmp = z * (x * -a);
} else {
tmp = x * (1.0 - (y * t));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -7.5e+112: tmp = z * (x * -a) else: tmp = x * (1.0 - (y * t)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -7.5e+112) tmp = Float64(z * Float64(x * Float64(-a))); else tmp = Float64(x * Float64(1.0 - Float64(y * t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -7.5e+112) tmp = z * (x * -a); else tmp = x * (1.0 - (y * t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -7.5e+112], N[(z * N[(x * (-a)), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 - N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -7.5 \cdot 10^{+112}:\\
\;\;\;\;z \cdot \left(x \cdot \left(-a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - y \cdot t\right)\\
\end{array}
\end{array}
if a < -7.5e112Initial program 87.4%
Taylor expanded in z around 0 100.0%
associate-+r+100.0%
+-commutative100.0%
distribute-lft-out100.0%
mul-1-neg100.0%
unsub-neg100.0%
distribute-lft-out100.0%
Simplified100.0%
Taylor expanded in z around inf 56.9%
associate-*r*56.9%
neg-mul-156.9%
Simplified56.9%
Taylor expanded in a around 0 35.1%
associate-*r*35.1%
mul-1-neg35.1%
Simplified35.1%
Taylor expanded in a around inf 43.1%
associate-*r*45.7%
associate-*r*45.7%
*-commutative45.7%
mul-1-neg45.7%
*-commutative45.7%
distribute-rgt-neg-in45.7%
Simplified45.7%
if -7.5e112 < a Initial program 96.9%
Taylor expanded in z around 0 96.4%
+-commutative96.4%
mul-1-neg96.4%
unsub-neg96.4%
Simplified96.4%
Taylor expanded in t around inf 65.6%
mul-1-neg65.6%
distribute-rgt-neg-in65.6%
Simplified65.6%
Taylor expanded in t around 0 28.4%
associate-*r*28.4%
neg-mul-128.4%
*-commutative28.4%
associate-*r*28.5%
distribute-rgt1-in28.5%
+-commutative28.5%
cancel-sign-sub-inv28.5%
Simplified28.5%
Final simplification31.1%
(FPCore (x y z t a b) :precision binary64 (if (<= x 1.95e-145) (* a (* x (- z))) (- x (* t (* x y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= 1.95e-145) {
tmp = a * (x * -z);
} 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 <= 1.95d-145) then
tmp = a * (x * -z)
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 <= 1.95e-145) {
tmp = a * (x * -z);
} else {
tmp = x - (t * (x * y));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= 1.95e-145: tmp = a * (x * -z) else: tmp = x - (t * (x * y)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= 1.95e-145) tmp = Float64(a * Float64(x * Float64(-z))); 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 <= 1.95e-145) tmp = a * (x * -z); else tmp = x - (t * (x * y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, 1.95e-145], N[(a * N[(x * (-z)), $MachinePrecision]), $MachinePrecision], N[(x - N[(t * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.95 \cdot 10^{-145}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x - t \cdot \left(x \cdot y\right)\\
\end{array}
\end{array}
if x < 1.95000000000000015e-145Initial program 96.3%
Taylor expanded in z around 0 100.0%
associate-+r+100.0%
+-commutative100.0%
distribute-lft-out100.0%
mul-1-neg100.0%
unsub-neg100.0%
distribute-lft-out100.0%
Simplified100.0%
Taylor expanded in z around inf 33.1%
associate-*r*33.1%
neg-mul-133.1%
Simplified33.1%
Taylor expanded in a around 0 17.5%
associate-*r*17.5%
mul-1-neg17.5%
Simplified17.5%
Taylor expanded in a around inf 23.5%
associate-*r*23.5%
mul-1-neg23.5%
Simplified23.5%
if 1.95000000000000015e-145 < x Initial program 93.9%
Taylor expanded in z around 0 93.9%
+-commutative93.9%
mul-1-neg93.9%
unsub-neg93.9%
Simplified93.9%
Taylor expanded in t around inf 62.2%
mul-1-neg62.2%
distribute-rgt-neg-in62.2%
Simplified62.2%
Taylor expanded in t around 0 36.5%
mul-1-neg36.5%
unsub-neg36.5%
*-commutative36.5%
Simplified36.5%
Final simplification28.3%
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
return x;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x;
}
def code(x, y, z, t, a, b): return x
function code(x, y, z, t, a, b) return x end
function tmp = code(x, y, z, t, a, b) tmp = x; end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 95.4%
Taylor expanded in z around 0 95.0%
+-commutative95.0%
mul-1-neg95.0%
unsub-neg95.0%
Simplified95.0%
Taylor expanded in t around inf 61.0%
mul-1-neg61.0%
distribute-rgt-neg-in61.0%
Simplified61.0%
Taylor expanded in t around 0 18.9%
Final simplification18.9%
herbie shell --seed 2024079
(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))))))