
(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 19 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (* x (exp (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b))))))
double code(double x, double y, double z, double t, double a, double b) {
return x * exp(((y * (log(z) - t)) + (a * (log((1.0 - z)) - b))));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x * exp(((y * (log(z) - t)) + (a * (log((1.0d0 - z)) - b))))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x * Math.exp(((y * (Math.log(z) - t)) + (a * (Math.log((1.0 - z)) - b))));
}
def code(x, y, z, t, a, b): return x * math.exp(((y * (math.log(z) - t)) + (a * (math.log((1.0 - z)) - b))))
function code(x, y, z, t, a, b) return Float64(x * exp(Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(log(Float64(1.0 - z)) - b))))) end
function tmp = code(x, y, z, t, a, b) tmp = x * exp(((y * (log(z) - t)) + (a * (log((1.0 - z)) - b)))); end
code[x_, y_, z_, t_, a_, b_] := N[(x * N[Exp[N[(N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision] + N[(a * N[(N[Log[N[(1.0 - z), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)}
\end{array}
(FPCore (x y z t a b) :precision binary64 (* x (exp (fma y (- (log z) t) (* a (- (log1p (- z)) b))))))
double code(double x, double y, double z, double t, double a, double b) {
return x * exp(fma(y, (log(z) - t), (a * (log1p(-z) - b))));
}
function code(x, y, z, t, a, b) return Float64(x * exp(fma(y, Float64(log(z) - t), Float64(a * Float64(log1p(Float64(-z)) - b))))) end
code[x_, y_, z_, t_, a_, b_] := N[(x * N[Exp[N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision] + N[(a * N[(N[Log[1 + (-z)], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot e^{\mathsf{fma}\left(y, \log z - t, a \cdot \left(\mathsf{log1p}\left(-z\right) - b\right)\right)}
\end{array}
Initial program 95.7%
fma-define95.7%
sub-neg95.7%
log1p-define99.2%
Simplified99.2%
Final simplification99.2%
(FPCore (x y z t a b) :precision binary64 (* x (exp (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b))))))
double code(double x, double y, double z, double t, double a, double b) {
return x * exp(((y * (log(z) - t)) + (a * (log((1.0 - z)) - b))));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x * exp(((y * (log(z) - t)) + (a * (log((1.0d0 - z)) - b))))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x * Math.exp(((y * (Math.log(z) - t)) + (a * (Math.log((1.0 - z)) - b))));
}
def code(x, y, z, t, a, b): return x * math.exp(((y * (math.log(z) - t)) + (a * (math.log((1.0 - z)) - b))))
function code(x, y, z, t, a, b) return Float64(x * exp(Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(log(Float64(1.0 - z)) - b))))) end
function tmp = code(x, y, z, t, a, b) tmp = x * exp(((y * (log(z) - t)) + (a * (log((1.0 - z)) - b)))); end
code[x_, y_, z_, t_, a_, b_] := N[(x * N[Exp[N[(N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision] + N[(a * N[(N[Log[N[(1.0 - z), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)}
\end{array}
Initial program 95.7%
Final simplification95.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.45e-41) (not (<= y 8.4e-19))) (* x (exp (* y (- (log z) t)))) (* x (exp (* (- a) (+ z b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.45e-41) || !(y <= 8.4e-19)) {
tmp = x * exp((y * (log(z) - t)));
} else {
tmp = x * exp((-a * (z + b)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-1.45d-41)) .or. (.not. (y <= 8.4d-19))) then
tmp = x * exp((y * (log(z) - t)))
else
tmp = x * exp((-a * (z + b)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.45e-41) || !(y <= 8.4e-19)) {
tmp = x * Math.exp((y * (Math.log(z) - t)));
} else {
tmp = x * Math.exp((-a * (z + b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1.45e-41) or not (y <= 8.4e-19): tmp = x * math.exp((y * (math.log(z) - t))) else: tmp = x * math.exp((-a * (z + b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1.45e-41) || !(y <= 8.4e-19)) tmp = Float64(x * exp(Float64(y * Float64(log(z) - t)))); else tmp = Float64(x * exp(Float64(Float64(-a) * Float64(z + b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -1.45e-41) || ~((y <= 8.4e-19))) tmp = x * exp((y * (log(z) - t))); else tmp = x * exp((-a * (z + b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1.45e-41], N[Not[LessEqual[y, 8.4e-19]], $MachinePrecision]], N[(x * N[Exp[N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(x * N[Exp[N[((-a) * N[(z + b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.45 \cdot 10^{-41} \lor \neg \left(y \leq 8.4 \cdot 10^{-19}\right):\\
\;\;\;\;x \cdot e^{y \cdot \left(\log z - t\right)}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{\left(-a\right) \cdot \left(z + b\right)}\\
\end{array}
\end{array}
if y < -1.44999999999999989e-41 or 8.3999999999999996e-19 < y Initial program 97.4%
Taylor expanded in y around inf 87.3%
if -1.44999999999999989e-41 < y < 8.3999999999999996e-19Initial program 93.3%
Taylor expanded in y around 0 83.1%
sub-neg83.1%
log1p-define90.8%
Simplified90.8%
Taylor expanded in z around 0 90.8%
associate-*r*90.8%
associate-*r*90.8%
distribute-lft-out90.8%
mul-1-neg90.8%
Simplified90.8%
Final simplification88.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (exp (* (- a) (+ z b))))) (t_2 (* x (exp (* y (- t))))))
(if (<= t -2.45e+114)
t_2
(if (<= t -1.1e-285)
t_1
(if (<= t 2.9e-190) (* x (pow z y)) (if (<= t 5.8e+35) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * exp((-a * (z + b)));
double t_2 = x * exp((y * -t));
double tmp;
if (t <= -2.45e+114) {
tmp = t_2;
} else if (t <= -1.1e-285) {
tmp = t_1;
} else if (t <= 2.9e-190) {
tmp = x * pow(z, y);
} else if (t <= 5.8e+35) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x * exp((-a * (z + b)))
t_2 = x * exp((y * -t))
if (t <= (-2.45d+114)) then
tmp = t_2
else if (t <= (-1.1d-285)) then
tmp = t_1
else if (t <= 2.9d-190) then
tmp = x * (z ** y)
else if (t <= 5.8d+35) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * Math.exp((-a * (z + b)));
double t_2 = x * Math.exp((y * -t));
double tmp;
if (t <= -2.45e+114) {
tmp = t_2;
} else if (t <= -1.1e-285) {
tmp = t_1;
} else if (t <= 2.9e-190) {
tmp = x * Math.pow(z, y);
} else if (t <= 5.8e+35) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x * math.exp((-a * (z + b))) t_2 = x * math.exp((y * -t)) tmp = 0 if t <= -2.45e+114: tmp = t_2 elif t <= -1.1e-285: tmp = t_1 elif t <= 2.9e-190: tmp = x * math.pow(z, y) elif t <= 5.8e+35: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x * exp(Float64(Float64(-a) * Float64(z + b)))) t_2 = Float64(x * exp(Float64(y * Float64(-t)))) tmp = 0.0 if (t <= -2.45e+114) tmp = t_2; elseif (t <= -1.1e-285) tmp = t_1; elseif (t <= 2.9e-190) tmp = Float64(x * (z ^ y)); elseif (t <= 5.8e+35) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x * exp((-a * (z + b))); t_2 = x * exp((y * -t)); tmp = 0.0; if (t <= -2.45e+114) tmp = t_2; elseif (t <= -1.1e-285) tmp = t_1; elseif (t <= 2.9e-190) tmp = x * (z ^ y); elseif (t <= 5.8e+35) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[Exp[N[((-a) * N[(z + b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[Exp[N[(y * (-t)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.45e+114], t$95$2, If[LessEqual[t, -1.1e-285], t$95$1, If[LessEqual[t, 2.9e-190], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.8e+35], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot e^{\left(-a\right) \cdot \left(z + b\right)}\\
t_2 := x \cdot e^{y \cdot \left(-t\right)}\\
\mathbf{if}\;t \leq -2.45 \cdot 10^{+114}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -1.1 \cdot 10^{-285}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.9 \cdot 10^{-190}:\\
\;\;\;\;x \cdot {z}^{y}\\
\mathbf{elif}\;t \leq 5.8 \cdot 10^{+35}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -2.45e114 or 5.79999999999999989e35 < t Initial program 95.5%
Taylor expanded in t around inf 83.0%
mul-1-neg83.0%
distribute-lft-neg-out83.0%
*-commutative83.0%
Simplified83.0%
if -2.45e114 < t < -1.1e-285 or 2.9000000000000002e-190 < t < 5.79999999999999989e35Initial program 95.6%
Taylor expanded in y around 0 73.8%
sub-neg73.8%
log1p-define79.8%
Simplified79.8%
Taylor expanded in z around 0 79.8%
associate-*r*79.8%
associate-*r*79.8%
distribute-lft-out79.8%
mul-1-neg79.8%
Simplified79.8%
if -1.1e-285 < t < 2.9000000000000002e-190Initial program 96.8%
Taylor expanded in y around inf 82.0%
Taylor expanded in t around 0 82.0%
*-commutative82.0%
Simplified82.0%
Final simplification81.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (exp (* y (- t))))))
(if (<= t -1.95e+116)
t_1
(if (<= t -1.5e-285)
(* x (exp (* a (- b))))
(if (<= t 5.5e-89) (* x (pow z y)) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * exp((y * -t));
double tmp;
if (t <= -1.95e+116) {
tmp = t_1;
} else if (t <= -1.5e-285) {
tmp = x * exp((a * -b));
} else if (t <= 5.5e-89) {
tmp = x * pow(z, y);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x * exp((y * -t))
if (t <= (-1.95d+116)) then
tmp = t_1
else if (t <= (-1.5d-285)) then
tmp = x * exp((a * -b))
else if (t <= 5.5d-89) then
tmp = x * (z ** y)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * Math.exp((y * -t));
double tmp;
if (t <= -1.95e+116) {
tmp = t_1;
} else if (t <= -1.5e-285) {
tmp = x * Math.exp((a * -b));
} else if (t <= 5.5e-89) {
tmp = x * Math.pow(z, y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x * math.exp((y * -t)) tmp = 0 if t <= -1.95e+116: tmp = t_1 elif t <= -1.5e-285: tmp = x * math.exp((a * -b)) elif t <= 5.5e-89: tmp = x * math.pow(z, y) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x * exp(Float64(y * Float64(-t)))) tmp = 0.0 if (t <= -1.95e+116) tmp = t_1; elseif (t <= -1.5e-285) tmp = Float64(x * exp(Float64(a * Float64(-b)))); elseif (t <= 5.5e-89) tmp = Float64(x * (z ^ y)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x * exp((y * -t)); tmp = 0.0; if (t <= -1.95e+116) tmp = t_1; elseif (t <= -1.5e-285) tmp = x * exp((a * -b)); elseif (t <= 5.5e-89) tmp = x * (z ^ y); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[Exp[N[(y * (-t)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.95e+116], t$95$1, If[LessEqual[t, -1.5e-285], N[(x * N[Exp[N[(a * (-b)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.5e-89], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot e^{y \cdot \left(-t\right)}\\
\mathbf{if}\;t \leq -1.95 \cdot 10^{+116}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.5 \cdot 10^{-285}:\\
\;\;\;\;x \cdot e^{a \cdot \left(-b\right)}\\
\mathbf{elif}\;t \leq 5.5 \cdot 10^{-89}:\\
\;\;\;\;x \cdot {z}^{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.95000000000000016e116 or 5.50000000000000012e-89 < t Initial program 94.7%
Taylor expanded in t around inf 79.6%
mul-1-neg79.6%
distribute-lft-neg-out79.6%
*-commutative79.6%
Simplified79.6%
if -1.95000000000000016e116 < t < -1.50000000000000002e-285Initial program 96.9%
Taylor expanded in b around inf 79.1%
associate-*r*79.1%
mul-1-neg79.1%
Simplified79.1%
if -1.50000000000000002e-285 < t < 5.50000000000000012e-89Initial program 96.4%
Taylor expanded in y around inf 73.8%
Taylor expanded in t around 0 73.8%
*-commutative73.8%
Simplified73.8%
Final simplification78.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -9.8e+35) (not (<= t 6.6e-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 <= -9.8e+35) || !(t <= 6.6e-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 <= (-9.8d+35)) .or. (.not. (t <= 6.6d-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 <= -9.8e+35) || !(t <= 6.6e-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 <= -9.8e+35) or not (t <= 6.6e-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 <= -9.8e+35) || !(t <= 6.6e-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 <= -9.8e+35) || ~((t <= 6.6e-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, -9.8e+35], N[Not[LessEqual[t, 6.6e-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 -9.8 \cdot 10^{+35} \lor \neg \left(t \leq 6.6 \cdot 10^{-89}\right):\\
\;\;\;\;x \cdot e^{y \cdot \left(-t\right)}\\
\mathbf{else}:\\
\;\;\;\;x \cdot {z}^{y}\\
\end{array}
\end{array}
if t < -9.8000000000000005e35 or 6.5999999999999993e-89 < t Initial program 95.1%
Taylor expanded in t around inf 78.5%
mul-1-neg78.5%
distribute-lft-neg-out78.5%
*-commutative78.5%
Simplified78.5%
if -9.8000000000000005e35 < t < 6.5999999999999993e-89Initial program 96.3%
Taylor expanded in y around inf 66.6%
Taylor expanded in t around 0 66.6%
*-commutative66.6%
Simplified66.6%
Final simplification73.1%
(FPCore (x y z t a b) :precision binary64 (if (<= t -3.7e+36) (* x (- 1.0 (* y t))) (* x (pow z y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -3.7e+36) {
tmp = x * (1.0 - (y * t));
} else {
tmp = x * pow(z, y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= (-3.7d+36)) then
tmp = x * (1.0d0 - (y * t))
else
tmp = x * (z ** y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -3.7e+36) {
tmp = x * (1.0 - (y * t));
} else {
tmp = x * Math.pow(z, y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -3.7e+36: tmp = x * (1.0 - (y * t)) else: tmp = x * math.pow(z, y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -3.7e+36) tmp = Float64(x * Float64(1.0 - Float64(y * t))); else tmp = Float64(x * (z ^ y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -3.7e+36) tmp = x * (1.0 - (y * t)); else tmp = x * (z ^ y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -3.7e+36], N[(x * N[(1.0 - N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.7 \cdot 10^{+36}:\\
\;\;\;\;x \cdot \left(1 - y \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot {z}^{y}\\
\end{array}
\end{array}
if t < -3.70000000000000029e36Initial program 93.8%
Taylor expanded in t around inf 79.7%
mul-1-neg79.7%
distribute-lft-neg-out79.7%
*-commutative79.7%
Simplified79.7%
Taylor expanded in y around 0 36.3%
mul-1-neg36.3%
unsub-neg36.3%
*-commutative36.3%
Simplified36.3%
Taylor expanded in x around 0 42.4%
if -3.70000000000000029e36 < t Initial program 96.3%
Taylor expanded in y around inf 71.0%
Taylor expanded in t around 0 65.1%
*-commutative65.1%
Simplified65.1%
Final simplification59.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* t (/ x t))) (t_2 (* (* y t) (- x))))
(if (<= y -2e+59)
(* t (* x (- y)))
(if (<= y -2.5e-155)
t_1
(if (<= y -8.8e-221)
t_2
(if (<= y 3.35e-40) x (if (<= y 6.5e-10) t_1 t_2)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t * (x / t);
double t_2 = (y * t) * -x;
double tmp;
if (y <= -2e+59) {
tmp = t * (x * -y);
} else if (y <= -2.5e-155) {
tmp = t_1;
} else if (y <= -8.8e-221) {
tmp = t_2;
} else if (y <= 3.35e-40) {
tmp = x;
} else if (y <= 6.5e-10) {
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 = t * (x / t)
t_2 = (y * t) * -x
if (y <= (-2d+59)) then
tmp = t * (x * -y)
else if (y <= (-2.5d-155)) then
tmp = t_1
else if (y <= (-8.8d-221)) then
tmp = t_2
else if (y <= 3.35d-40) then
tmp = x
else if (y <= 6.5d-10) 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 = t * (x / t);
double t_2 = (y * t) * -x;
double tmp;
if (y <= -2e+59) {
tmp = t * (x * -y);
} else if (y <= -2.5e-155) {
tmp = t_1;
} else if (y <= -8.8e-221) {
tmp = t_2;
} else if (y <= 3.35e-40) {
tmp = x;
} else if (y <= 6.5e-10) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = t * (x / t) t_2 = (y * t) * -x tmp = 0 if y <= -2e+59: tmp = t * (x * -y) elif y <= -2.5e-155: tmp = t_1 elif y <= -8.8e-221: tmp = t_2 elif y <= 3.35e-40: tmp = x elif y <= 6.5e-10: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(t * Float64(x / t)) t_2 = Float64(Float64(y * t) * Float64(-x)) tmp = 0.0 if (y <= -2e+59) tmp = Float64(t * Float64(x * Float64(-y))); elseif (y <= -2.5e-155) tmp = t_1; elseif (y <= -8.8e-221) tmp = t_2; elseif (y <= 3.35e-40) tmp = x; elseif (y <= 6.5e-10) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = t * (x / t); t_2 = (y * t) * -x; tmp = 0.0; if (y <= -2e+59) tmp = t * (x * -y); elseif (y <= -2.5e-155) tmp = t_1; elseif (y <= -8.8e-221) tmp = t_2; elseif (y <= 3.35e-40) tmp = x; elseif (y <= 6.5e-10) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t * N[(x / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y * t), $MachinePrecision] * (-x)), $MachinePrecision]}, If[LessEqual[y, -2e+59], N[(t * N[(x * (-y)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2.5e-155], t$95$1, If[LessEqual[y, -8.8e-221], t$95$2, If[LessEqual[y, 3.35e-40], x, If[LessEqual[y, 6.5e-10], t$95$1, t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{x}{t}\\
t_2 := \left(y \cdot t\right) \cdot \left(-x\right)\\
\mathbf{if}\;y \leq -2 \cdot 10^{+59}:\\
\;\;\;\;t \cdot \left(x \cdot \left(-y\right)\right)\\
\mathbf{elif}\;y \leq -2.5 \cdot 10^{-155}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -8.8 \cdot 10^{-221}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq 3.35 \cdot 10^{-40}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 6.5 \cdot 10^{-10}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -1.99999999999999994e59Initial program 100.0%
Taylor expanded in t around inf 64.5%
mul-1-neg64.5%
distribute-lft-neg-out64.5%
*-commutative64.5%
Simplified64.5%
Taylor expanded in y around 0 30.3%
mul-1-neg30.3%
unsub-neg30.3%
*-commutative30.3%
Simplified30.3%
Taylor expanded in t around inf 31.6%
mul-1-neg31.6%
*-commutative31.6%
distribute-rgt-neg-in31.6%
Simplified31.6%
if -1.99999999999999994e59 < y < -2.4999999999999999e-155 or 3.3499999999999999e-40 < y < 6.5000000000000003e-10Initial program 95.2%
Taylor expanded in t around inf 54.1%
mul-1-neg54.1%
distribute-lft-neg-out54.1%
*-commutative54.1%
Simplified54.1%
Taylor expanded in y around 0 26.1%
mul-1-neg26.1%
unsub-neg26.1%
*-commutative26.1%
Simplified26.1%
Taylor expanded in t around inf 25.6%
Taylor expanded in t around 0 30.6%
if -2.4999999999999999e-155 < y < -8.80000000000000005e-221 or 6.5000000000000003e-10 < y Initial program 95.6%
Taylor expanded in t around inf 54.3%
mul-1-neg54.3%
distribute-lft-neg-out54.3%
*-commutative54.3%
Simplified54.3%
Taylor expanded in y around 0 20.2%
mul-1-neg20.2%
unsub-neg20.2%
*-commutative20.2%
Simplified20.2%
Taylor expanded in x around 0 24.4%
Taylor expanded in t around inf 27.5%
mul-1-neg27.5%
associate-*r*30.7%
*-commutative30.7%
distribute-rgt-neg-in30.7%
associate-*r*32.7%
Simplified32.7%
if -8.80000000000000005e-221 < y < 3.3499999999999999e-40Initial program 93.5%
Taylor expanded in y around inf 56.3%
Taylor expanded in y around 0 41.5%
Final simplification34.9%
(FPCore (x y z t a b) :precision binary64 (if (<= y 0.35) (+ x (* b (* a (- (* 0.5 (* a (* x b))) x)))) (* (* y t) (- x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= 0.35) {
tmp = x + (b * (a * ((0.5 * (a * (x * b))) - x)));
} else {
tmp = (y * t) * -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 <= 0.35d0) then
tmp = x + (b * (a * ((0.5d0 * (a * (x * b))) - x)))
else
tmp = (y * t) * -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 <= 0.35) {
tmp = x + (b * (a * ((0.5 * (a * (x * b))) - x)));
} else {
tmp = (y * t) * -x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= 0.35: tmp = x + (b * (a * ((0.5 * (a * (x * b))) - x))) else: tmp = (y * t) * -x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= 0.35) tmp = Float64(x + Float64(b * Float64(a * Float64(Float64(0.5 * Float64(a * Float64(x * b))) - x)))); else tmp = Float64(Float64(y * t) * Float64(-x)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= 0.35) tmp = x + (b * (a * ((0.5 * (a * (x * b))) - x))); else tmp = (y * t) * -x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, 0.35], N[(x + N[(b * N[(a * N[(N[(0.5 * N[(a * N[(x * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * t), $MachinePrecision] * (-x)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 0.35:\\
\;\;\;\;x + b \cdot \left(a \cdot \left(0.5 \cdot \left(a \cdot \left(x \cdot b\right)\right) - x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(y \cdot t\right) \cdot \left(-x\right)\\
\end{array}
\end{array}
if y < 0.34999999999999998Initial program 95.4%
Taylor expanded in b around inf 66.2%
associate-*r*66.2%
mul-1-neg66.2%
Simplified66.2%
Taylor expanded in b around 0 39.2%
+-commutative39.2%
mul-1-neg39.2%
unsub-neg39.2%
associate-*r*39.2%
*-commutative39.2%
*-commutative39.2%
Simplified39.2%
Taylor expanded in a around 0 41.7%
if 0.34999999999999998 < y Initial program 96.4%
Taylor expanded in t around inf 59.8%
mul-1-neg59.8%
distribute-lft-neg-out59.8%
*-commutative59.8%
Simplified59.8%
Taylor expanded in y around 0 22.0%
mul-1-neg22.0%
unsub-neg22.0%
*-commutative22.0%
Simplified22.0%
Taylor expanded in x around 0 26.6%
Taylor expanded in t around inf 26.6%
mul-1-neg26.6%
associate-*r*30.1%
*-commutative30.1%
distribute-rgt-neg-in30.1%
associate-*r*31.2%
Simplified31.2%
Final simplification38.3%
(FPCore (x y z t a b) :precision binary64 (if (<= y -4.7e-42) (* t (- (/ x t) (* x y))) (if (<= y 5.5e-11) (* x (- 1.0 (* a (+ z b)))) (* (* y t) (- x)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -4.7e-42) {
tmp = t * ((x / t) - (x * y));
} else if (y <= 5.5e-11) {
tmp = x * (1.0 - (a * (z + b)));
} else {
tmp = (y * t) * -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 <= (-4.7d-42)) then
tmp = t * ((x / t) - (x * y))
else if (y <= 5.5d-11) then
tmp = x * (1.0d0 - (a * (z + b)))
else
tmp = (y * t) * -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 <= -4.7e-42) {
tmp = t * ((x / t) - (x * y));
} else if (y <= 5.5e-11) {
tmp = x * (1.0 - (a * (z + b)));
} else {
tmp = (y * t) * -x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -4.7e-42: tmp = t * ((x / t) - (x * y)) elif y <= 5.5e-11: tmp = x * (1.0 - (a * (z + b))) else: tmp = (y * t) * -x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -4.7e-42) tmp = Float64(t * Float64(Float64(x / t) - Float64(x * y))); elseif (y <= 5.5e-11) tmp = Float64(x * Float64(1.0 - Float64(a * Float64(z + b)))); else tmp = Float64(Float64(y * t) * Float64(-x)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -4.7e-42) tmp = t * ((x / t) - (x * y)); elseif (y <= 5.5e-11) tmp = x * (1.0 - (a * (z + b))); else tmp = (y * t) * -x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -4.7e-42], N[(t * N[(N[(x / t), $MachinePrecision] - N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.5e-11], N[(x * N[(1.0 - N[(a * N[(z + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * t), $MachinePrecision] * (-x)), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.7 \cdot 10^{-42}:\\
\;\;\;\;t \cdot \left(\frac{x}{t} - x \cdot y\right)\\
\mathbf{elif}\;y \leq 5.5 \cdot 10^{-11}:\\
\;\;\;\;x \cdot \left(1 - a \cdot \left(z + b\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(y \cdot t\right) \cdot \left(-x\right)\\
\end{array}
\end{array}
if y < -4.7000000000000001e-42Initial program 98.6%
Taylor expanded in t around inf 57.6%
mul-1-neg57.6%
distribute-lft-neg-out57.6%
*-commutative57.6%
Simplified57.6%
Taylor expanded in y around 0 26.5%
mul-1-neg26.5%
unsub-neg26.5%
*-commutative26.5%
Simplified26.5%
Taylor expanded in t around inf 29.0%
if -4.7000000000000001e-42 < y < 5.49999999999999975e-11Initial program 93.3%
Taylor expanded in y around 0 83.1%
sub-neg83.1%
log1p-define90.8%
Simplified90.8%
Taylor expanded in z around 0 90.8%
associate-*r*90.8%
associate-*r*90.8%
distribute-lft-out90.8%
mul-1-neg90.8%
Simplified90.8%
Taylor expanded in a around 0 47.5%
neg-mul-147.5%
unsub-neg47.5%
Simplified47.5%
if 5.49999999999999975e-11 < y Initial program 96.4%
Taylor expanded in t around inf 59.8%
mul-1-neg59.8%
distribute-lft-neg-out59.8%
*-commutative59.8%
Simplified59.8%
Taylor expanded in y around 0 22.0%
mul-1-neg22.0%
unsub-neg22.0%
*-commutative22.0%
Simplified22.0%
Taylor expanded in x around 0 26.6%
Taylor expanded in t around inf 26.6%
mul-1-neg26.6%
associate-*r*30.1%
*-commutative30.1%
distribute-rgt-neg-in30.1%
associate-*r*31.2%
Simplified31.2%
Final simplification37.3%
(FPCore (x y z t a b) :precision binary64 (if (<= y -1.5e+23) (* t (* x (- y))) (if (<= y 0.001) (- x (* a (* x b))) (* (* y t) (- x)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.5e+23) {
tmp = t * (x * -y);
} else if (y <= 0.001) {
tmp = x - (a * (x * b));
} else {
tmp = (y * t) * -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 <= (-1.5d+23)) then
tmp = t * (x * -y)
else if (y <= 0.001d0) then
tmp = x - (a * (x * b))
else
tmp = (y * t) * -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 <= -1.5e+23) {
tmp = t * (x * -y);
} else if (y <= 0.001) {
tmp = x - (a * (x * b));
} else {
tmp = (y * t) * -x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -1.5e+23: tmp = t * (x * -y) elif y <= 0.001: tmp = x - (a * (x * b)) else: tmp = (y * t) * -x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -1.5e+23) tmp = Float64(t * Float64(x * Float64(-y))); elseif (y <= 0.001) tmp = Float64(x - Float64(a * Float64(x * b))); else tmp = Float64(Float64(y * t) * Float64(-x)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -1.5e+23) tmp = t * (x * -y); elseif (y <= 0.001) tmp = x - (a * (x * b)); else tmp = (y * t) * -x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.5e+23], N[(t * N[(x * (-y)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 0.001], N[(x - N[(a * N[(x * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * t), $MachinePrecision] * (-x)), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.5 \cdot 10^{+23}:\\
\;\;\;\;t \cdot \left(x \cdot \left(-y\right)\right)\\
\mathbf{elif}\;y \leq 0.001:\\
\;\;\;\;x - a \cdot \left(x \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;\left(y \cdot t\right) \cdot \left(-x\right)\\
\end{array}
\end{array}
if y < -1.5e23Initial program 98.1%
Taylor expanded in t around inf 61.2%
mul-1-neg61.2%
distribute-lft-neg-out61.2%
*-commutative61.2%
Simplified61.2%
Taylor expanded in y around 0 27.4%
mul-1-neg27.4%
unsub-neg27.4%
*-commutative27.4%
Simplified27.4%
Taylor expanded in t around inf 30.3%
mul-1-neg30.3%
*-commutative30.3%
distribute-rgt-neg-in30.3%
Simplified30.3%
if -1.5e23 < y < 1e-3Initial program 94.2%
Taylor expanded in b around inf 79.4%
associate-*r*79.4%
mul-1-neg79.4%
Simplified79.4%
Taylor expanded in a around 0 42.6%
mul-1-neg42.6%
unsub-neg42.6%
*-commutative42.6%
Simplified42.6%
if 1e-3 < y Initial program 96.4%
Taylor expanded in t around inf 59.8%
mul-1-neg59.8%
distribute-lft-neg-out59.8%
*-commutative59.8%
Simplified59.8%
Taylor expanded in y around 0 22.0%
mul-1-neg22.0%
unsub-neg22.0%
*-commutative22.0%
Simplified22.0%
Taylor expanded in x around 0 26.6%
Taylor expanded in t around inf 26.6%
mul-1-neg26.6%
associate-*r*30.1%
*-commutative30.1%
distribute-rgt-neg-in30.1%
associate-*r*31.2%
Simplified31.2%
Final simplification36.5%
(FPCore (x y z t a b) :precision binary64 (if (<= y -3.1e+22) (* t (* x (- y))) (if (<= y 0.0027) (- x (* x (* a b))) (* (* y t) (- x)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -3.1e+22) {
tmp = t * (x * -y);
} else if (y <= 0.0027) {
tmp = x - (x * (a * b));
} else {
tmp = (y * t) * -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.1d+22)) then
tmp = t * (x * -y)
else if (y <= 0.0027d0) then
tmp = x - (x * (a * b))
else
tmp = (y * t) * -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.1e+22) {
tmp = t * (x * -y);
} else if (y <= 0.0027) {
tmp = x - (x * (a * b));
} else {
tmp = (y * t) * -x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -3.1e+22: tmp = t * (x * -y) elif y <= 0.0027: tmp = x - (x * (a * b)) else: tmp = (y * t) * -x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -3.1e+22) tmp = Float64(t * Float64(x * Float64(-y))); elseif (y <= 0.0027) tmp = Float64(x - Float64(x * Float64(a * b))); else tmp = Float64(Float64(y * t) * Float64(-x)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -3.1e+22) tmp = t * (x * -y); elseif (y <= 0.0027) tmp = x - (x * (a * b)); else tmp = (y * t) * -x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -3.1e+22], N[(t * N[(x * (-y)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 0.0027], N[(x - N[(x * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * t), $MachinePrecision] * (-x)), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.1 \cdot 10^{+22}:\\
\;\;\;\;t \cdot \left(x \cdot \left(-y\right)\right)\\
\mathbf{elif}\;y \leq 0.0027:\\
\;\;\;\;x - x \cdot \left(a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;\left(y \cdot t\right) \cdot \left(-x\right)\\
\end{array}
\end{array}
if y < -3.1000000000000002e22Initial program 98.1%
Taylor expanded in t around inf 61.2%
mul-1-neg61.2%
distribute-lft-neg-out61.2%
*-commutative61.2%
Simplified61.2%
Taylor expanded in y around 0 27.4%
mul-1-neg27.4%
unsub-neg27.4%
*-commutative27.4%
Simplified27.4%
Taylor expanded in t around inf 30.3%
mul-1-neg30.3%
*-commutative30.3%
distribute-rgt-neg-in30.3%
Simplified30.3%
if -3.1000000000000002e22 < y < 0.0027000000000000001Initial program 94.2%
Taylor expanded in b around inf 79.4%
associate-*r*79.4%
mul-1-neg79.4%
Simplified79.4%
Taylor expanded in a around 0 42.6%
mul-1-neg42.6%
unsub-neg42.6%
*-commutative42.6%
Simplified42.6%
Taylor expanded in a around 0 42.6%
associate-*r*42.7%
Simplified42.7%
if 0.0027000000000000001 < y Initial program 96.4%
Taylor expanded in t around inf 59.8%
mul-1-neg59.8%
distribute-lft-neg-out59.8%
*-commutative59.8%
Simplified59.8%
Taylor expanded in y around 0 22.0%
mul-1-neg22.0%
unsub-neg22.0%
*-commutative22.0%
Simplified22.0%
Taylor expanded in x around 0 26.6%
Taylor expanded in t around inf 26.6%
mul-1-neg26.6%
associate-*r*30.1%
*-commutative30.1%
distribute-rgt-neg-in30.1%
associate-*r*31.2%
Simplified31.2%
Final simplification36.5%
(FPCore (x y z t a b) :precision binary64 (if (<= y -2e-42) (* t (- (/ x t) (* x y))) (if (<= y 1.5e-5) (- x (* x (* a b))) (* (* y t) (- x)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -2e-42) {
tmp = t * ((x / t) - (x * y));
} else if (y <= 1.5e-5) {
tmp = x - (x * (a * b));
} else {
tmp = (y * t) * -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 <= (-2d-42)) then
tmp = t * ((x / t) - (x * y))
else if (y <= 1.5d-5) then
tmp = x - (x * (a * b))
else
tmp = (y * t) * -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 <= -2e-42) {
tmp = t * ((x / t) - (x * y));
} else if (y <= 1.5e-5) {
tmp = x - (x * (a * b));
} else {
tmp = (y * t) * -x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -2e-42: tmp = t * ((x / t) - (x * y)) elif y <= 1.5e-5: tmp = x - (x * (a * b)) else: tmp = (y * t) * -x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -2e-42) tmp = Float64(t * Float64(Float64(x / t) - Float64(x * y))); elseif (y <= 1.5e-5) tmp = Float64(x - Float64(x * Float64(a * b))); else tmp = Float64(Float64(y * t) * Float64(-x)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -2e-42) tmp = t * ((x / t) - (x * y)); elseif (y <= 1.5e-5) tmp = x - (x * (a * b)); else tmp = (y * t) * -x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -2e-42], N[(t * N[(N[(x / t), $MachinePrecision] - N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.5e-5], N[(x - N[(x * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * t), $MachinePrecision] * (-x)), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2 \cdot 10^{-42}:\\
\;\;\;\;t \cdot \left(\frac{x}{t} - x \cdot y\right)\\
\mathbf{elif}\;y \leq 1.5 \cdot 10^{-5}:\\
\;\;\;\;x - x \cdot \left(a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;\left(y \cdot t\right) \cdot \left(-x\right)\\
\end{array}
\end{array}
if y < -2.00000000000000008e-42Initial program 98.6%
Taylor expanded in t around inf 57.6%
mul-1-neg57.6%
distribute-lft-neg-out57.6%
*-commutative57.6%
Simplified57.6%
Taylor expanded in y around 0 26.5%
mul-1-neg26.5%
unsub-neg26.5%
*-commutative26.5%
Simplified26.5%
Taylor expanded in t around inf 29.0%
if -2.00000000000000008e-42 < y < 1.50000000000000004e-5Initial program 93.3%
Taylor expanded in b around inf 83.1%
associate-*r*83.1%
mul-1-neg83.1%
Simplified83.1%
Taylor expanded in a around 0 46.2%
mul-1-neg46.2%
unsub-neg46.2%
*-commutative46.2%
Simplified46.2%
Taylor expanded in a around 0 46.2%
associate-*r*46.2%
Simplified46.2%
if 1.50000000000000004e-5 < y Initial program 96.4%
Taylor expanded in t around inf 59.8%
mul-1-neg59.8%
distribute-lft-neg-out59.8%
*-commutative59.8%
Simplified59.8%
Taylor expanded in y around 0 22.0%
mul-1-neg22.0%
unsub-neg22.0%
*-commutative22.0%
Simplified22.0%
Taylor expanded in x around 0 26.6%
Taylor expanded in t around inf 26.6%
mul-1-neg26.6%
associate-*r*30.1%
*-commutative30.1%
distribute-rgt-neg-in30.1%
associate-*r*31.2%
Simplified31.2%
Final simplification36.8%
(FPCore (x y z t a b) :precision binary64 (if (<= x 1e-126) (* t (/ x t)) (* x (- 1.0 (* y t)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= 1e-126) {
tmp = t * (x / t);
} 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 (x <= 1d-126) then
tmp = t * (x / t)
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 (x <= 1e-126) {
tmp = t * (x / t);
} else {
tmp = x * (1.0 - (y * t));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= 1e-126: tmp = t * (x / t) else: tmp = x * (1.0 - (y * t)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= 1e-126) tmp = Float64(t * Float64(x / t)); 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 (x <= 1e-126) tmp = t * (x / t); else tmp = x * (1.0 - (y * t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, 1e-126], N[(t * N[(x / t), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 - N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 10^{-126}:\\
\;\;\;\;t \cdot \frac{x}{t}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - y \cdot t\right)\\
\end{array}
\end{array}
if x < 9.9999999999999995e-127Initial program 96.3%
Taylor expanded in t around inf 56.4%
mul-1-neg56.4%
distribute-lft-neg-out56.4%
*-commutative56.4%
Simplified56.4%
Taylor expanded in y around 0 29.2%
mul-1-neg29.2%
unsub-neg29.2%
*-commutative29.2%
Simplified29.2%
Taylor expanded in t around inf 29.7%
Taylor expanded in t around 0 27.6%
if 9.9999999999999995e-127 < x Initial program 94.5%
Taylor expanded in t around inf 57.3%
mul-1-neg57.3%
distribute-lft-neg-out57.3%
*-commutative57.3%
Simplified57.3%
Taylor expanded in y around 0 31.0%
mul-1-neg31.0%
unsub-neg31.0%
*-commutative31.0%
Simplified31.0%
Taylor expanded in x around 0 27.9%
Final simplification27.7%
(FPCore (x y z t a b) :precision binary64 (if (<= y 0.00155) (* t (/ x t)) (* y (* x (- t)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= 0.00155) {
tmp = t * (x / 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 (y <= 0.00155d0) then
tmp = t * (x / 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 (y <= 0.00155) {
tmp = t * (x / t);
} else {
tmp = y * (x * -t);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= 0.00155: tmp = t * (x / t) else: tmp = y * (x * -t) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= 0.00155) tmp = Float64(t * Float64(x / 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 (y <= 0.00155) tmp = t * (x / t); else tmp = y * (x * -t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, 0.00155], N[(t * N[(x / t), $MachinePrecision]), $MachinePrecision], N[(y * N[(x * (-t)), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 0.00155:\\
\;\;\;\;t \cdot \frac{x}{t}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(x \cdot \left(-t\right)\right)\\
\end{array}
\end{array}
if y < 0.00154999999999999995Initial program 95.4%
Taylor expanded in t around inf 55.2%
mul-1-neg55.2%
distribute-lft-neg-out55.2%
*-commutative55.2%
Simplified55.2%
Taylor expanded in y around 0 33.5%
mul-1-neg33.5%
unsub-neg33.5%
*-commutative33.5%
Simplified33.5%
Taylor expanded in t around inf 33.3%
Taylor expanded in t around 0 30.8%
if 0.00154999999999999995 < y Initial program 96.4%
Taylor expanded in t around inf 59.8%
mul-1-neg59.8%
distribute-lft-neg-out59.8%
*-commutative59.8%
Simplified59.8%
Taylor expanded in y around 0 22.0%
mul-1-neg22.0%
unsub-neg22.0%
*-commutative22.0%
Simplified22.0%
Taylor expanded in t around inf 26.6%
mul-1-neg26.6%
associate-*r*30.1%
*-commutative30.1%
Simplified30.1%
Final simplification30.6%
(FPCore (x y z t a b) :precision binary64 (if (<= y 0.058) (* t (/ x t)) (* (* y t) (- x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= 0.058) {
tmp = t * (x / t);
} else {
tmp = (y * t) * -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 <= 0.058d0) then
tmp = t * (x / t)
else
tmp = (y * t) * -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 <= 0.058) {
tmp = t * (x / t);
} else {
tmp = (y * t) * -x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= 0.058: tmp = t * (x / t) else: tmp = (y * t) * -x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= 0.058) tmp = Float64(t * Float64(x / t)); else tmp = Float64(Float64(y * t) * Float64(-x)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= 0.058) tmp = t * (x / t); else tmp = (y * t) * -x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, 0.058], N[(t * N[(x / t), $MachinePrecision]), $MachinePrecision], N[(N[(y * t), $MachinePrecision] * (-x)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 0.058:\\
\;\;\;\;t \cdot \frac{x}{t}\\
\mathbf{else}:\\
\;\;\;\;\left(y \cdot t\right) \cdot \left(-x\right)\\
\end{array}
\end{array}
if y < 0.0580000000000000029Initial program 95.4%
Taylor expanded in t around inf 55.2%
mul-1-neg55.2%
distribute-lft-neg-out55.2%
*-commutative55.2%
Simplified55.2%
Taylor expanded in y around 0 33.5%
mul-1-neg33.5%
unsub-neg33.5%
*-commutative33.5%
Simplified33.5%
Taylor expanded in t around inf 33.3%
Taylor expanded in t around 0 30.8%
if 0.0580000000000000029 < y Initial program 96.4%
Taylor expanded in t around inf 59.8%
mul-1-neg59.8%
distribute-lft-neg-out59.8%
*-commutative59.8%
Simplified59.8%
Taylor expanded in y around 0 22.0%
mul-1-neg22.0%
unsub-neg22.0%
*-commutative22.0%
Simplified22.0%
Taylor expanded in x around 0 26.6%
Taylor expanded in t around inf 26.6%
mul-1-neg26.6%
associate-*r*30.1%
*-commutative30.1%
distribute-rgt-neg-in30.1%
associate-*r*31.2%
Simplified31.2%
Final simplification30.9%
(FPCore (x y z t a b) :precision binary64 (if (<= y 6.5e-237) (* t (/ x t)) (* y (/ x y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= 6.5e-237) {
tmp = t * (x / t);
} else {
tmp = y * (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 (y <= 6.5d-237) then
tmp = t * (x / t)
else
tmp = y * (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 (y <= 6.5e-237) {
tmp = t * (x / t);
} else {
tmp = y * (x / y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= 6.5e-237: tmp = t * (x / t) else: tmp = y * (x / y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= 6.5e-237) tmp = Float64(t * Float64(x / t)); else tmp = Float64(y * Float64(x / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= 6.5e-237) tmp = t * (x / t); else tmp = y * (x / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, 6.5e-237], N[(t * N[(x / t), $MachinePrecision]), $MachinePrecision], N[(y * N[(x / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 6.5 \cdot 10^{-237}:\\
\;\;\;\;t \cdot \frac{x}{t}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{x}{y}\\
\end{array}
\end{array}
if y < 6.5000000000000001e-237Initial program 96.2%
Taylor expanded in t around inf 51.6%
mul-1-neg51.6%
distribute-lft-neg-out51.6%
*-commutative51.6%
Simplified51.6%
Taylor expanded in y around 0 30.3%
mul-1-neg30.3%
unsub-neg30.3%
*-commutative30.3%
Simplified30.3%
Taylor expanded in t around inf 32.3%
Taylor expanded in t around 0 28.8%
if 6.5000000000000001e-237 < y Initial program 95.1%
Taylor expanded in t around inf 61.8%
mul-1-neg61.8%
distribute-lft-neg-out61.8%
*-commutative61.8%
Simplified61.8%
Taylor expanded in y around 0 29.3%
mul-1-neg29.3%
unsub-neg29.3%
*-commutative29.3%
Simplified29.3%
Taylor expanded in y around inf 31.4%
*-commutative31.4%
Simplified31.4%
Taylor expanded in y around 0 23.4%
Final simplification26.1%
(FPCore (x y z t a b) :precision binary64 (* t (/ x t)))
double code(double x, double y, double z, double t, double a, double b) {
return t * (x / t);
}
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 = t * (x / t)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return t * (x / t);
}
def code(x, y, z, t, a, b): return t * (x / t)
function code(x, y, z, t, a, b) return Float64(t * Float64(x / t)) end
function tmp = code(x, y, z, t, a, b) tmp = t * (x / t); end
code[x_, y_, z_, t_, a_, b_] := N[(t * N[(x / t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
t \cdot \frac{x}{t}
\end{array}
Initial program 95.7%
Taylor expanded in t around inf 56.7%
mul-1-neg56.7%
distribute-lft-neg-out56.7%
*-commutative56.7%
Simplified56.7%
Taylor expanded in y around 0 29.8%
mul-1-neg29.8%
unsub-neg29.8%
*-commutative29.8%
Simplified29.8%
Taylor expanded in t around inf 30.1%
Taylor expanded in t around 0 23.9%
Final simplification23.9%
(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.7%
Taylor expanded in y around inf 73.1%
Taylor expanded in y around 0 18.2%
Final simplification18.2%
herbie shell --seed 2024055
(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))))))