
(FPCore (x y z t a b) :precision binary64 (/ (* x (exp (- (+ (* y (log z)) (* (- t 1.0) (log a))) b))) y))
double code(double x, double y, double z, double t, double a, double b) {
return (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y;
}
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 - 1.0d0) * log(a))) - b))) / y
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 - 1.0) * Math.log(a))) - b))) / y;
}
def code(x, y, z, t, a, b): return (x * math.exp((((y * math.log(z)) + ((t - 1.0) * math.log(a))) - b))) / y
function code(x, y, z, t, a, b) return Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) + Float64(Float64(t - 1.0) * log(a))) - b))) / y) end
function tmp = code(x, y, z, t, a, b) tmp = (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y; end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x * N[Exp[N[(N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] + N[(N[(t - 1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}
\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 1.0) (log a))) b))) y))
double code(double x, double y, double z, double t, double a, double b) {
return (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y;
}
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 - 1.0d0) * log(a))) - b))) / y
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 - 1.0) * Math.log(a))) - b))) / y;
}
def code(x, y, z, t, a, b): return (x * math.exp((((y * math.log(z)) + ((t - 1.0) * math.log(a))) - b))) / y
function code(x, y, z, t, a, b) return Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) + Float64(Float64(t - 1.0) * log(a))) - b))) / y) end
function tmp = code(x, y, z, t, a, b) tmp = (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y; end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x * N[Exp[N[(N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] + N[(N[(t - 1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}
\end{array}
(FPCore (x y z t a b) :precision binary64 (/ x (* y (exp (- b (fma y (log z) (* (+ t -1.0) (log a))))))))
double code(double x, double y, double z, double t, double a, double b) {
return x / (y * exp((b - fma(y, log(z), ((t + -1.0) * log(a))))));
}
function code(x, y, z, t, a, b) return Float64(x / Float64(y * exp(Float64(b - fma(y, log(z), Float64(Float64(t + -1.0) * log(a))))))) end
code[x_, y_, z_, t_, a_, b_] := N[(x / N[(y * N[Exp[N[(b - N[(y * N[Log[z], $MachinePrecision] + N[(N[(t + -1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{y \cdot e^{b - \mathsf{fma}\left(y, \log z, \left(t + -1\right) \cdot \log a\right)}}
\end{array}
Initial program 97.3%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
div-invN/A
lift-exp.f64N/A
lift--.f64N/A
exp-diffN/A
clear-numN/A
Applied rewrites97.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (+ t -1.0) (log a)))
(t_2 (/ (* x (exp (- (* t (log a)) b))) y)))
(if (<= t_1 -50000000000000.0)
t_2
(if (<= t_1 -442.0)
(*
x
(/
(/ (pow z y) a)
(fma b (fma b (* y (fma 0.16666666666666666 b 0.5)) y) y)))
(if (<= t_1 5e+51) (/ (* x (exp (- (* y (log z)) b))) y) t_2)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t + -1.0) * log(a);
double t_2 = (x * exp(((t * log(a)) - b))) / y;
double tmp;
if (t_1 <= -50000000000000.0) {
tmp = t_2;
} else if (t_1 <= -442.0) {
tmp = x * ((pow(z, y) / a) / fma(b, fma(b, (y * fma(0.16666666666666666, b, 0.5)), y), y));
} else if (t_1 <= 5e+51) {
tmp = (x * exp(((y * log(z)) - b))) / y;
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t + -1.0) * log(a)) t_2 = Float64(Float64(x * exp(Float64(Float64(t * log(a)) - b))) / y) tmp = 0.0 if (t_1 <= -50000000000000.0) tmp = t_2; elseif (t_1 <= -442.0) tmp = Float64(x * Float64(Float64((z ^ y) / a) / fma(b, fma(b, Float64(y * fma(0.16666666666666666, b, 0.5)), y), y))); elseif (t_1 <= 5e+51) tmp = Float64(Float64(x * exp(Float64(Float64(y * log(z)) - b))) / y); else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t + -1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * N[Exp[N[(N[(t * N[Log[a], $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[t$95$1, -50000000000000.0], t$95$2, If[LessEqual[t$95$1, -442.0], N[(x * N[(N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision] / N[(b * N[(b * N[(y * N[(0.16666666666666666 * b + 0.5), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+51], N[(N[(x * N[Exp[N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(t + -1\right) \cdot \log a\\
t_2 := \frac{x \cdot e^{t \cdot \log a - b}}{y}\\
\mathbf{if}\;t\_1 \leq -50000000000000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq -442:\\
\;\;\;\;x \cdot \frac{\frac{{z}^{y}}{a}}{\mathsf{fma}\left(b, \mathsf{fma}\left(b, y \cdot \mathsf{fma}\left(0.16666666666666666, b, 0.5\right), y\right), y\right)}\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+51}:\\
\;\;\;\;\frac{x \cdot e^{y \cdot \log z - b}}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < -5e13 or 5e51 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) Initial program 100.0%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
rem-exp-logN/A
lower-log.f64N/A
rem-exp-log94.5
Applied rewrites94.5%
if -5e13 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < -442Initial program 86.6%
Taylor expanded in t around 0
associate-/l*N/A
lower-*.f64N/A
exp-diffN/A
associate-/l/N/A
lower-/.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
exp-diffN/A
lower-/.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
rem-exp-logN/A
lower-*.f64N/A
lower-exp.f6495.6
Applied rewrites95.6%
Taylor expanded in b around 0
Applied rewrites79.1%
Taylor expanded in b around 0
Applied rewrites85.0%
if -442 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < 5e51Initial program 97.8%
Taylor expanded in y around inf
lower-*.f64N/A
lower-log.f6483.8
Applied rewrites83.8%
Final simplification88.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (+ t -1.0) (log a))) (t_2 (/ (* x (pow a (+ t -1.0))) y)))
(if (<= t_1 -50000000000000.0)
t_2
(if (<= t_1 -442.0)
(*
x
(/
(/ (pow z y) a)
(fma b (fma b (* y (fma 0.16666666666666666 b 0.5)) y) y)))
(if (<= t_1 2e+138) (/ (* x (exp (- (* y (log z)) b))) y) t_2)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t + -1.0) * log(a);
double t_2 = (x * pow(a, (t + -1.0))) / y;
double tmp;
if (t_1 <= -50000000000000.0) {
tmp = t_2;
} else if (t_1 <= -442.0) {
tmp = x * ((pow(z, y) / a) / fma(b, fma(b, (y * fma(0.16666666666666666, b, 0.5)), y), y));
} else if (t_1 <= 2e+138) {
tmp = (x * exp(((y * log(z)) - b))) / y;
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t + -1.0) * log(a)) t_2 = Float64(Float64(x * (a ^ Float64(t + -1.0))) / y) tmp = 0.0 if (t_1 <= -50000000000000.0) tmp = t_2; elseif (t_1 <= -442.0) tmp = Float64(x * Float64(Float64((z ^ y) / a) / fma(b, fma(b, Float64(y * fma(0.16666666666666666, b, 0.5)), y), y))); elseif (t_1 <= 2e+138) tmp = Float64(Float64(x * exp(Float64(Float64(y * log(z)) - b))) / y); else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t + -1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[t$95$1, -50000000000000.0], t$95$2, If[LessEqual[t$95$1, -442.0], N[(x * N[(N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision] / N[(b * N[(b * N[(y * N[(0.16666666666666666 * b + 0.5), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+138], N[(N[(x * N[Exp[N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(t + -1\right) \cdot \log a\\
t_2 := \frac{x \cdot {a}^{\left(t + -1\right)}}{y}\\
\mathbf{if}\;t\_1 \leq -50000000000000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq -442:\\
\;\;\;\;x \cdot \frac{\frac{{z}^{y}}{a}}{\mathsf{fma}\left(b, \mathsf{fma}\left(b, y \cdot \mathsf{fma}\left(0.16666666666666666, b, 0.5\right), y\right), y\right)}\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+138}:\\
\;\;\;\;\frac{x \cdot e^{y \cdot \log z - b}}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < -5e13 or 2.0000000000000001e138 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) Initial program 100.0%
Taylor expanded in y around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
lower-/.f64N/A
lower-*.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
lower-+.f64N/A
lower-*.f64N/A
lower-exp.f6474.5
Applied rewrites74.5%
Taylor expanded in b around 0
Applied rewrites91.6%
if -5e13 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < -442Initial program 86.6%
Taylor expanded in t around 0
associate-/l*N/A
lower-*.f64N/A
exp-diffN/A
associate-/l/N/A
lower-/.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
exp-diffN/A
lower-/.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
rem-exp-logN/A
lower-*.f64N/A
lower-exp.f6495.6
Applied rewrites95.6%
Taylor expanded in b around 0
Applied rewrites79.1%
Taylor expanded in b around 0
Applied rewrites85.0%
if -442 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < 2.0000000000000001e138Initial program 98.1%
Taylor expanded in y around inf
lower-*.f64N/A
lower-log.f6481.7
Applied rewrites81.7%
Final simplification85.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (+ t -1.0) (log a))) (t_2 (/ (* x (pow a (+ t -1.0))) y)))
(if (<= t_1 -50000000.0)
t_2
(if (<= t_1 -298.0)
(* x (/ (/ 1.0 a) (* y (exp b))))
(if (<= t_1 1e+40) (* x (/ (pow z y) (* y a))) t_2)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t + -1.0) * log(a);
double t_2 = (x * pow(a, (t + -1.0))) / y;
double tmp;
if (t_1 <= -50000000.0) {
tmp = t_2;
} else if (t_1 <= -298.0) {
tmp = x * ((1.0 / a) / (y * exp(b)));
} else if (t_1 <= 1e+40) {
tmp = x * (pow(z, y) / (y * a));
} 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 + (-1.0d0)) * log(a)
t_2 = (x * (a ** (t + (-1.0d0)))) / y
if (t_1 <= (-50000000.0d0)) then
tmp = t_2
else if (t_1 <= (-298.0d0)) then
tmp = x * ((1.0d0 / a) / (y * exp(b)))
else if (t_1 <= 1d+40) then
tmp = x * ((z ** y) / (y * a))
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 + -1.0) * Math.log(a);
double t_2 = (x * Math.pow(a, (t + -1.0))) / y;
double tmp;
if (t_1 <= -50000000.0) {
tmp = t_2;
} else if (t_1 <= -298.0) {
tmp = x * ((1.0 / a) / (y * Math.exp(b)));
} else if (t_1 <= 1e+40) {
tmp = x * (Math.pow(z, y) / (y * a));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t + -1.0) * math.log(a) t_2 = (x * math.pow(a, (t + -1.0))) / y tmp = 0 if t_1 <= -50000000.0: tmp = t_2 elif t_1 <= -298.0: tmp = x * ((1.0 / a) / (y * math.exp(b))) elif t_1 <= 1e+40: tmp = x * (math.pow(z, y) / (y * a)) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t + -1.0) * log(a)) t_2 = Float64(Float64(x * (a ^ Float64(t + -1.0))) / y) tmp = 0.0 if (t_1 <= -50000000.0) tmp = t_2; elseif (t_1 <= -298.0) tmp = Float64(x * Float64(Float64(1.0 / a) / Float64(y * exp(b)))); elseif (t_1 <= 1e+40) tmp = Float64(x * Float64((z ^ y) / Float64(y * a))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t + -1.0) * log(a); t_2 = (x * (a ^ (t + -1.0))) / y; tmp = 0.0; if (t_1 <= -50000000.0) tmp = t_2; elseif (t_1 <= -298.0) tmp = x * ((1.0 / a) / (y * exp(b))); elseif (t_1 <= 1e+40) tmp = x * ((z ^ y) / (y * a)); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t + -1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[t$95$1, -50000000.0], t$95$2, If[LessEqual[t$95$1, -298.0], N[(x * N[(N[(1.0 / a), $MachinePrecision] / N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+40], N[(x * N[(N[Power[z, y], $MachinePrecision] / N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(t + -1\right) \cdot \log a\\
t_2 := \frac{x \cdot {a}^{\left(t + -1\right)}}{y}\\
\mathbf{if}\;t\_1 \leq -50000000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq -298:\\
\;\;\;\;x \cdot \frac{\frac{1}{a}}{y \cdot e^{b}}\\
\mathbf{elif}\;t\_1 \leq 10^{+40}:\\
\;\;\;\;x \cdot \frac{{z}^{y}}{y \cdot a}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < -5e7 or 1.00000000000000003e40 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) Initial program 100.0%
Taylor expanded in y around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
lower-/.f64N/A
lower-*.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
lower-+.f64N/A
lower-*.f64N/A
lower-exp.f6470.9
Applied rewrites70.9%
Taylor expanded in b around 0
Applied rewrites86.1%
if -5e7 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < -298Initial program 89.3%
Taylor expanded in t around 0
associate-/l*N/A
lower-*.f64N/A
exp-diffN/A
associate-/l/N/A
lower-/.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
exp-diffN/A
lower-/.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
rem-exp-logN/A
lower-*.f64N/A
lower-exp.f6491.0
Applied rewrites91.0%
Taylor expanded in y around 0
Applied rewrites73.5%
if -298 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < 1.00000000000000003e40Initial program 98.2%
Taylor expanded in t around 0
associate-/l*N/A
lower-*.f64N/A
exp-diffN/A
associate-/l/N/A
lower-/.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
exp-diffN/A
lower-/.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
rem-exp-logN/A
lower-*.f64N/A
lower-exp.f6477.7
Applied rewrites77.7%
Taylor expanded in b around 0
Applied rewrites75.9%
Final simplification79.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (+ t -1.0) (log a))) (t_2 (/ (* x (pow a (+ t -1.0))) y)))
(if (<= t_1 -50000000.0)
t_2
(if (<= t_1 -298.0)
(/ x (* a (* y (exp b))))
(if (<= t_1 1e+40) (* x (/ (pow z y) (* y a))) t_2)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t + -1.0) * log(a);
double t_2 = (x * pow(a, (t + -1.0))) / y;
double tmp;
if (t_1 <= -50000000.0) {
tmp = t_2;
} else if (t_1 <= -298.0) {
tmp = x / (a * (y * exp(b)));
} else if (t_1 <= 1e+40) {
tmp = x * (pow(z, y) / (y * a));
} 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 + (-1.0d0)) * log(a)
t_2 = (x * (a ** (t + (-1.0d0)))) / y
if (t_1 <= (-50000000.0d0)) then
tmp = t_2
else if (t_1 <= (-298.0d0)) then
tmp = x / (a * (y * exp(b)))
else if (t_1 <= 1d+40) then
tmp = x * ((z ** y) / (y * a))
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 + -1.0) * Math.log(a);
double t_2 = (x * Math.pow(a, (t + -1.0))) / y;
double tmp;
if (t_1 <= -50000000.0) {
tmp = t_2;
} else if (t_1 <= -298.0) {
tmp = x / (a * (y * Math.exp(b)));
} else if (t_1 <= 1e+40) {
tmp = x * (Math.pow(z, y) / (y * a));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t + -1.0) * math.log(a) t_2 = (x * math.pow(a, (t + -1.0))) / y tmp = 0 if t_1 <= -50000000.0: tmp = t_2 elif t_1 <= -298.0: tmp = x / (a * (y * math.exp(b))) elif t_1 <= 1e+40: tmp = x * (math.pow(z, y) / (y * a)) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t + -1.0) * log(a)) t_2 = Float64(Float64(x * (a ^ Float64(t + -1.0))) / y) tmp = 0.0 if (t_1 <= -50000000.0) tmp = t_2; elseif (t_1 <= -298.0) tmp = Float64(x / Float64(a * Float64(y * exp(b)))); elseif (t_1 <= 1e+40) tmp = Float64(x * Float64((z ^ y) / Float64(y * a))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t + -1.0) * log(a); t_2 = (x * (a ^ (t + -1.0))) / y; tmp = 0.0; if (t_1 <= -50000000.0) tmp = t_2; elseif (t_1 <= -298.0) tmp = x / (a * (y * exp(b))); elseif (t_1 <= 1e+40) tmp = x * ((z ^ y) / (y * a)); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t + -1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[t$95$1, -50000000.0], t$95$2, If[LessEqual[t$95$1, -298.0], N[(x / N[(a * N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+40], N[(x * N[(N[Power[z, y], $MachinePrecision] / N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(t + -1\right) \cdot \log a\\
t_2 := \frac{x \cdot {a}^{\left(t + -1\right)}}{y}\\
\mathbf{if}\;t\_1 \leq -50000000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq -298:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\
\mathbf{elif}\;t\_1 \leq 10^{+40}:\\
\;\;\;\;x \cdot \frac{{z}^{y}}{y \cdot a}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < -5e7 or 1.00000000000000003e40 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) Initial program 100.0%
Taylor expanded in y around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
lower-/.f64N/A
lower-*.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
lower-+.f64N/A
lower-*.f64N/A
lower-exp.f6470.9
Applied rewrites70.9%
Taylor expanded in b around 0
Applied rewrites86.1%
if -5e7 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < -298Initial program 89.3%
Taylor expanded in t around 0
associate-/l*N/A
lower-*.f64N/A
exp-diffN/A
associate-/l/N/A
lower-/.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
exp-diffN/A
lower-/.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
rem-exp-logN/A
lower-*.f64N/A
lower-exp.f6491.0
Applied rewrites91.0%
Taylor expanded in y around 0
Applied rewrites73.4%
if -298 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < 1.00000000000000003e40Initial program 98.2%
Taylor expanded in t around 0
associate-/l*N/A
lower-*.f64N/A
exp-diffN/A
associate-/l/N/A
lower-/.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
exp-diffN/A
lower-/.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
rem-exp-logN/A
lower-*.f64N/A
lower-exp.f6477.7
Applied rewrites77.7%
Taylor expanded in b around 0
Applied rewrites75.9%
Final simplification79.9%
(FPCore (x y z t a b)
:precision binary64
(if (<=
(/ (* x (exp (- (+ (* y (log z)) (* (+ t -1.0) (log a))) b))) y)
-50000000.0)
(/ (* x (/ 1.0 a)) (fma y b y))
(* (/ 1.0 a) (* x (/ 1.0 (fma y b y))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (((x * exp((((y * log(z)) + ((t + -1.0) * log(a))) - b))) / y) <= -50000000.0) {
tmp = (x * (1.0 / a)) / fma(y, b, y);
} else {
tmp = (1.0 / a) * (x * (1.0 / fma(y, b, y)));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) + Float64(Float64(t + -1.0) * log(a))) - b))) / y) <= -50000000.0) tmp = Float64(Float64(x * Float64(1.0 / a)) / fma(y, b, y)); else tmp = Float64(Float64(1.0 / a) * Float64(x * Float64(1.0 / fma(y, b, y)))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(N[(x * N[Exp[N[(N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] + N[(N[(t + -1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], -50000000.0], N[(N[(x * N[(1.0 / a), $MachinePrecision]), $MachinePrecision] / N[(y * b + y), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / a), $MachinePrecision] * N[(x * N[(1.0 / N[(y * b + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{x \cdot e^{\left(y \cdot \log z + \left(t + -1\right) \cdot \log a\right) - b}}{y} \leq -50000000:\\
\;\;\;\;\frac{x \cdot \frac{1}{a}}{\mathsf{fma}\left(y, b, y\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{a} \cdot \left(x \cdot \frac{1}{\mathsf{fma}\left(y, b, y\right)}\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 x (exp.f64 (-.f64 (+.f64 (*.f64 y (log.f64 z)) (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a))) b))) y) < -5e7Initial program 99.4%
Taylor expanded in t around 0
associate-/l*N/A
lower-*.f64N/A
exp-diffN/A
associate-/l/N/A
lower-/.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
exp-diffN/A
lower-/.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
rem-exp-logN/A
lower-*.f64N/A
lower-exp.f6468.7
Applied rewrites68.7%
Taylor expanded in b around 0
Applied rewrites47.4%
Taylor expanded in y around 0
Applied rewrites16.4%
Applied rewrites21.2%
if -5e7 < (/.f64 (*.f64 x (exp.f64 (-.f64 (+.f64 (*.f64 y (log.f64 z)) (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a))) b))) y) Initial program 96.3%
Taylor expanded in t around 0
associate-/l*N/A
lower-*.f64N/A
exp-diffN/A
associate-/l/N/A
lower-/.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
exp-diffN/A
lower-/.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
rem-exp-logN/A
lower-*.f64N/A
lower-exp.f6467.6
Applied rewrites67.6%
Taylor expanded in b around 0
Applied rewrites55.7%
Taylor expanded in y around 0
Applied rewrites37.9%
Applied rewrites40.3%
Final simplification34.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (+ t -1.0) (log a))) (t_2 (/ (* x (pow a (+ t -1.0))) y)))
(if (<= t_1 -2000000000000.0)
t_2
(if (<= t_1 5e+122) (* x (* (/ (pow z y) y) (/ 1.0 a))) t_2))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t + -1.0) * log(a);
double t_2 = (x * pow(a, (t + -1.0))) / y;
double tmp;
if (t_1 <= -2000000000000.0) {
tmp = t_2;
} else if (t_1 <= 5e+122) {
tmp = x * ((pow(z, y) / y) * (1.0 / a));
} 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 + (-1.0d0)) * log(a)
t_2 = (x * (a ** (t + (-1.0d0)))) / y
if (t_1 <= (-2000000000000.0d0)) then
tmp = t_2
else if (t_1 <= 5d+122) then
tmp = x * (((z ** y) / y) * (1.0d0 / a))
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 + -1.0) * Math.log(a);
double t_2 = (x * Math.pow(a, (t + -1.0))) / y;
double tmp;
if (t_1 <= -2000000000000.0) {
tmp = t_2;
} else if (t_1 <= 5e+122) {
tmp = x * ((Math.pow(z, y) / y) * (1.0 / a));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t + -1.0) * math.log(a) t_2 = (x * math.pow(a, (t + -1.0))) / y tmp = 0 if t_1 <= -2000000000000.0: tmp = t_2 elif t_1 <= 5e+122: tmp = x * ((math.pow(z, y) / y) * (1.0 / a)) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t + -1.0) * log(a)) t_2 = Float64(Float64(x * (a ^ Float64(t + -1.0))) / y) tmp = 0.0 if (t_1 <= -2000000000000.0) tmp = t_2; elseif (t_1 <= 5e+122) tmp = Float64(x * Float64(Float64((z ^ y) / y) * Float64(1.0 / a))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t + -1.0) * log(a); t_2 = (x * (a ^ (t + -1.0))) / y; tmp = 0.0; if (t_1 <= -2000000000000.0) tmp = t_2; elseif (t_1 <= 5e+122) tmp = x * (((z ^ y) / y) * (1.0 / a)); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t + -1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[t$95$1, -2000000000000.0], t$95$2, If[LessEqual[t$95$1, 5e+122], N[(x * N[(N[(N[Power[z, y], $MachinePrecision] / y), $MachinePrecision] * N[(1.0 / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(t + -1\right) \cdot \log a\\
t_2 := \frac{x \cdot {a}^{\left(t + -1\right)}}{y}\\
\mathbf{if}\;t\_1 \leq -2000000000000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+122}:\\
\;\;\;\;x \cdot \left(\frac{{z}^{y}}{y} \cdot \frac{1}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < -2e12 or 4.99999999999999989e122 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) Initial program 100.0%
Taylor expanded in y around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
lower-/.f64N/A
lower-*.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
lower-+.f64N/A
lower-*.f64N/A
lower-exp.f6474.3
Applied rewrites74.3%
Taylor expanded in b around 0
Applied rewrites90.9%
if -2e12 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < 4.99999999999999989e122Initial program 95.6%
Taylor expanded in t around 0
associate-/l*N/A
lower-*.f64N/A
exp-diffN/A
associate-/l/N/A
lower-/.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
exp-diffN/A
lower-/.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
rem-exp-logN/A
lower-*.f64N/A
lower-exp.f6481.1
Applied rewrites81.1%
Taylor expanded in b around 0
Applied rewrites60.9%
Applied rewrites60.9%
Taylor expanded in b around 0
Applied rewrites75.4%
Final simplification81.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (+ t -1.0) (log a))) (t_2 (/ (* x (pow a (+ t -1.0))) y)))
(if (<= t_1 -50000000.0)
t_2
(if (<= t_1 2e+138) (/ x (* a (* y (exp b)))) t_2))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t + -1.0) * log(a);
double t_2 = (x * pow(a, (t + -1.0))) / y;
double tmp;
if (t_1 <= -50000000.0) {
tmp = t_2;
} else if (t_1 <= 2e+138) {
tmp = x / (a * (y * exp(b)));
} 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 + (-1.0d0)) * log(a)
t_2 = (x * (a ** (t + (-1.0d0)))) / y
if (t_1 <= (-50000000.0d0)) then
tmp = t_2
else if (t_1 <= 2d+138) then
tmp = x / (a * (y * exp(b)))
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 + -1.0) * Math.log(a);
double t_2 = (x * Math.pow(a, (t + -1.0))) / y;
double tmp;
if (t_1 <= -50000000.0) {
tmp = t_2;
} else if (t_1 <= 2e+138) {
tmp = x / (a * (y * Math.exp(b)));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t + -1.0) * math.log(a) t_2 = (x * math.pow(a, (t + -1.0))) / y tmp = 0 if t_1 <= -50000000.0: tmp = t_2 elif t_1 <= 2e+138: tmp = x / (a * (y * math.exp(b))) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t + -1.0) * log(a)) t_2 = Float64(Float64(x * (a ^ Float64(t + -1.0))) / y) tmp = 0.0 if (t_1 <= -50000000.0) tmp = t_2; elseif (t_1 <= 2e+138) tmp = Float64(x / Float64(a * Float64(y * exp(b)))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t + -1.0) * log(a); t_2 = (x * (a ^ (t + -1.0))) / y; tmp = 0.0; if (t_1 <= -50000000.0) tmp = t_2; elseif (t_1 <= 2e+138) tmp = x / (a * (y * exp(b))); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t + -1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[t$95$1, -50000000.0], t$95$2, If[LessEqual[t$95$1, 2e+138], N[(x / N[(a * N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(t + -1\right) \cdot \log a\\
t_2 := \frac{x \cdot {a}^{\left(t + -1\right)}}{y}\\
\mathbf{if}\;t\_1 \leq -50000000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+138}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < -5e7 or 2.0000000000000001e138 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) Initial program 100.0%
Taylor expanded in y around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
lower-/.f64N/A
lower-*.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
lower-+.f64N/A
lower-*.f64N/A
lower-exp.f6475.0
Applied rewrites75.0%
Taylor expanded in b around 0
Applied rewrites91.8%
if -5e7 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < 2.0000000000000001e138Initial program 95.6%
Taylor expanded in t around 0
associate-/l*N/A
lower-*.f64N/A
exp-diffN/A
associate-/l/N/A
lower-/.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
exp-diffN/A
lower-/.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
rem-exp-logN/A
lower-*.f64N/A
lower-exp.f6480.1
Applied rewrites80.1%
Taylor expanded in y around 0
Applied rewrites64.5%
Final simplification74.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* x (exp (- (* y (log z)) b))) y)))
(if (<= y -3.5e+47)
t_1
(if (<= y 0.106) (/ x (* y (exp (- b (* (+ t -1.0) (log a)))))) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x * exp(((y * log(z)) - b))) / y;
double tmp;
if (y <= -3.5e+47) {
tmp = t_1;
} else if (y <= 0.106) {
tmp = x / (y * exp((b - ((t + -1.0) * log(a)))));
} 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 * log(z)) - b))) / y
if (y <= (-3.5d+47)) then
tmp = t_1
else if (y <= 0.106d0) then
tmp = x / (y * exp((b - ((t + (-1.0d0)) * log(a)))))
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 * Math.log(z)) - b))) / y;
double tmp;
if (y <= -3.5e+47) {
tmp = t_1;
} else if (y <= 0.106) {
tmp = x / (y * Math.exp((b - ((t + -1.0) * Math.log(a)))));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x * math.exp(((y * math.log(z)) - b))) / y tmp = 0 if y <= -3.5e+47: tmp = t_1 elif y <= 0.106: tmp = x / (y * math.exp((b - ((t + -1.0) * math.log(a))))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x * exp(Float64(Float64(y * log(z)) - b))) / y) tmp = 0.0 if (y <= -3.5e+47) tmp = t_1; elseif (y <= 0.106) tmp = Float64(x / Float64(y * exp(Float64(b - Float64(Float64(t + -1.0) * log(a)))))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x * exp(((y * log(z)) - b))) / y; tmp = 0.0; if (y <= -3.5e+47) tmp = t_1; elseif (y <= 0.106) tmp = x / (y * exp((b - ((t + -1.0) * log(a))))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x * N[Exp[N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[y, -3.5e+47], t$95$1, If[LessEqual[y, 0.106], N[(x / N[(y * N[Exp[N[(b - N[(N[(t + -1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x \cdot e^{y \cdot \log z - b}}{y}\\
\mathbf{if}\;y \leq -3.5 \cdot 10^{+47}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 0.106:\\
\;\;\;\;\frac{x}{y \cdot e^{b - \left(t + -1\right) \cdot \log a}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -3.50000000000000015e47 or 0.105999999999999997 < y Initial program 100.0%
Taylor expanded in y around inf
lower-*.f64N/A
lower-log.f6491.3
Applied rewrites91.3%
if -3.50000000000000015e47 < y < 0.105999999999999997Initial program 94.1%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
div-invN/A
lift-exp.f64N/A
lift--.f64N/A
exp-diffN/A
clear-numN/A
Applied rewrites95.3%
Taylor expanded in y around 0
lower-*.f64N/A
lower-log.f64N/A
sub-negN/A
metadata-evalN/A
lower-+.f6495.3
Applied rewrites95.3%
Final simplification93.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* x (exp (- (* y (log z)) b))) y)))
(if (<= y -3.4e+44)
t_1
(if (<= y 0.106) (* x (/ (pow a (+ t -1.0)) (* y (exp b)))) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x * exp(((y * log(z)) - b))) / y;
double tmp;
if (y <= -3.4e+44) {
tmp = t_1;
} else if (y <= 0.106) {
tmp = x * (pow(a, (t + -1.0)) / (y * exp(b)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (x * exp(((y * log(z)) - b))) / y
if (y <= (-3.4d+44)) then
tmp = t_1
else if (y <= 0.106d0) then
tmp = x * ((a ** (t + (-1.0d0))) / (y * exp(b)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x * Math.exp(((y * Math.log(z)) - b))) / y;
double tmp;
if (y <= -3.4e+44) {
tmp = t_1;
} else if (y <= 0.106) {
tmp = x * (Math.pow(a, (t + -1.0)) / (y * Math.exp(b)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x * math.exp(((y * math.log(z)) - b))) / y tmp = 0 if y <= -3.4e+44: tmp = t_1 elif y <= 0.106: tmp = x * (math.pow(a, (t + -1.0)) / (y * math.exp(b))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x * exp(Float64(Float64(y * log(z)) - b))) / y) tmp = 0.0 if (y <= -3.4e+44) tmp = t_1; elseif (y <= 0.106) tmp = Float64(x * Float64((a ^ Float64(t + -1.0)) / Float64(y * exp(b)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x * exp(((y * log(z)) - b))) / y; tmp = 0.0; if (y <= -3.4e+44) tmp = t_1; elseif (y <= 0.106) tmp = x * ((a ^ (t + -1.0)) / (y * exp(b))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x * N[Exp[N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[y, -3.4e+44], t$95$1, If[LessEqual[y, 0.106], N[(x * N[(N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision] / N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x \cdot e^{y \cdot \log z - b}}{y}\\
\mathbf{if}\;y \leq -3.4 \cdot 10^{+44}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 0.106:\\
\;\;\;\;x \cdot \frac{{a}^{\left(t + -1\right)}}{y \cdot e^{b}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -3.4e44 or 0.105999999999999997 < y Initial program 100.0%
Taylor expanded in y around inf
lower-*.f64N/A
lower-log.f6491.3
Applied rewrites91.3%
if -3.4e44 < y < 0.105999999999999997Initial program 94.1%
lift-/.f64N/A
clear-numN/A
inv-powN/A
metadata-evalN/A
pow-to-expN/A
lower-exp.f64N/A
lower-*.f64N/A
Applied rewrites37.1%
Taylor expanded in y around 0
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
exp-to-powN/A
lower-pow.f64N/A
sub-negN/A
metadata-evalN/A
lower-+.f64N/A
lower-*.f64N/A
lower-exp.f6484.2
Applied rewrites84.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (/ (exp (- b)) y))))
(if (<= b -2.5e+134)
t_1
(if (<= b 1.65e+85) (/ (* x (pow a (+ t -1.0))) y) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * (exp(-b) / y);
double tmp;
if (b <= -2.5e+134) {
tmp = t_1;
} else if (b <= 1.65e+85) {
tmp = (x * pow(a, (t + -1.0))) / 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(-b) / y)
if (b <= (-2.5d+134)) then
tmp = t_1
else if (b <= 1.65d+85) then
tmp = (x * (a ** (t + (-1.0d0)))) / 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(-b) / y);
double tmp;
if (b <= -2.5e+134) {
tmp = t_1;
} else if (b <= 1.65e+85) {
tmp = (x * Math.pow(a, (t + -1.0))) / y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x * (math.exp(-b) / y) tmp = 0 if b <= -2.5e+134: tmp = t_1 elif b <= 1.65e+85: tmp = (x * math.pow(a, (t + -1.0))) / y else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x * Float64(exp(Float64(-b)) / y)) tmp = 0.0 if (b <= -2.5e+134) tmp = t_1; elseif (b <= 1.65e+85) tmp = Float64(Float64(x * (a ^ Float64(t + -1.0))) / y); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x * (exp(-b) / y); tmp = 0.0; if (b <= -2.5e+134) tmp = t_1; elseif (b <= 1.65e+85) tmp = (x * (a ^ (t + -1.0))) / y; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[(N[Exp[(-b)], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -2.5e+134], t$95$1, If[LessEqual[b, 1.65e+85], N[(N[(x * N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{e^{-b}}{y}\\
\mathbf{if}\;b \leq -2.5 \cdot 10^{+134}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 1.65 \cdot 10^{+85}:\\
\;\;\;\;\frac{x \cdot {a}^{\left(t + -1\right)}}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -2.4999999999999999e134 or 1.65e85 < b Initial program 100.0%
Taylor expanded in y around inf
lower-*.f64N/A
lower-log.f6495.8
Applied rewrites95.8%
Taylor expanded in b around inf
neg-mul-1N/A
lower-neg.f6490.3
Applied rewrites90.3%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6490.3
Applied rewrites90.3%
if -2.4999999999999999e134 < b < 1.65e85Initial program 96.2%
Taylor expanded in y around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
lower-/.f64N/A
lower-*.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
lower-+.f64N/A
lower-*.f64N/A
lower-exp.f6462.9
Applied rewrites62.9%
Taylor expanded in b around 0
Applied rewrites68.2%
Final simplification74.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (/ (exp (- b)) y))))
(if (<= b -0.031)
t_1
(if (<= b 1.3) (* (/ 1.0 a) (* x (/ 1.0 (fma y b y)))) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * (exp(-b) / y);
double tmp;
if (b <= -0.031) {
tmp = t_1;
} else if (b <= 1.3) {
tmp = (1.0 / a) * (x * (1.0 / fma(y, b, y)));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(x * Float64(exp(Float64(-b)) / y)) tmp = 0.0 if (b <= -0.031) tmp = t_1; elseif (b <= 1.3) tmp = Float64(Float64(1.0 / a) * Float64(x * Float64(1.0 / fma(y, b, y)))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[(N[Exp[(-b)], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -0.031], t$95$1, If[LessEqual[b, 1.3], N[(N[(1.0 / a), $MachinePrecision] * N[(x * N[(1.0 / N[(y * b + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{e^{-b}}{y}\\
\mathbf{if}\;b \leq -0.031:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 1.3:\\
\;\;\;\;\frac{1}{a} \cdot \left(x \cdot \frac{1}{\mathsf{fma}\left(y, b, y\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -0.031 or 1.30000000000000004 < b Initial program 100.0%
Taylor expanded in y around inf
lower-*.f64N/A
lower-log.f6489.8
Applied rewrites89.8%
Taylor expanded in b around inf
neg-mul-1N/A
lower-neg.f6474.8
Applied rewrites74.8%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6474.8
Applied rewrites74.8%
if -0.031 < b < 1.30000000000000004Initial program 94.6%
Taylor expanded in t around 0
associate-/l*N/A
lower-*.f64N/A
exp-diffN/A
associate-/l/N/A
lower-/.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
exp-diffN/A
lower-/.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
rem-exp-logN/A
lower-*.f64N/A
lower-exp.f6473.8
Applied rewrites73.8%
Taylor expanded in b around 0
Applied rewrites73.2%
Taylor expanded in y around 0
Applied rewrites35.4%
Applied rewrites35.6%
Final simplification54.7%
(FPCore (x y z t a b)
:precision binary64
(if (<= b 2.75e+44)
(* x (/ (/ 1.0 a) (fma b (fma y (* b 0.5) y) y)))
(*
x
(/ (/ 1.0 a) (fma b (fma b (* y (fma 0.16666666666666666 b 0.5)) y) y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 2.75e+44) {
tmp = x * ((1.0 / a) / fma(b, fma(y, (b * 0.5), y), y));
} else {
tmp = x * ((1.0 / a) / fma(b, fma(b, (y * fma(0.16666666666666666, b, 0.5)), y), y));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= 2.75e+44) tmp = Float64(x * Float64(Float64(1.0 / a) / fma(b, fma(y, Float64(b * 0.5), y), y))); else tmp = Float64(x * Float64(Float64(1.0 / a) / fma(b, fma(b, Float64(y * fma(0.16666666666666666, b, 0.5)), y), y))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, 2.75e+44], N[(x * N[(N[(1.0 / a), $MachinePrecision] / N[(b * N[(y * N[(b * 0.5), $MachinePrecision] + y), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(1.0 / a), $MachinePrecision] / N[(b * N[(b * N[(y * N[(0.16666666666666666 * b + 0.5), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 2.75 \cdot 10^{+44}:\\
\;\;\;\;x \cdot \frac{\frac{1}{a}}{\mathsf{fma}\left(b, \mathsf{fma}\left(y, b \cdot 0.5, y\right), y\right)}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{\frac{1}{a}}{\mathsf{fma}\left(b, \mathsf{fma}\left(b, y \cdot \mathsf{fma}\left(0.16666666666666666, b, 0.5\right), y\right), y\right)}\\
\end{array}
\end{array}
if b < 2.75e44Initial program 96.6%
Taylor expanded in t around 0
associate-/l*N/A
lower-*.f64N/A
exp-diffN/A
associate-/l/N/A
lower-/.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
exp-diffN/A
lower-/.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
rem-exp-logN/A
lower-*.f64N/A
lower-exp.f6467.7
Applied rewrites67.7%
Taylor expanded in b around 0
Applied rewrites56.8%
Taylor expanded in y around 0
Applied rewrites29.4%
Taylor expanded in b around 0
Applied rewrites33.0%
if 2.75e44 < b Initial program 100.0%
Taylor expanded in t around 0
associate-/l*N/A
lower-*.f64N/A
exp-diffN/A
associate-/l/N/A
lower-/.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
exp-diffN/A
lower-/.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
rem-exp-logN/A
lower-*.f64N/A
lower-exp.f6468.7
Applied rewrites68.7%
Taylor expanded in b around 0
Applied rewrites38.6%
Taylor expanded in y around 0
Applied rewrites39.3%
Taylor expanded in b around 0
Applied rewrites65.9%
Final simplification39.6%
(FPCore (x y z t a b) :precision binary64 (* x (/ (/ 1.0 a) (fma b (fma y (* b 0.5) y) y))))
double code(double x, double y, double z, double t, double a, double b) {
return x * ((1.0 / a) / fma(b, fma(y, (b * 0.5), y), y));
}
function code(x, y, z, t, a, b) return Float64(x * Float64(Float64(1.0 / a) / fma(b, fma(y, Float64(b * 0.5), y), y))) end
code[x_, y_, z_, t_, a_, b_] := N[(x * N[(N[(1.0 / a), $MachinePrecision] / N[(b * N[(y * N[(b * 0.5), $MachinePrecision] + y), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot \frac{\frac{1}{a}}{\mathsf{fma}\left(b, \mathsf{fma}\left(y, b \cdot 0.5, y\right), y\right)}
\end{array}
Initial program 97.3%
Taylor expanded in t around 0
associate-/l*N/A
lower-*.f64N/A
exp-diffN/A
associate-/l/N/A
lower-/.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
exp-diffN/A
lower-/.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
rem-exp-logN/A
lower-*.f64N/A
lower-exp.f6467.9
Applied rewrites67.9%
Taylor expanded in b around 0
Applied rewrites53.2%
Taylor expanded in y around 0
Applied rewrites31.4%
Taylor expanded in b around 0
Applied rewrites37.9%
Final simplification37.9%
(FPCore (x y z t a b) :precision binary64 (* x (/ (/ 1.0 a) (fma y b y))))
double code(double x, double y, double z, double t, double a, double b) {
return x * ((1.0 / a) / fma(y, b, y));
}
function code(x, y, z, t, a, b) return Float64(x * Float64(Float64(1.0 / a) / fma(y, b, y))) end
code[x_, y_, z_, t_, a_, b_] := N[(x * N[(N[(1.0 / a), $MachinePrecision] / N[(y * b + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot \frac{\frac{1}{a}}{\mathsf{fma}\left(y, b, y\right)}
\end{array}
Initial program 97.3%
Taylor expanded in t around 0
associate-/l*N/A
lower-*.f64N/A
exp-diffN/A
associate-/l/N/A
lower-/.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
exp-diffN/A
lower-/.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
rem-exp-logN/A
lower-*.f64N/A
lower-exp.f6467.9
Applied rewrites67.9%
Taylor expanded in b around 0
Applied rewrites53.2%
Taylor expanded in y around 0
Applied rewrites31.4%
(FPCore (x y z t a b) :precision binary64 (* (* x 1.0) (/ 1.0 (* a (fma y b y)))))
double code(double x, double y, double z, double t, double a, double b) {
return (x * 1.0) * (1.0 / (a * fma(y, b, y)));
}
function code(x, y, z, t, a, b) return Float64(Float64(x * 1.0) * Float64(1.0 / Float64(a * fma(y, b, y)))) end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x * 1.0), $MachinePrecision] * N[(1.0 / N[(a * N[(y * b + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot 1\right) \cdot \frac{1}{a \cdot \mathsf{fma}\left(y, b, y\right)}
\end{array}
Initial program 97.3%
Taylor expanded in t around 0
associate-/l*N/A
lower-*.f64N/A
exp-diffN/A
associate-/l/N/A
lower-/.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
exp-diffN/A
lower-/.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
rem-exp-logN/A
lower-*.f64N/A
lower-exp.f6467.9
Applied rewrites67.9%
Taylor expanded in b around 0
Applied rewrites53.2%
Applied rewrites48.0%
Taylor expanded in y around 0
Applied rewrites31.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (pow a (- t 1.0)))
(t_2 (/ (* x (/ t_1 y)) (- (+ b 1.0) (* y (log z))))))
(if (< t -0.8845848504127471)
t_2
(if (< t 852031.2288374073)
(/ (* (/ x y) t_1) (exp (- b (* (log z) y))))
t_2))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = pow(a, (t - 1.0));
double t_2 = (x * (t_1 / y)) / ((b + 1.0) - (y * log(z)));
double tmp;
if (t < -0.8845848504127471) {
tmp = t_2;
} else if (t < 852031.2288374073) {
tmp = ((x / y) * t_1) / exp((b - (log(z) * y)));
} 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 = a ** (t - 1.0d0)
t_2 = (x * (t_1 / y)) / ((b + 1.0d0) - (y * log(z)))
if (t < (-0.8845848504127471d0)) then
tmp = t_2
else if (t < 852031.2288374073d0) then
tmp = ((x / y) * t_1) / exp((b - (log(z) * y)))
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.pow(a, (t - 1.0));
double t_2 = (x * (t_1 / y)) / ((b + 1.0) - (y * Math.log(z)));
double tmp;
if (t < -0.8845848504127471) {
tmp = t_2;
} else if (t < 852031.2288374073) {
tmp = ((x / y) * t_1) / Math.exp((b - (Math.log(z) * y)));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = math.pow(a, (t - 1.0)) t_2 = (x * (t_1 / y)) / ((b + 1.0) - (y * math.log(z))) tmp = 0 if t < -0.8845848504127471: tmp = t_2 elif t < 852031.2288374073: tmp = ((x / y) * t_1) / math.exp((b - (math.log(z) * y))) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = a ^ Float64(t - 1.0) t_2 = Float64(Float64(x * Float64(t_1 / y)) / Float64(Float64(b + 1.0) - Float64(y * log(z)))) tmp = 0.0 if (t < -0.8845848504127471) tmp = t_2; elseif (t < 852031.2288374073) tmp = Float64(Float64(Float64(x / y) * t_1) / exp(Float64(b - Float64(log(z) * y)))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a ^ (t - 1.0); t_2 = (x * (t_1 / y)) / ((b + 1.0) - (y * log(z))); tmp = 0.0; if (t < -0.8845848504127471) tmp = t_2; elseif (t < 852031.2288374073) tmp = ((x / y) * t_1) / exp((b - (log(z) * y))); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * N[(t$95$1 / y), $MachinePrecision]), $MachinePrecision] / N[(N[(b + 1.0), $MachinePrecision] - N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t, -0.8845848504127471], t$95$2, If[Less[t, 852031.2288374073], N[(N[(N[(x / y), $MachinePrecision] * t$95$1), $MachinePrecision] / N[Exp[N[(b - N[(N[Log[z], $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := {a}^{\left(t - 1\right)}\\
t_2 := \frac{x \cdot \frac{t\_1}{y}}{\left(b + 1\right) - y \cdot \log z}\\
\mathbf{if}\;t < -0.8845848504127471:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t < 852031.2288374073:\\
\;\;\;\;\frac{\frac{x}{y} \cdot t\_1}{e^{b - \log z \cdot y}}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
herbie shell --seed 2024219
(FPCore (x y z t a b)
:name "Numeric.SpecFunctions:incompleteBetaWorker from math-functions-0.1.5.2, A"
:precision binary64
:alt
(! :herbie-platform default (if (< t -8845848504127471/10000000000000000) (/ (* x (/ (pow a (- t 1)) y)) (- (+ b 1) (* y (log z)))) (if (< t 8520312288374073/10000000000) (/ (* (/ x y) (pow a (- t 1))) (exp (- b (* (log z) y)))) (/ (* x (/ (pow a (- t 1)) y)) (- (+ b 1) (* y (log z)))))))
(/ (* x (exp (- (+ (* y (log z)) (* (- t 1.0) (log a))) b))) y))