
(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 (fma a (- (log1p (- z)) b) (* y (- (log z) t))))))
double code(double x, double y, double z, double t, double a, double b) {
return x * exp(fma(a, (log1p(-z) - b), (y * (log(z) - t))));
}
function code(x, y, z, t, a, b) return Float64(x * exp(fma(a, Float64(log1p(Float64(-z)) - b), Float64(y * Float64(log(z) - t))))) end
code[x_, y_, z_, t_, a_, b_] := N[(x * N[Exp[N[(a * N[(N[Log[1 + (-z)], $MachinePrecision] - b), $MachinePrecision] + N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot e^{\mathsf{fma}\left(a, \mathsf{log1p}\left(-z\right) - b, y \cdot \left(\log z - t\right)\right)}
\end{array}
Initial program 96.5%
+-commutative96.5%
fma-def96.9%
sub-neg96.9%
log1p-def99.9%
Simplified99.9%
Final simplification99.9%
(FPCore (x y z t a b) :precision binary64 (* x (exp (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b))))))
double code(double x, double y, double z, double t, double a, double b) {
return x * exp(((y * (log(z) - t)) + (a * (log((1.0 - z)) - b))));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x * exp(((y * (log(z) - t)) + (a * (log((1.0d0 - z)) - b))))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x * Math.exp(((y * (Math.log(z) - t)) + (a * (Math.log((1.0 - z)) - b))));
}
def code(x, y, z, t, a, b): return x * math.exp(((y * (math.log(z) - t)) + (a * (math.log((1.0 - z)) - b))))
function code(x, y, z, t, a, b) return Float64(x * exp(Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(log(Float64(1.0 - z)) - b))))) end
function tmp = code(x, y, z, t, a, b) tmp = x * exp(((y * (log(z) - t)) + (a * (log((1.0 - z)) - b)))); end
code[x_, y_, z_, t_, a_, b_] := N[(x * N[Exp[N[(N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision] + N[(a * N[(N[Log[N[(1.0 - z), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)}
\end{array}
Initial program 96.5%
Final simplification96.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -5.1e-18) (not (<= y 6e-10))) (* x (exp (* y (- (log z) t)))) (* x (exp (* a (- (log1p (- z)) b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -5.1e-18) || !(y <= 6e-10)) {
tmp = x * exp((y * (log(z) - t)));
} else {
tmp = x * exp((a * (log1p(-z) - b)));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -5.1e-18) || !(y <= 6e-10)) {
tmp = x * Math.exp((y * (Math.log(z) - t)));
} else {
tmp = x * Math.exp((a * (Math.log1p(-z) - b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -5.1e-18) or not (y <= 6e-10): tmp = x * math.exp((y * (math.log(z) - t))) else: tmp = x * math.exp((a * (math.log1p(-z) - b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -5.1e-18) || !(y <= 6e-10)) tmp = Float64(x * exp(Float64(y * Float64(log(z) - t)))); else tmp = Float64(x * exp(Float64(a * Float64(log1p(Float64(-z)) - b)))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -5.1e-18], N[Not[LessEqual[y, 6e-10]], $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[1 + (-z)], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.1 \cdot 10^{-18} \lor \neg \left(y \leq 6 \cdot 10^{-10}\right):\\
\;\;\;\;x \cdot e^{y \cdot \left(\log z - t\right)}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{a \cdot \left(\mathsf{log1p}\left(-z\right) - b\right)}\\
\end{array}
\end{array}
if y < -5.09999999999999983e-18 or 6e-10 < y Initial program 99.2%
Taylor expanded in y around inf 89.5%
if -5.09999999999999983e-18 < y < 6e-10Initial program 93.7%
Taylor expanded in y around 0 84.5%
sub-neg84.5%
+-commutative84.5%
sub-neg84.5%
neg-mul-184.5%
log1p-def90.6%
neg-mul-190.6%
+-commutative90.6%
sub-neg90.6%
Simplified90.6%
Final simplification90.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (exp (* b (- a)))) (t_2 (* x (pow z y))))
(if (<= y -0.0021)
t_2
(if (<= y -9e-112)
(* x t_1)
(if (<= y -1.2e-162)
(* x (pow (exp (- t)) y))
(if (<= y 4.6e+27) (* x (+ (+ 1.0 t_1) -1.0)) t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = exp((b * -a));
double t_2 = x * pow(z, y);
double tmp;
if (y <= -0.0021) {
tmp = t_2;
} else if (y <= -9e-112) {
tmp = x * t_1;
} else if (y <= -1.2e-162) {
tmp = x * pow(exp(-t), y);
} else if (y <= 4.6e+27) {
tmp = x * ((1.0 + t_1) + -1.0);
} 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 = exp((b * -a))
t_2 = x * (z ** y)
if (y <= (-0.0021d0)) then
tmp = t_2
else if (y <= (-9d-112)) then
tmp = x * t_1
else if (y <= (-1.2d-162)) then
tmp = x * (exp(-t) ** y)
else if (y <= 4.6d+27) then
tmp = x * ((1.0d0 + t_1) + (-1.0d0))
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 = Math.exp((b * -a));
double t_2 = x * Math.pow(z, y);
double tmp;
if (y <= -0.0021) {
tmp = t_2;
} else if (y <= -9e-112) {
tmp = x * t_1;
} else if (y <= -1.2e-162) {
tmp = x * Math.pow(Math.exp(-t), y);
} else if (y <= 4.6e+27) {
tmp = x * ((1.0 + t_1) + -1.0);
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = math.exp((b * -a)) t_2 = x * math.pow(z, y) tmp = 0 if y <= -0.0021: tmp = t_2 elif y <= -9e-112: tmp = x * t_1 elif y <= -1.2e-162: tmp = x * math.pow(math.exp(-t), y) elif y <= 4.6e+27: tmp = x * ((1.0 + t_1) + -1.0) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = exp(Float64(b * Float64(-a))) t_2 = Float64(x * (z ^ y)) tmp = 0.0 if (y <= -0.0021) tmp = t_2; elseif (y <= -9e-112) tmp = Float64(x * t_1); elseif (y <= -1.2e-162) tmp = Float64(x * (exp(Float64(-t)) ^ y)); elseif (y <= 4.6e+27) tmp = Float64(x * Float64(Float64(1.0 + t_1) + -1.0)); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = exp((b * -a)); t_2 = x * (z ^ y); tmp = 0.0; if (y <= -0.0021) tmp = t_2; elseif (y <= -9e-112) tmp = x * t_1; elseif (y <= -1.2e-162) tmp = x * (exp(-t) ^ y); elseif (y <= 4.6e+27) tmp = x * ((1.0 + t_1) + -1.0); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[Exp[N[(b * (-a)), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -0.0021], t$95$2, If[LessEqual[y, -9e-112], N[(x * t$95$1), $MachinePrecision], If[LessEqual[y, -1.2e-162], N[(x * N[Power[N[Exp[(-t)], $MachinePrecision], y], $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.6e+27], N[(x * N[(N[(1.0 + t$95$1), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := e^{b \cdot \left(-a\right)}\\
t_2 := x \cdot {z}^{y}\\
\mathbf{if}\;y \leq -0.0021:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -9 \cdot 10^{-112}:\\
\;\;\;\;x \cdot t_1\\
\mathbf{elif}\;y \leq -1.2 \cdot 10^{-162}:\\
\;\;\;\;x \cdot {\left(e^{-t}\right)}^{y}\\
\mathbf{elif}\;y \leq 4.6 \cdot 10^{+27}:\\
\;\;\;\;x \cdot \left(\left(1 + t_1\right) + -1\right)\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -0.00209999999999999987 or 4.6000000000000001e27 < y Initial program 99.2%
Taylor expanded in y around inf 91.2%
Taylor expanded in t around 0 75.2%
if -0.00209999999999999987 < y < -9.00000000000000024e-112Initial program 94.8%
Taylor expanded in b around inf 84.0%
associate-*r*84.0%
neg-mul-184.0%
Simplified84.0%
if -9.00000000000000024e-112 < y < -1.2000000000000001e-162Initial program 75.7%
Taylor expanded in t around inf 51.5%
mul-1-neg51.5%
distribute-lft-neg-out51.5%
*-commutative51.5%
Simplified51.5%
Taylor expanded in y around inf 51.5%
associate-*r*51.5%
mul-1-neg51.5%
exp-prod83.7%
Simplified83.7%
if -1.2000000000000001e-162 < y < 4.6000000000000001e27Initial program 96.1%
+-commutative96.1%
sub-neg96.1%
log1p-udef99.9%
fma-udef99.9%
expm1-log1p-u99.9%
fma-udef99.9%
log1p-udef96.1%
sub-neg96.1%
+-commutative96.1%
fma-def96.1%
Applied egg-rr95.1%
expm1-udef95.1%
log1p-udef95.1%
add-exp-log95.1%
sub-neg95.1%
add-sqr-sqrt44.7%
sqrt-unprod77.9%
sqr-neg77.9%
sqrt-unprod43.7%
add-sqr-sqrt84.7%
Applied egg-rr84.7%
Taylor expanded in b around inf 84.4%
mul-1-neg84.4%
distribute-rgt-neg-in84.4%
Simplified84.4%
Final simplification79.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -4.5e-8) (not (<= a 3.4e+103))) (* x (pow (exp (- a)) b)) (* x (exp (* y (- (log z) t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -4.5e-8) || !(a <= 3.4e+103)) {
tmp = x * pow(exp(-a), b);
} else {
tmp = x * exp((y * (log(z) - 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 <= (-4.5d-8)) .or. (.not. (a <= 3.4d+103))) then
tmp = x * (exp(-a) ** b)
else
tmp = x * exp((y * (log(z) - 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 <= -4.5e-8) || !(a <= 3.4e+103)) {
tmp = x * Math.pow(Math.exp(-a), b);
} else {
tmp = x * Math.exp((y * (Math.log(z) - t)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -4.5e-8) or not (a <= 3.4e+103): tmp = x * math.pow(math.exp(-a), b) else: tmp = x * math.exp((y * (math.log(z) - t))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -4.5e-8) || !(a <= 3.4e+103)) tmp = Float64(x * (exp(Float64(-a)) ^ b)); else tmp = Float64(x * exp(Float64(y * Float64(log(z) - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a <= -4.5e-8) || ~((a <= 3.4e+103))) tmp = x * (exp(-a) ^ b); else tmp = x * exp((y * (log(z) - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -4.5e-8], N[Not[LessEqual[a, 3.4e+103]], $MachinePrecision]], N[(x * N[Power[N[Exp[(-a)], $MachinePrecision], b], $MachinePrecision]), $MachinePrecision], N[(x * N[Exp[N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.5 \cdot 10^{-8} \lor \neg \left(a \leq 3.4 \cdot 10^{+103}\right):\\
\;\;\;\;x \cdot {\left(e^{-a}\right)}^{b}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{y \cdot \left(\log z - t\right)}\\
\end{array}
\end{array}
if a < -4.49999999999999993e-8 or 3.3999999999999998e103 < a Initial program 93.4%
Taylor expanded in b around inf 70.5%
associate-*r*70.5%
neg-mul-170.5%
Simplified70.5%
Taylor expanded in x around 0 70.5%
associate-*r*70.5%
exp-prod79.8%
mul-1-neg79.8%
Simplified79.8%
if -4.49999999999999993e-8 < a < 3.3999999999999998e103Initial program 98.6%
Taylor expanded in y around inf 88.3%
Final simplification84.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -0.011) (not (<= y 1e+31))) (* x (pow z y)) (* x (+ (+ 1.0 (exp (* b (- a)))) -1.0))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -0.011) || !(y <= 1e+31)) {
tmp = x * pow(z, y);
} else {
tmp = x * ((1.0 + exp((b * -a))) + -1.0);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-0.011d0)) .or. (.not. (y <= 1d+31))) then
tmp = x * (z ** y)
else
tmp = x * ((1.0d0 + exp((b * -a))) + (-1.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -0.011) || !(y <= 1e+31)) {
tmp = x * Math.pow(z, y);
} else {
tmp = x * ((1.0 + Math.exp((b * -a))) + -1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -0.011) or not (y <= 1e+31): tmp = x * math.pow(z, y) else: tmp = x * ((1.0 + math.exp((b * -a))) + -1.0) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -0.011) || !(y <= 1e+31)) tmp = Float64(x * (z ^ y)); else tmp = Float64(x * Float64(Float64(1.0 + exp(Float64(b * Float64(-a)))) + -1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -0.011) || ~((y <= 1e+31))) tmp = x * (z ^ y); else tmp = x * ((1.0 + exp((b * -a))) + -1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -0.011], N[Not[LessEqual[y, 1e+31]], $MachinePrecision]], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(1.0 + N[Exp[N[(b * (-a)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -0.011 \lor \neg \left(y \leq 10^{+31}\right):\\
\;\;\;\;x \cdot {z}^{y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\left(1 + e^{b \cdot \left(-a\right)}\right) + -1\right)\\
\end{array}
\end{array}
if y < -0.010999999999999999 or 9.9999999999999996e30 < y Initial program 99.2%
Taylor expanded in y around inf 91.2%
Taylor expanded in t around 0 75.2%
if -0.010999999999999999 < y < 9.9999999999999996e30Initial program 94.1%
+-commutative94.1%
sub-neg94.1%
log1p-udef99.9%
fma-udef99.9%
expm1-log1p-u99.9%
fma-udef99.9%
log1p-udef94.1%
sub-neg94.1%
+-commutative94.1%
fma-def94.1%
Applied egg-rr92.5%
expm1-udef92.5%
log1p-udef92.5%
add-exp-log92.5%
sub-neg92.5%
add-sqr-sqrt48.1%
sqrt-unprod78.4%
sqr-neg78.4%
sqrt-unprod39.1%
add-sqr-sqrt80.0%
Applied egg-rr80.0%
Taylor expanded in b around inf 80.7%
mul-1-neg80.7%
distribute-rgt-neg-in80.7%
Simplified80.7%
Final simplification78.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -4.1e+37) (not (<= t 6.8e-89))) (* 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 <= -4.1e+37) || !(t <= 6.8e-89)) {
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 <= (-4.1d+37)) .or. (.not. (t <= 6.8d-89))) 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 <= -4.1e+37) || !(t <= 6.8e-89)) {
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 <= -4.1e+37) or not (t <= 6.8e-89): 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 <= -4.1e+37) || !(t <= 6.8e-89)) 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 <= -4.1e+37) || ~((t <= 6.8e-89))) 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, -4.1e+37], N[Not[LessEqual[t, 6.8e-89]], $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 -4.1 \cdot 10^{+37} \lor \neg \left(t \leq 6.8 \cdot 10^{-89}\right):\\
\;\;\;\;x \cdot e^{y \cdot \left(-t\right)}\\
\mathbf{else}:\\
\;\;\;\;x \cdot {z}^{y}\\
\end{array}
\end{array}
if t < -4.0999999999999998e37 or 6.8000000000000001e-89 < t Initial program 95.5%
Taylor expanded in t around inf 73.8%
mul-1-neg73.8%
distribute-lft-neg-out73.8%
*-commutative73.8%
Simplified73.8%
if -4.0999999999999998e37 < t < 6.8000000000000001e-89Initial program 97.7%
Taylor expanded in y around inf 70.4%
Taylor expanded in t around 0 70.4%
Final simplification72.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -0.011) (not (<= y 8.8e+27))) (* x (pow z y)) (* x (exp (* b (- a))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -0.011) || !(y <= 8.8e+27)) {
tmp = x * pow(z, y);
} else {
tmp = x * exp((b * -a));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-0.011d0)) .or. (.not. (y <= 8.8d+27))) then
tmp = x * (z ** y)
else
tmp = x * exp((b * -a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -0.011) || !(y <= 8.8e+27)) {
tmp = x * Math.pow(z, y);
} else {
tmp = x * Math.exp((b * -a));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -0.011) or not (y <= 8.8e+27): tmp = x * math.pow(z, y) else: tmp = x * math.exp((b * -a)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -0.011) || !(y <= 8.8e+27)) tmp = Float64(x * (z ^ y)); else tmp = Float64(x * exp(Float64(b * Float64(-a)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -0.011) || ~((y <= 8.8e+27))) tmp = x * (z ^ y); else tmp = x * exp((b * -a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -0.011], N[Not[LessEqual[y, 8.8e+27]], $MachinePrecision]], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision], N[(x * N[Exp[N[(b * (-a)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -0.011 \lor \neg \left(y \leq 8.8 \cdot 10^{+27}\right):\\
\;\;\;\;x \cdot {z}^{y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{b \cdot \left(-a\right)}\\
\end{array}
\end{array}
if y < -0.010999999999999999 or 8.7999999999999995e27 < y Initial program 99.2%
Taylor expanded in y around inf 91.2%
Taylor expanded in t around 0 75.2%
if -0.010999999999999999 < y < 8.7999999999999995e27Initial program 94.1%
Taylor expanded in b around inf 80.6%
associate-*r*80.6%
neg-mul-180.6%
Simplified80.6%
Final simplification78.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.55e-33) (not (<= y 4.8e-67))) (* x (pow z y)) (- x (* x (* a b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.55e-33) || !(y <= 4.8e-67)) {
tmp = x * pow(z, y);
} else {
tmp = x - (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 <= (-1.55d-33)) .or. (.not. (y <= 4.8d-67))) then
tmp = x * (z ** y)
else
tmp = x - (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 <= -1.55e-33) || !(y <= 4.8e-67)) {
tmp = x * Math.pow(z, y);
} else {
tmp = x - (x * (a * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1.55e-33) or not (y <= 4.8e-67): tmp = x * math.pow(z, y) else: tmp = x - (x * (a * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1.55e-33) || !(y <= 4.8e-67)) tmp = Float64(x * (z ^ y)); else tmp = Float64(x - Float64(x * Float64(a * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -1.55e-33) || ~((y <= 4.8e-67))) tmp = x * (z ^ y); else tmp = x - (x * (a * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1.55e-33], N[Not[LessEqual[y, 4.8e-67]], $MachinePrecision]], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision], N[(x - N[(x * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.55 \cdot 10^{-33} \lor \neg \left(y \leq 4.8 \cdot 10^{-67}\right):\\
\;\;\;\;x \cdot {z}^{y}\\
\mathbf{else}:\\
\;\;\;\;x - x \cdot \left(a \cdot b\right)\\
\end{array}
\end{array}
if y < -1.54999999999999998e-33 or 4.8e-67 < y Initial program 98.0%
Taylor expanded in y around inf 86.3%
Taylor expanded in t around 0 68.1%
if -1.54999999999999998e-33 < y < 4.8e-67Initial program 94.4%
Taylor expanded in b around inf 84.4%
associate-*r*84.4%
neg-mul-184.4%
Simplified84.4%
Taylor expanded in a around 0 50.3%
mul-1-neg50.3%
unsub-neg50.3%
associate-*r*53.9%
*-commutative53.9%
Simplified53.9%
Final simplification62.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -4.6e+73) (not (<= y 5800.0))) (* (* 0.5 (* t t)) (* x (* y y))) (- x (* x (* a b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -4.6e+73) || !(y <= 5800.0)) {
tmp = (0.5 * (t * t)) * (x * (y * y));
} else {
tmp = x - (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 <= (-4.6d+73)) .or. (.not. (y <= 5800.0d0))) then
tmp = (0.5d0 * (t * t)) * (x * (y * y))
else
tmp = x - (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 <= -4.6e+73) || !(y <= 5800.0)) {
tmp = (0.5 * (t * t)) * (x * (y * y));
} else {
tmp = x - (x * (a * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -4.6e+73) or not (y <= 5800.0): tmp = (0.5 * (t * t)) * (x * (y * y)) else: tmp = x - (x * (a * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -4.6e+73) || !(y <= 5800.0)) tmp = Float64(Float64(0.5 * Float64(t * t)) * Float64(x * Float64(y * y))); else tmp = Float64(x - Float64(x * Float64(a * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -4.6e+73) || ~((y <= 5800.0))) tmp = (0.5 * (t * t)) * (x * (y * y)); else tmp = x - (x * (a * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -4.6e+73], N[Not[LessEqual[y, 5800.0]], $MachinePrecision]], N[(N[(0.5 * N[(t * t), $MachinePrecision]), $MachinePrecision] * N[(x * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(x * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.6 \cdot 10^{+73} \lor \neg \left(y \leq 5800\right):\\
\;\;\;\;\left(0.5 \cdot \left(t \cdot t\right)\right) \cdot \left(x \cdot \left(y \cdot y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x - x \cdot \left(a \cdot b\right)\\
\end{array}
\end{array}
if y < -4.6e73 or 5800 < y Initial program 99.1%
Taylor expanded in t around inf 60.4%
mul-1-neg60.4%
distribute-lft-neg-out60.4%
*-commutative60.4%
Simplified60.4%
Taylor expanded in y around 0 28.6%
+-commutative28.6%
mul-1-neg28.6%
unsub-neg28.6%
*-commutative28.6%
unpow228.6%
unpow228.6%
unswap-sqr25.6%
*-commutative25.6%
Simplified25.6%
Taylor expanded in y around inf 33.1%
associate-*r*33.1%
unpow233.1%
unpow233.1%
Simplified33.1%
if -4.6e73 < y < 5800Initial program 94.5%
Taylor expanded in b around inf 78.1%
associate-*r*78.1%
neg-mul-178.1%
Simplified78.1%
Taylor expanded in a around 0 43.9%
mul-1-neg43.9%
unsub-neg43.9%
associate-*r*46.6%
*-commutative46.6%
Simplified46.6%
Final simplification40.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* 0.5 (* t t))))
(if (<= y -1.9e+36)
(* x (+ 1.0 (* t_1 (* y y))))
(if (<= y 5800.0) (- x (* x (* a b))) (* t_1 (* x (* y y)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 0.5 * (t * t);
double tmp;
if (y <= -1.9e+36) {
tmp = x * (1.0 + (t_1 * (y * y)));
} else if (y <= 5800.0) {
tmp = x - (x * (a * b));
} else {
tmp = t_1 * (x * (y * 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) :: t_1
real(8) :: tmp
t_1 = 0.5d0 * (t * t)
if (y <= (-1.9d+36)) then
tmp = x * (1.0d0 + (t_1 * (y * y)))
else if (y <= 5800.0d0) then
tmp = x - (x * (a * b))
else
tmp = t_1 * (x * (y * y))
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 = 0.5 * (t * t);
double tmp;
if (y <= -1.9e+36) {
tmp = x * (1.0 + (t_1 * (y * y)));
} else if (y <= 5800.0) {
tmp = x - (x * (a * b));
} else {
tmp = t_1 * (x * (y * y));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = 0.5 * (t * t) tmp = 0 if y <= -1.9e+36: tmp = x * (1.0 + (t_1 * (y * y))) elif y <= 5800.0: tmp = x - (x * (a * b)) else: tmp = t_1 * (x * (y * y)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(0.5 * Float64(t * t)) tmp = 0.0 if (y <= -1.9e+36) tmp = Float64(x * Float64(1.0 + Float64(t_1 * Float64(y * y)))); elseif (y <= 5800.0) tmp = Float64(x - Float64(x * Float64(a * b))); else tmp = Float64(t_1 * Float64(x * Float64(y * y))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = 0.5 * (t * t); tmp = 0.0; if (y <= -1.9e+36) tmp = x * (1.0 + (t_1 * (y * y))); elseif (y <= 5800.0) tmp = x - (x * (a * b)); else tmp = t_1 * (x * (y * y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(0.5 * N[(t * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.9e+36], N[(x * N[(1.0 + N[(t$95$1 * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5800.0], N[(x - N[(x * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[(x * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 0.5 \cdot \left(t \cdot t\right)\\
\mathbf{if}\;y \leq -1.9 \cdot 10^{+36}:\\
\;\;\;\;x \cdot \left(1 + t_1 \cdot \left(y \cdot y\right)\right)\\
\mathbf{elif}\;y \leq 5800:\\
\;\;\;\;x - x \cdot \left(a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot \left(x \cdot \left(y \cdot y\right)\right)\\
\end{array}
\end{array}
if y < -1.90000000000000012e36Initial program 100.0%
Taylor expanded in t around inf 56.9%
mul-1-neg56.9%
distribute-lft-neg-out56.9%
*-commutative56.9%
Simplified56.9%
Taylor expanded in y around 0 41.2%
+-commutative41.2%
mul-1-neg41.2%
unsub-neg41.2%
*-commutative41.2%
unpow241.2%
unpow241.2%
unswap-sqr36.3%
*-commutative36.3%
Simplified36.3%
Taylor expanded in y around inf 41.4%
associate-*r*41.4%
unpow241.4%
unpow241.4%
Simplified41.4%
if -1.90000000000000012e36 < y < 5800Initial program 94.2%
Taylor expanded in b around inf 79.8%
associate-*r*79.8%
neg-mul-179.8%
Simplified79.8%
Taylor expanded in a around 0 46.0%
mul-1-neg46.0%
unsub-neg46.0%
associate-*r*48.8%
*-commutative48.8%
Simplified48.8%
if 5800 < y Initial program 98.5%
Taylor expanded in t around inf 60.0%
mul-1-neg60.0%
distribute-lft-neg-out60.0%
*-commutative60.0%
Simplified60.0%
Taylor expanded in y around 0 16.3%
+-commutative16.3%
mul-1-neg16.3%
unsub-neg16.3%
*-commutative16.3%
unpow216.3%
unpow216.3%
unswap-sqr15.1%
*-commutative15.1%
Simplified15.1%
Taylor expanded in y around inf 25.1%
associate-*r*25.1%
unpow225.1%
unpow225.1%
Simplified25.1%
Final simplification41.0%
(FPCore (x y z t a b) :precision binary64 (if (<= a -6.2e-12) (* x (* y (- t))) (if (<= a 3.7e+147) (* x (- 1.0 (* y t))) (* y (* x (- t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -6.2e-12) {
tmp = x * (y * -t);
} else if (a <= 3.7e+147) {
tmp = x * (1.0 - (y * t));
} 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 (a <= (-6.2d-12)) then
tmp = x * (y * -t)
else if (a <= 3.7d+147) then
tmp = x * (1.0d0 - (y * t))
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 (a <= -6.2e-12) {
tmp = x * (y * -t);
} else if (a <= 3.7e+147) {
tmp = x * (1.0 - (y * t));
} else {
tmp = y * (x * -t);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -6.2e-12: tmp = x * (y * -t) elif a <= 3.7e+147: tmp = x * (1.0 - (y * t)) else: tmp = y * (x * -t) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -6.2e-12) tmp = Float64(x * Float64(y * Float64(-t))); elseif (a <= 3.7e+147) tmp = Float64(x * Float64(1.0 - Float64(y * t))); 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 (a <= -6.2e-12) tmp = x * (y * -t); elseif (a <= 3.7e+147) tmp = x * (1.0 - (y * t)); else tmp = y * (x * -t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -6.2e-12], N[(x * N[(y * (-t)), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.7e+147], N[(x * N[(1.0 - N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(x * (-t)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -6.2 \cdot 10^{-12}:\\
\;\;\;\;x \cdot \left(y \cdot \left(-t\right)\right)\\
\mathbf{elif}\;a \leq 3.7 \cdot 10^{+147}:\\
\;\;\;\;x \cdot \left(1 - y \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(x \cdot \left(-t\right)\right)\\
\end{array}
\end{array}
if a < -6.2000000000000002e-12Initial program 94.1%
Taylor expanded in t around inf 36.0%
mul-1-neg36.0%
distribute-lft-neg-out36.0%
*-commutative36.0%
Simplified36.0%
Taylor expanded in y around 0 16.4%
mul-1-neg16.4%
unsub-neg16.4%
*-commutative16.4%
Simplified16.4%
Taylor expanded in y around inf 28.0%
mul-1-neg28.0%
*-commutative28.0%
Simplified28.0%
if -6.2000000000000002e-12 < a < 3.7e147Initial program 98.1%
Taylor expanded in t around inf 69.3%
mul-1-neg69.3%
distribute-lft-neg-out69.3%
*-commutative69.3%
Simplified69.3%
Taylor expanded in y around 0 36.0%
mul-1-neg36.0%
unsub-neg36.0%
*-commutative36.0%
Simplified36.0%
if 3.7e147 < a Initial program 93.6%
Taylor expanded in t around inf 28.9%
mul-1-neg28.9%
distribute-lft-neg-out28.9%
*-commutative28.9%
Simplified28.9%
Taylor expanded in y around 0 9.4%
mul-1-neg9.4%
unsub-neg9.4%
*-commutative9.4%
Simplified9.4%
Taylor expanded in y around inf 15.7%
associate-*r*15.7%
neg-mul-115.7%
associate-*r*28.3%
*-commutative28.3%
*-commutative28.3%
Simplified28.3%
Final simplification33.1%
(FPCore (x y z t a b) :precision binary64 (if (<= a -1.9e-88) (* x (* y (- t))) (if (<= a 1.46e+150) x (* y (* x (- t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -1.9e-88) {
tmp = x * (y * -t);
} else if (a <= 1.46e+150) {
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 (a <= (-1.9d-88)) then
tmp = x * (y * -t)
else if (a <= 1.46d+150) 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 (a <= -1.9e-88) {
tmp = x * (y * -t);
} else if (a <= 1.46e+150) {
tmp = x;
} else {
tmp = y * (x * -t);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -1.9e-88: tmp = x * (y * -t) elif a <= 1.46e+150: tmp = x else: tmp = y * (x * -t) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -1.9e-88) tmp = Float64(x * Float64(y * Float64(-t))); elseif (a <= 1.46e+150) 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 (a <= -1.9e-88) tmp = x * (y * -t); elseif (a <= 1.46e+150) tmp = x; else tmp = y * (x * -t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -1.9e-88], N[(x * N[(y * (-t)), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.46e+150], x, N[(y * N[(x * (-t)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.9 \cdot 10^{-88}:\\
\;\;\;\;x \cdot \left(y \cdot \left(-t\right)\right)\\
\mathbf{elif}\;a \leq 1.46 \cdot 10^{+150}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(x \cdot \left(-t\right)\right)\\
\end{array}
\end{array}
if a < -1.90000000000000006e-88Initial program 95.3%
Taylor expanded in t around inf 42.1%
mul-1-neg42.1%
distribute-lft-neg-out42.1%
*-commutative42.1%
Simplified42.1%
Taylor expanded in y around 0 19.5%
mul-1-neg19.5%
unsub-neg19.5%
*-commutative19.5%
Simplified19.5%
Taylor expanded in y around inf 28.7%
mul-1-neg28.7%
*-commutative28.7%
Simplified28.7%
if -1.90000000000000006e-88 < a < 1.4599999999999999e150Initial program 97.9%
Taylor expanded in t around inf 69.8%
mul-1-neg69.8%
distribute-lft-neg-out69.8%
*-commutative69.8%
Simplified69.8%
Taylor expanded in y around 0 37.3%
+-commutative37.3%
mul-1-neg37.3%
unsub-neg37.3%
*-commutative37.3%
unpow237.3%
unpow237.3%
unswap-sqr39.8%
*-commutative39.8%
Simplified39.8%
Taylor expanded in y around 0 32.3%
if 1.4599999999999999e150 < a Initial program 93.6%
Taylor expanded in t around inf 28.9%
mul-1-neg28.9%
distribute-lft-neg-out28.9%
*-commutative28.9%
Simplified28.9%
Taylor expanded in y around 0 9.4%
mul-1-neg9.4%
unsub-neg9.4%
*-commutative9.4%
Simplified9.4%
Taylor expanded in y around inf 15.7%
associate-*r*15.7%
neg-mul-115.7%
associate-*r*28.3%
*-commutative28.3%
*-commutative28.3%
Simplified28.3%
Final simplification30.7%
(FPCore (x y z t a b) :precision binary64 (if (<= t 51000000000.0) (- x (* x (* a b))) (* x (- 1.0 (* y t)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= 51000000000.0) {
tmp = x - (x * (a * b));
} 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 (t <= 51000000000.0d0) then
tmp = x - (x * (a * b))
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 (t <= 51000000000.0) {
tmp = x - (x * (a * b));
} else {
tmp = x * (1.0 - (y * t));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= 51000000000.0: tmp = x - (x * (a * b)) else: tmp = x * (1.0 - (y * t)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= 51000000000.0) tmp = Float64(x - Float64(x * Float64(a * b))); 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 (t <= 51000000000.0) tmp = x - (x * (a * b)); else tmp = x * (1.0 - (y * t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, 51000000000.0], N[(x - N[(x * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 - N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 51000000000:\\
\;\;\;\;x - x \cdot \left(a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - y \cdot t\right)\\
\end{array}
\end{array}
if t < 5.1e10Initial program 96.4%
Taylor expanded in b around inf 59.4%
associate-*r*59.4%
neg-mul-159.4%
Simplified59.4%
Taylor expanded in a around 0 33.0%
mul-1-neg33.0%
unsub-neg33.0%
associate-*r*35.6%
*-commutative35.6%
Simplified35.6%
if 5.1e10 < t Initial program 96.9%
Taylor expanded in t around inf 75.3%
mul-1-neg75.3%
distribute-lft-neg-out75.3%
*-commutative75.3%
Simplified75.3%
Taylor expanded in y around 0 30.1%
mul-1-neg30.1%
unsub-neg30.1%
*-commutative30.1%
Simplified30.1%
Final simplification34.1%
(FPCore (x y z t a b) :precision binary64 (if (<= a -3.4e-88) (* x (* y (- t))) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -3.4e-88) {
tmp = x * (y * -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 (a <= (-3.4d-88)) then
tmp = x * (y * -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 (a <= -3.4e-88) {
tmp = x * (y * -t);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -3.4e-88: tmp = x * (y * -t) else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -3.4e-88) tmp = Float64(x * Float64(y * Float64(-t))); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -3.4e-88) tmp = x * (y * -t); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -3.4e-88], N[(x * N[(y * (-t)), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.4 \cdot 10^{-88}:\\
\;\;\;\;x \cdot \left(y \cdot \left(-t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -3.39999999999999975e-88Initial program 95.3%
Taylor expanded in t around inf 42.1%
mul-1-neg42.1%
distribute-lft-neg-out42.1%
*-commutative42.1%
Simplified42.1%
Taylor expanded in y around 0 19.5%
mul-1-neg19.5%
unsub-neg19.5%
*-commutative19.5%
Simplified19.5%
Taylor expanded in y around inf 28.7%
mul-1-neg28.7%
*-commutative28.7%
Simplified28.7%
if -3.39999999999999975e-88 < a Initial program 97.1%
Taylor expanded in t around inf 62.7%
mul-1-neg62.7%
distribute-lft-neg-out62.7%
*-commutative62.7%
Simplified62.7%
Taylor expanded in y around 0 34.6%
+-commutative34.6%
mul-1-neg34.6%
unsub-neg34.6%
*-commutative34.6%
unpow234.6%
unpow234.6%
unswap-sqr35.7%
*-commutative35.7%
Simplified35.7%
Taylor expanded in y around 0 27.4%
Final simplification27.8%
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
return x;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x;
}
def code(x, y, z, t, a, b): return x
function code(x, y, z, t, a, b) return x end
function tmp = code(x, y, z, t, a, b) tmp = x; end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 96.5%
Taylor expanded in t around inf 56.1%
mul-1-neg56.1%
distribute-lft-neg-out56.1%
*-commutative56.1%
Simplified56.1%
Taylor expanded in y around 0 31.2%
+-commutative31.2%
mul-1-neg31.2%
unsub-neg31.2%
*-commutative31.2%
unpow231.2%
unpow231.2%
unswap-sqr32.1%
*-commutative32.1%
Simplified32.1%
Taylor expanded in y around 0 20.9%
Final simplification20.9%
herbie shell --seed 2023275
(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))))))