
(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 26 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 (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}
Initial program 98.1%
Final simplification98.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* x (exp (- (+ (* y (log z)) (* (+ t -1.0) (log a))) b))) y))
(t_2 (/ x (* y a))))
(if (<= t_1 (- INFINITY))
(fma b (* t_2 (fma b 0.5 -1.0)) t_2)
(if (<= t_1 5e+253)
(/
x
(* a (* y (fma b (fma b (fma b 0.16666666666666666 0.5) 1.0) 1.0))))
(/ (* x 2.0) (* a (* y (* b b))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x * exp((((y * log(z)) + ((t + -1.0) * log(a))) - b))) / y;
double t_2 = x / (y * a);
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = fma(b, (t_2 * fma(b, 0.5, -1.0)), t_2);
} else if (t_1 <= 5e+253) {
tmp = x / (a * (y * fma(b, fma(b, fma(b, 0.16666666666666666, 0.5), 1.0), 1.0)));
} else {
tmp = (x * 2.0) / (a * (y * (b * b)));
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) + Float64(Float64(t + -1.0) * log(a))) - b))) / y) t_2 = Float64(x / Float64(y * a)) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = fma(b, Float64(t_2 * fma(b, 0.5, -1.0)), t_2); elseif (t_1 <= 5e+253) tmp = Float64(x / Float64(a * Float64(y * fma(b, fma(b, fma(b, 0.16666666666666666, 0.5), 1.0), 1.0)))); else tmp = Float64(Float64(x * 2.0) / Float64(a * Float64(y * Float64(b * b)))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = 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]}, Block[{t$95$2 = N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(b * N[(t$95$2 * N[(b * 0.5 + -1.0), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision], If[LessEqual[t$95$1, 5e+253], N[(x / N[(a * N[(y * N[(b * N[(b * N[(b * 0.16666666666666666 + 0.5), $MachinePrecision] + 1.0), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * 2.0), $MachinePrecision] / N[(a * N[(y * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x \cdot e^{\left(y \cdot \log z + \left(t + -1\right) \cdot \log a\right) - b}}{y}\\
t_2 := \frac{x}{y \cdot a}\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;\mathsf{fma}\left(b, t\_2 \cdot \mathsf{fma}\left(b, 0.5, -1\right), t\_2\right)\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+253}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, \mathsf{fma}\left(b, 0.16666666666666666, 0.5\right), 1\right), 1\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot 2}{a \cdot \left(y \cdot \left(b \cdot b\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) < -inf.0Initial 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.f6466.7
Simplified66.7%
Taylor expanded in y around 0
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-exp.f6459.1
Simplified59.1%
Taylor expanded in b around 0
lower-fma.f64N/A
Simplified44.1%
if -inf.0 < (/.f64 (*.f64 x (exp.f64 (-.f64 (+.f64 (*.f64 y (log.f64 z)) (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a))) b))) y) < 4.9999999999999997e253Initial program 96.7%
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.f6471.1
Simplified71.1%
Taylor expanded in y around 0
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-exp.f6459.8
Simplified59.8%
Taylor expanded in b around 0
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f6464.8
Simplified64.8%
if 4.9999999999999997e253 < (/.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 99.8%
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.f6475.5
Simplified75.5%
Taylor expanded in y around 0
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-exp.f6470.8
Simplified70.8%
Taylor expanded in b around 0
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
+-commutativeN/A
lower-fma.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6428.4
Simplified28.4%
Taylor expanded in b around inf
associate-*r/N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6441.2
Simplified41.2%
Final simplification55.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* x (exp (- (+ (* y (log z)) (* (+ t -1.0) (log a))) b))) y)))
(if (<= t_1 -1e+281)
(* (/ x (* y a)) (- 1.0 b))
(if (<= t_1 5e+296)
(/
x
(* a (* y (fma b (fma b (fma b 0.16666666666666666 0.5) 1.0) 1.0))))
(/ (* x 2.0) (* a (* y (* b b))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x * exp((((y * log(z)) + ((t + -1.0) * log(a))) - b))) / y;
double tmp;
if (t_1 <= -1e+281) {
tmp = (x / (y * a)) * (1.0 - b);
} else if (t_1 <= 5e+296) {
tmp = x / (a * (y * fma(b, fma(b, fma(b, 0.16666666666666666, 0.5), 1.0), 1.0)));
} else {
tmp = (x * 2.0) / (a * (y * (b * b)));
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) + Float64(Float64(t + -1.0) * log(a))) - b))) / y) tmp = 0.0 if (t_1 <= -1e+281) tmp = Float64(Float64(x / Float64(y * a)) * Float64(1.0 - b)); elseif (t_1 <= 5e+296) tmp = Float64(x / Float64(a * Float64(y * fma(b, fma(b, fma(b, 0.16666666666666666, 0.5), 1.0), 1.0)))); else tmp = Float64(Float64(x * 2.0) / Float64(a * Float64(y * Float64(b * b)))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = 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]}, If[LessEqual[t$95$1, -1e+281], N[(N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision] * N[(1.0 - b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+296], N[(x / N[(a * N[(y * N[(b * N[(b * N[(b * 0.16666666666666666 + 0.5), $MachinePrecision] + 1.0), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * 2.0), $MachinePrecision] / N[(a * N[(y * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x \cdot e^{\left(y \cdot \log z + \left(t + -1\right) \cdot \log a\right) - b}}{y}\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+281}:\\
\;\;\;\;\frac{x}{y \cdot a} \cdot \left(1 - b\right)\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+296}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, \mathsf{fma}\left(b, 0.16666666666666666, 0.5\right), 1\right), 1\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot 2}{a \cdot \left(y \cdot \left(b \cdot b\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) < -1e281Initial program 99.5%
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.f6464.6
Simplified64.6%
Taylor expanded in y around 0
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-exp.f6457.2
Simplified57.2%
Taylor expanded in b around 0
associate-/l*N/A
associate-*r*N/A
distribute-lft1-inN/A
lower-*.f64N/A
lower-+.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
lower-*.f6433.3
Simplified33.3%
if -1e281 < (/.f64 (*.f64 x (exp.f64 (-.f64 (+.f64 (*.f64 y (log.f64 z)) (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a))) b))) y) < 5.0000000000000001e296Initial program 96.8%
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.f6471.5
Simplified71.5%
Taylor expanded in y around 0
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-exp.f6460.2
Simplified60.2%
Taylor expanded in b around 0
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f6465.1
Simplified65.1%
if 5.0000000000000001e296 < (/.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 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.f6476.7
Simplified76.7%
Taylor expanded in y around 0
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-exp.f6471.9
Simplified71.9%
Taylor expanded in b around 0
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
+-commutativeN/A
lower-fma.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6428.8
Simplified28.8%
Taylor expanded in b around inf
associate-*r/N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6441.8
Simplified41.8%
Final simplification53.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* x (exp (- (+ (* y (log z)) (* (+ t -1.0) (log a))) b))) y)))
(if (<= t_1 -1e+281)
(* (/ x (* y a)) (- 1.0 b))
(if (<= t_1 5e+253)
(/ x (* a (* y (fma b (fma b 0.5 1.0) 1.0))))
(/ (* x 2.0) (* a (* y (* b b))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x * exp((((y * log(z)) + ((t + -1.0) * log(a))) - b))) / y;
double tmp;
if (t_1 <= -1e+281) {
tmp = (x / (y * a)) * (1.0 - b);
} else if (t_1 <= 5e+253) {
tmp = x / (a * (y * fma(b, fma(b, 0.5, 1.0), 1.0)));
} else {
tmp = (x * 2.0) / (a * (y * (b * b)));
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) + Float64(Float64(t + -1.0) * log(a))) - b))) / y) tmp = 0.0 if (t_1 <= -1e+281) tmp = Float64(Float64(x / Float64(y * a)) * Float64(1.0 - b)); elseif (t_1 <= 5e+253) tmp = Float64(x / Float64(a * Float64(y * fma(b, fma(b, 0.5, 1.0), 1.0)))); else tmp = Float64(Float64(x * 2.0) / Float64(a * Float64(y * Float64(b * b)))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = 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]}, If[LessEqual[t$95$1, -1e+281], N[(N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision] * N[(1.0 - b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+253], N[(x / N[(a * N[(y * N[(b * N[(b * 0.5 + 1.0), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * 2.0), $MachinePrecision] / N[(a * N[(y * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x \cdot e^{\left(y \cdot \log z + \left(t + -1\right) \cdot \log a\right) - b}}{y}\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+281}:\\
\;\;\;\;\frac{x}{y \cdot a} \cdot \left(1 - b\right)\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+253}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, 0.5, 1\right), 1\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot 2}{a \cdot \left(y \cdot \left(b \cdot b\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) < -1e281Initial program 99.5%
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.f6464.6
Simplified64.6%
Taylor expanded in y around 0
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-exp.f6457.2
Simplified57.2%
Taylor expanded in b around 0
associate-/l*N/A
associate-*r*N/A
distribute-lft1-inN/A
lower-*.f64N/A
lower-+.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
lower-*.f6433.3
Simplified33.3%
if -1e281 < (/.f64 (*.f64 x (exp.f64 (-.f64 (+.f64 (*.f64 y (log.f64 z)) (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a))) b))) y) < 4.9999999999999997e253Initial program 96.9%
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.f6471.9
Simplified71.9%
Taylor expanded in y around 0
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-exp.f6460.5
Simplified60.5%
Taylor expanded in b around 0
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f6460.1
Simplified60.1%
if 4.9999999999999997e253 < (/.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 99.8%
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.f6475.5
Simplified75.5%
Taylor expanded in y around 0
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-exp.f6470.8
Simplified70.8%
Taylor expanded in b around 0
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
+-commutativeN/A
lower-fma.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6428.4
Simplified28.4%
Taylor expanded in b around inf
associate-*r/N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6441.2
Simplified41.2%
Final simplification50.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* x (exp (- (+ (* y (log z)) (* (+ t -1.0) (log a))) b))) y)))
(if (<= t_1 -5e-274)
(* (/ x (* y a)) (- 1.0 b))
(if (<= t_1 5e+253)
(/ x (* a (fma b (* y (* b 0.5)) y)))
(/ (* x 2.0) (* a (* y (* b b))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x * exp((((y * log(z)) + ((t + -1.0) * log(a))) - b))) / y;
double tmp;
if (t_1 <= -5e-274) {
tmp = (x / (y * a)) * (1.0 - b);
} else if (t_1 <= 5e+253) {
tmp = x / (a * fma(b, (y * (b * 0.5)), y));
} else {
tmp = (x * 2.0) / (a * (y * (b * b)));
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) + Float64(Float64(t + -1.0) * log(a))) - b))) / y) tmp = 0.0 if (t_1 <= -5e-274) tmp = Float64(Float64(x / Float64(y * a)) * Float64(1.0 - b)); elseif (t_1 <= 5e+253) tmp = Float64(x / Float64(a * fma(b, Float64(y * Float64(b * 0.5)), y))); else tmp = Float64(Float64(x * 2.0) / Float64(a * Float64(y * Float64(b * b)))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = 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]}, If[LessEqual[t$95$1, -5e-274], N[(N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision] * N[(1.0 - b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+253], N[(x / N[(a * N[(b * N[(y * N[(b * 0.5), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * 2.0), $MachinePrecision] / N[(a * N[(y * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x \cdot e^{\left(y \cdot \log z + \left(t + -1\right) \cdot \log a\right) - b}}{y}\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{-274}:\\
\;\;\;\;\frac{x}{y \cdot a} \cdot \left(1 - b\right)\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+253}:\\
\;\;\;\;\frac{x}{a \cdot \mathsf{fma}\left(b, y \cdot \left(b \cdot 0.5\right), y\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot 2}{a \cdot \left(y \cdot \left(b \cdot b\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) < -5e-274Initial 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.f6470.2
Simplified70.2%
Taylor expanded in y around 0
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-exp.f6463.1
Simplified63.1%
Taylor expanded in b around 0
associate-/l*N/A
associate-*r*N/A
distribute-lft1-inN/A
lower-*.f64N/A
lower-+.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
lower-*.f6442.6
Simplified42.6%
if -5e-274 < (/.f64 (*.f64 x (exp.f64 (-.f64 (+.f64 (*.f64 y (log.f64 z)) (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a))) b))) y) < 4.9999999999999997e253Initial 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.f6469.9
Simplified69.9%
Taylor expanded in y around 0
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-exp.f6458.0
Simplified58.0%
Taylor expanded in b around 0
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
+-commutativeN/A
lower-fma.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6455.5
Simplified55.5%
Taylor expanded in b around inf
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6455.5
Simplified55.5%
if 4.9999999999999997e253 < (/.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 99.8%
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.f6475.5
Simplified75.5%
Taylor expanded in y around 0
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-exp.f6470.8
Simplified70.8%
Taylor expanded in b around 0
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
+-commutativeN/A
lower-fma.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6428.4
Simplified28.4%
Taylor expanded in b around inf
associate-*r/N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6441.2
Simplified41.2%
Final simplification49.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* x (exp (- (+ (* y (log z)) (* (+ t -1.0) (log a))) b))) y)))
(if (<= t_1 -5e-274)
(* (/ x (* y a)) (- 1.0 b))
(if (<= t_1 5e+253) (/ x (* a (fma y b y))) (/ (/ x y) a)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x * exp((((y * log(z)) + ((t + -1.0) * log(a))) - b))) / y;
double tmp;
if (t_1 <= -5e-274) {
tmp = (x / (y * a)) * (1.0 - b);
} else if (t_1 <= 5e+253) {
tmp = x / (a * fma(y, b, y));
} else {
tmp = (x / y) / a;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) + Float64(Float64(t + -1.0) * log(a))) - b))) / y) tmp = 0.0 if (t_1 <= -5e-274) tmp = Float64(Float64(x / Float64(y * a)) * Float64(1.0 - b)); elseif (t_1 <= 5e+253) tmp = Float64(x / Float64(a * fma(y, b, y))); else tmp = Float64(Float64(x / y) / a); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = 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]}, If[LessEqual[t$95$1, -5e-274], N[(N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision] * N[(1.0 - b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+253], N[(x / N[(a * N[(y * b + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / a), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x \cdot e^{\left(y \cdot \log z + \left(t + -1\right) \cdot \log a\right) - b}}{y}\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{-274}:\\
\;\;\;\;\frac{x}{y \cdot a} \cdot \left(1 - b\right)\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+253}:\\
\;\;\;\;\frac{x}{a \cdot \mathsf{fma}\left(y, b, y\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{a}\\
\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) < -5e-274Initial 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.f6470.2
Simplified70.2%
Taylor expanded in y around 0
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-exp.f6463.1
Simplified63.1%
Taylor expanded in b around 0
associate-/l*N/A
associate-*r*N/A
distribute-lft1-inN/A
lower-*.f64N/A
lower-+.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
lower-*.f6442.6
Simplified42.6%
if -5e-274 < (/.f64 (*.f64 x (exp.f64 (-.f64 (+.f64 (*.f64 y (log.f64 z)) (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a))) b))) y) < 4.9999999999999997e253Initial 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.f6469.9
Simplified69.9%
Taylor expanded in y around 0
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-exp.f6458.0
Simplified58.0%
Taylor expanded in b around 0
distribute-lft-outN/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f6448.5
Simplified48.5%
if 4.9999999999999997e253 < (/.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 99.8%
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.f6466.9
Simplified66.9%
Taylor expanded in b around 0
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
exp-to-powN/A
lower-pow.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
lower-+.f64N/A
lower-/.f6454.3
Simplified54.3%
Taylor expanded in t around 0
lower-/.f6433.6
Simplified33.6%
lift-/.f64N/A
lift-/.f64N/A
*-commutativeN/A
lift-/.f64N/A
un-div-invN/A
lower-/.f6433.6
Applied egg-rr33.6%
Final simplification43.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* x (exp (- (+ (* y (log z)) (* (+ t -1.0) (log a))) b))) y))
(t_2 (/ (/ x y) a)))
(if (<= t_1 -4e+170) t_2 (if (<= t_1 5e+253) (/ x (* a (fma y b y))) t_2))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x * exp((((y * log(z)) + ((t + -1.0) * log(a))) - b))) / y;
double t_2 = (x / y) / a;
double tmp;
if (t_1 <= -4e+170) {
tmp = t_2;
} else if (t_1 <= 5e+253) {
tmp = x / (a * fma(y, b, y));
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) + Float64(Float64(t + -1.0) * log(a))) - b))) / y) t_2 = Float64(Float64(x / y) / a) tmp = 0.0 if (t_1 <= -4e+170) tmp = t_2; elseif (t_1 <= 5e+253) tmp = Float64(x / Float64(a * fma(y, b, y))); else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = 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]}, Block[{t$95$2 = N[(N[(x / y), $MachinePrecision] / a), $MachinePrecision]}, If[LessEqual[t$95$1, -4e+170], t$95$2, If[LessEqual[t$95$1, 5e+253], N[(x / N[(a * N[(y * b + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x \cdot e^{\left(y \cdot \log z + \left(t + -1\right) \cdot \log a\right) - b}}{y}\\
t_2 := \frac{\frac{x}{y}}{a}\\
\mathbf{if}\;t\_1 \leq -4 \cdot 10^{+170}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+253}:\\
\;\;\;\;\frac{x}{a \cdot \mathsf{fma}\left(y, b, y\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\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) < -4.00000000000000014e170 or 4.9999999999999997e253 < (/.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 99.6%
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.f6471.0
Simplified71.0%
Taylor expanded in b around 0
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
exp-to-powN/A
lower-pow.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
lower-+.f64N/A
lower-/.f6455.0
Simplified55.0%
Taylor expanded in t around 0
lower-/.f6434.7
Simplified34.7%
lift-/.f64N/A
lift-/.f64N/A
*-commutativeN/A
lift-/.f64N/A
un-div-invN/A
lower-/.f6434.7
Applied egg-rr34.7%
if -4.00000000000000014e170 < (/.f64 (*.f64 x (exp.f64 (-.f64 (+.f64 (*.f64 y (log.f64 z)) (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a))) b))) y) < 4.9999999999999997e253Initial program 96.9%
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.f6471.7
Simplified71.7%
Taylor expanded in y around 0
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-exp.f6460.3
Simplified60.3%
Taylor expanded in b around 0
distribute-lft-outN/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f6451.2
Simplified51.2%
Final simplification43.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* x (exp (- (+ (* y (log z)) (* (+ t -1.0) (log a))) b))) y))
(t_2 (/ (/ x a) y)))
(if (<= t_1 -1e+281) t_2 (if (<= t_1 0.0) (/ x (* a (fma y b y))) t_2))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x * exp((((y * log(z)) + ((t + -1.0) * log(a))) - b))) / y;
double t_2 = (x / a) / y;
double tmp;
if (t_1 <= -1e+281) {
tmp = t_2;
} else if (t_1 <= 0.0) {
tmp = x / (a * fma(y, b, y));
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) + Float64(Float64(t + -1.0) * log(a))) - b))) / y) t_2 = Float64(Float64(x / a) / y) tmp = 0.0 if (t_1 <= -1e+281) tmp = t_2; elseif (t_1 <= 0.0) tmp = Float64(x / Float64(a * fma(y, b, y))); else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = 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]}, Block[{t$95$2 = N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+281], t$95$2, If[LessEqual[t$95$1, 0.0], N[(x / N[(a * N[(y * b + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x \cdot e^{\left(y \cdot \log z + \left(t + -1\right) \cdot \log a\right) - b}}{y}\\
t_2 := \frac{\frac{x}{a}}{y}\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+281}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;\frac{x}{a \cdot \mathsf{fma}\left(y, b, y\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\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) < -1e281 or -0.0 < (/.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 99.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.f6472.7
Simplified72.7%
Taylor expanded in b around 0
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
exp-to-powN/A
lower-pow.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
lower-+.f64N/A
lower-/.f6456.8
Simplified56.8%
Taylor expanded in t around 0
lower-/.f6437.7
Simplified37.7%
lift-/.f64N/A
associate-*r/N/A
lower-/.f64N/A
*-commutativeN/A
lift-/.f64N/A
div-invN/A
lower-/.f6437.7
Applied egg-rr37.7%
if -1e281 < (/.f64 (*.f64 x (exp.f64 (-.f64 (+.f64 (*.f64 y (log.f64 z)) (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a))) b))) y) < -0.0Initial 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.f6470.3
Simplified70.3%
Taylor expanded in y around 0
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-exp.f6458.2
Simplified58.2%
Taylor expanded in b around 0
distribute-lft-outN/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f6448.6
Simplified48.6%
Final simplification43.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* x (exp (- (+ (* y (log z)) (* (+ t -1.0) (log a))) b))) y))
(t_2 (/ x (* y a))))
(if (<= t_1 (- INFINITY))
t_2
(if (<= t_1 1e+139) (/ x (* a (fma y b y))) t_2))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x * exp((((y * log(z)) + ((t + -1.0) * log(a))) - b))) / y;
double t_2 = x / (y * a);
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = t_2;
} else if (t_1 <= 1e+139) {
tmp = x / (a * fma(y, b, y));
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) + Float64(Float64(t + -1.0) * log(a))) - b))) / y) t_2 = Float64(x / Float64(y * a)) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = t_2; elseif (t_1 <= 1e+139) tmp = Float64(x / Float64(a * fma(y, b, y))); else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = 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]}, Block[{t$95$2 = N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], t$95$2, If[LessEqual[t$95$1, 1e+139], N[(x / N[(a * N[(y * b + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x \cdot e^{\left(y \cdot \log z + \left(t + -1\right) \cdot \log a\right) - b}}{y}\\
t_2 := \frac{x}{y \cdot a}\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 10^{+139}:\\
\;\;\;\;\frac{x}{a \cdot \mathsf{fma}\left(y, b, y\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\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) < -inf.0 or 1.00000000000000003e139 < (/.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 99.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.f6472.3
Simplified72.3%
Taylor expanded in y around 0
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-exp.f6466.4
Simplified66.4%
Taylor expanded in b around 0
lower-/.f64N/A
lower-*.f6433.9
Simplified33.9%
if -inf.0 < (/.f64 (*.f64 x (exp.f64 (-.f64 (+.f64 (*.f64 y (log.f64 z)) (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a))) b))) y) < 1.00000000000000003e139Initial program 96.9%
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.f6470.5
Simplified70.5%
Taylor expanded in y around 0
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-exp.f6459.0
Simplified59.0%
Taylor expanded in b around 0
distribute-lft-outN/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f6449.9
Simplified49.9%
Final simplification42.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 -50000.0)
t_2
(if (<= t_1 -20.0)
(/ x (* a (* y (exp b))))
(if (<= t_1 5e+157) (/ (* 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 <= -50000.0) {
tmp = t_2;
} else if (t_1 <= -20.0) {
tmp = x / (a * (y * exp(b)));
} else if (t_1 <= 5e+157) {
tmp = (x * exp(((y * log(z)) - b))) / 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 = (t + (-1.0d0)) * log(a)
t_2 = (x * exp(((t * log(a)) - b))) / y
if (t_1 <= (-50000.0d0)) then
tmp = t_2
else if (t_1 <= (-20.0d0)) then
tmp = x / (a * (y * exp(b)))
else if (t_1 <= 5d+157) then
tmp = (x * exp(((y * log(z)) - b))) / 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 = (t + -1.0) * Math.log(a);
double t_2 = (x * Math.exp(((t * Math.log(a)) - b))) / y;
double tmp;
if (t_1 <= -50000.0) {
tmp = t_2;
} else if (t_1 <= -20.0) {
tmp = x / (a * (y * Math.exp(b)));
} else if (t_1 <= 5e+157) {
tmp = (x * Math.exp(((y * Math.log(z)) - b))) / y;
} 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.exp(((t * math.log(a)) - b))) / y tmp = 0 if t_1 <= -50000.0: tmp = t_2 elif t_1 <= -20.0: tmp = x / (a * (y * math.exp(b))) elif t_1 <= 5e+157: tmp = (x * math.exp(((y * math.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 <= -50000.0) tmp = t_2; elseif (t_1 <= -20.0) tmp = Float64(x / Float64(a * Float64(y * exp(b)))); elseif (t_1 <= 5e+157) tmp = Float64(Float64(x * exp(Float64(Float64(y * log(z)) - b))) / y); 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 * exp(((t * log(a)) - b))) / y; tmp = 0.0; if (t_1 <= -50000.0) tmp = t_2; elseif (t_1 <= -20.0) tmp = x / (a * (y * exp(b))); elseif (t_1 <= 5e+157) tmp = (x * exp(((y * log(z)) - b))) / y; 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[Exp[N[(N[(t * N[Log[a], $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[t$95$1, -50000.0], t$95$2, If[LessEqual[t$95$1, -20.0], N[(x / N[(a * N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+157], 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 -50000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq -20:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+157}:\\
\;\;\;\;\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)) < -5e4 or 4.99999999999999976e157 < (*.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.8
Simplified94.8%
if -5e4 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < -20Initial program 93.8%
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
Simplified95.6%
Taylor expanded in y around 0
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-exp.f6486.5
Simplified86.5%
if -20 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < 4.99999999999999976e157Initial program 99.4%
Taylor expanded in y around inf
lower-*.f64N/A
lower-log.f6480.1
Simplified80.1%
Final simplification87.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 -4e+40)
t_2
(if (<= t_1 -20.0)
(/ x (* a (* y (exp b))))
(if (<= t_1 5e+157) (/ (* 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 <= -4e+40) {
tmp = t_2;
} else if (t_1 <= -20.0) {
tmp = x / (a * (y * exp(b)));
} else if (t_1 <= 5e+157) {
tmp = (x * exp(((y * log(z)) - b))) / 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 = (t + (-1.0d0)) * log(a)
t_2 = x * ((a ** (t + (-1.0d0))) / y)
if (t_1 <= (-4d+40)) then
tmp = t_2
else if (t_1 <= (-20.0d0)) then
tmp = x / (a * (y * exp(b)))
else if (t_1 <= 5d+157) then
tmp = (x * exp(((y * log(z)) - b))) / 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 = (t + -1.0) * Math.log(a);
double t_2 = x * (Math.pow(a, (t + -1.0)) / y);
double tmp;
if (t_1 <= -4e+40) {
tmp = t_2;
} else if (t_1 <= -20.0) {
tmp = x / (a * (y * Math.exp(b)));
} else if (t_1 <= 5e+157) {
tmp = (x * Math.exp(((y * Math.log(z)) - b))) / y;
} 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 <= -4e+40: tmp = t_2 elif t_1 <= -20.0: tmp = x / (a * (y * math.exp(b))) elif t_1 <= 5e+157: tmp = (x * math.exp(((y * math.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(x * Float64((a ^ Float64(t + -1.0)) / y)) tmp = 0.0 if (t_1 <= -4e+40) tmp = t_2; elseif (t_1 <= -20.0) tmp = Float64(x / Float64(a * Float64(y * exp(b)))); elseif (t_1 <= 5e+157) tmp = Float64(Float64(x * exp(Float64(Float64(y * log(z)) - b))) / y); 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 <= -4e+40) tmp = t_2; elseif (t_1 <= -20.0) tmp = x / (a * (y * exp(b))); elseif (t_1 <= 5e+157) tmp = (x * exp(((y * log(z)) - b))) / y; 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[(x * N[(N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -4e+40], t$95$2, If[LessEqual[t$95$1, -20.0], N[(x / N[(a * N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+157], 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 := x \cdot \frac{{a}^{\left(t + -1\right)}}{y}\\
\mathbf{if}\;t\_1 \leq -4 \cdot 10^{+40}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq -20:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+157}:\\
\;\;\;\;\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)) < -4.00000000000000012e40 or 4.99999999999999976e157 < (*.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.f6464.4
Simplified64.4%
Taylor expanded in b around 0
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
exp-to-powN/A
lower-pow.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
lower-+.f64N/A
lower-/.f6477.2
Simplified77.2%
lift-+.f64N/A
lift-pow.f64N/A
div-invN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
metadata-evalN/A
associate-*l/N/A
metadata-evalN/A
*-lft-identityN/A
lower-/.f6487.6
Applied egg-rr87.6%
if -4.00000000000000012e40 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < -20Initial program 94.5%
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.f6494.8
Simplified94.8%
Taylor expanded in y around 0
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-exp.f6484.2
Simplified84.2%
if -20 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < 4.99999999999999976e157Initial program 99.4%
Taylor expanded in y around inf
lower-*.f64N/A
lower-log.f6480.1
Simplified80.1%
Final simplification83.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 -4e+40)
t_2
(if (<= t_1 110.0)
(/ x (* a (* y (exp b))))
(if (<= t_1 5e+157) (* 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 <= -4e+40) {
tmp = t_2;
} else if (t_1 <= 110.0) {
tmp = x / (a * (y * exp(b)));
} else if (t_1 <= 5e+157) {
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 <= (-4d+40)) then
tmp = t_2
else if (t_1 <= 110.0d0) then
tmp = x / (a * (y * exp(b)))
else if (t_1 <= 5d+157) 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 <= -4e+40) {
tmp = t_2;
} else if (t_1 <= 110.0) {
tmp = x / (a * (y * Math.exp(b)));
} else if (t_1 <= 5e+157) {
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 <= -4e+40: tmp = t_2 elif t_1 <= 110.0: tmp = x / (a * (y * math.exp(b))) elif t_1 <= 5e+157: 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(x * Float64((a ^ Float64(t + -1.0)) / y)) tmp = 0.0 if (t_1 <= -4e+40) tmp = t_2; elseif (t_1 <= 110.0) tmp = Float64(x / Float64(a * Float64(y * exp(b)))); elseif (t_1 <= 5e+157) 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 <= -4e+40) tmp = t_2; elseif (t_1 <= 110.0) tmp = x / (a * (y * exp(b))); elseif (t_1 <= 5e+157) 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[(x * N[(N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -4e+40], t$95$2, If[LessEqual[t$95$1, 110.0], N[(x / N[(a * N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+157], 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 := x \cdot \frac{{a}^{\left(t + -1\right)}}{y}\\
\mathbf{if}\;t\_1 \leq -4 \cdot 10^{+40}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 110:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+157}:\\
\;\;\;\;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)) < -4.00000000000000012e40 or 4.99999999999999976e157 < (*.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.f6464.4
Simplified64.4%
Taylor expanded in b around 0
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
exp-to-powN/A
lower-pow.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
lower-+.f64N/A
lower-/.f6477.2
Simplified77.2%
lift-+.f64N/A
lift-pow.f64N/A
div-invN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
metadata-evalN/A
associate-*l/N/A
metadata-evalN/A
*-lft-identityN/A
lower-/.f6487.6
Applied egg-rr87.6%
if -4.00000000000000012e40 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < 110Initial program 95.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.f6494.2
Simplified94.2%
Taylor expanded in y around 0
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-exp.f6484.7
Simplified84.7%
if 110 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < 4.99999999999999976e157Initial program 99.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.f6477.5
Simplified77.5%
Taylor expanded in b around 0
lower-/.f64N/A
lower-pow.f64N/A
*-commutativeN/A
lower-*.f6471.8
Simplified71.8%
Final simplification81.6%
(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 -4e+40)
t_2
(if (<= t_1 5e+43) (* x (/ (/ (pow z y) 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 * exp(((t * log(a)) - b))) / y;
double tmp;
if (t_1 <= -4e+40) {
tmp = t_2;
} else if (t_1 <= 5e+43) {
tmp = x * ((pow(z, y) / 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 * exp(((t * log(a)) - b))) / y
if (t_1 <= (-4d+40)) then
tmp = t_2
else if (t_1 <= 5d+43) then
tmp = x * (((z ** y) / 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.exp(((t * Math.log(a)) - b))) / y;
double tmp;
if (t_1 <= -4e+40) {
tmp = t_2;
} else if (t_1 <= 5e+43) {
tmp = x * ((Math.pow(z, y) / 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.exp(((t * math.log(a)) - b))) / y tmp = 0 if t_1 <= -4e+40: tmp = t_2 elif t_1 <= 5e+43: tmp = x * ((math.pow(z, y) / 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 * exp(Float64(Float64(t * log(a)) - b))) / y) tmp = 0.0 if (t_1 <= -4e+40) tmp = t_2; elseif (t_1 <= 5e+43) tmp = Float64(x * Float64(Float64((z ^ y) / 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 * exp(((t * log(a)) - b))) / y; tmp = 0.0; if (t_1 <= -4e+40) tmp = t_2; elseif (t_1 <= 5e+43) tmp = x * (((z ^ y) / 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[Exp[N[(N[(t * N[Log[a], $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[t$95$1, -4e+40], t$95$2, If[LessEqual[t$95$1, 5e+43], N[(x * N[(N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision] / 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 e^{t \cdot \log a - b}}{y}\\
\mathbf{if}\;t\_1 \leq -4 \cdot 10^{+40}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+43}:\\
\;\;\;\;x \cdot \frac{\frac{{z}^{y}}{a}}{y \cdot e^{b}}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < -4.00000000000000012e40 or 5.0000000000000004e43 < (*.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-log91.6
Simplified91.6%
if -4.00000000000000012e40 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < 5.0000000000000004e43Initial program 96.7%
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.f6490.2
Simplified90.2%
Final simplification90.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 -4e+40)
t_2
(if (<= t_1 5e+151) (/ 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 <= -4e+40) {
tmp = t_2;
} else if (t_1 <= 5e+151) {
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 <= (-4d+40)) then
tmp = t_2
else if (t_1 <= 5d+151) 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 <= -4e+40) {
tmp = t_2;
} else if (t_1 <= 5e+151) {
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 <= -4e+40: tmp = t_2 elif t_1 <= 5e+151: 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(x * Float64((a ^ Float64(t + -1.0)) / y)) tmp = 0.0 if (t_1 <= -4e+40) tmp = t_2; elseif (t_1 <= 5e+151) 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 <= -4e+40) tmp = t_2; elseif (t_1 <= 5e+151) 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[(x * N[(N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -4e+40], t$95$2, If[LessEqual[t$95$1, 5e+151], 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 := x \cdot \frac{{a}^{\left(t + -1\right)}}{y}\\
\mathbf{if}\;t\_1 \leq -4 \cdot 10^{+40}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+151}:\\
\;\;\;\;\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)) < -4.00000000000000012e40 or 5.0000000000000002e151 < (*.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.f6464.5
Simplified64.5%
Taylor expanded in b around 0
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
exp-to-powN/A
lower-pow.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
lower-+.f64N/A
lower-/.f6476.8
Simplified76.8%
lift-+.f64N/A
lift-pow.f64N/A
div-invN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
metadata-evalN/A
associate-*l/N/A
metadata-evalN/A
*-lft-identityN/A
lower-/.f6486.9
Applied egg-rr86.9%
if -4.00000000000000012e40 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < 5.0000000000000002e151Initial program 97.1%
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.f6487.0
Simplified87.0%
Taylor expanded in y around 0
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-exp.f6474.6
Simplified74.6%
Final simplification78.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (/ (pow z y) y))))
(if (<= y -1.6)
t_1
(if (<= y -2.8e-124)
(/ x (fma (* y 0.5) (* a (* b b)) (* a (fma y b y))))
(if (<= y 3.85e+15) (/ (* x (exp (- b))) y) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * (pow(z, y) / y);
double tmp;
if (y <= -1.6) {
tmp = t_1;
} else if (y <= -2.8e-124) {
tmp = x / fma((y * 0.5), (a * (b * b)), (a * fma(y, b, y)));
} else if (y <= 3.85e+15) {
tmp = (x * exp(-b)) / y;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(x * Float64((z ^ y) / y)) tmp = 0.0 if (y <= -1.6) tmp = t_1; elseif (y <= -2.8e-124) tmp = Float64(x / fma(Float64(y * 0.5), Float64(a * Float64(b * b)), Float64(a * fma(y, b, y)))); elseif (y <= 3.85e+15) tmp = Float64(Float64(x * exp(Float64(-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[Power[z, y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.6], t$95$1, If[LessEqual[y, -2.8e-124], N[(x / N[(N[(y * 0.5), $MachinePrecision] * N[(a * N[(b * b), $MachinePrecision]), $MachinePrecision] + N[(a * N[(y * b + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.85e+15], N[(N[(x * N[Exp[(-b)], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{{z}^{y}}{y}\\
\mathbf{if}\;y \leq -1.6:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -2.8 \cdot 10^{-124}:\\
\;\;\;\;\frac{x}{\mathsf{fma}\left(y \cdot 0.5, a \cdot \left(b \cdot b\right), a \cdot \mathsf{fma}\left(y, b, y\right)\right)}\\
\mathbf{elif}\;y \leq 3.85 \cdot 10^{+15}:\\
\;\;\;\;\frac{x \cdot e^{-b}}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.6000000000000001 or 3.85e15 < y Initial program 100.0%
Taylor expanded in y around inf
lower-*.f64N/A
lower-log.f6483.5
Simplified83.5%
Taylor expanded in b around 0
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-pow.f6480.1
Simplified80.1%
lift-pow.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l/N/A
lower-*.f64N/A
lower-/.f6480.1
Applied egg-rr80.1%
if -1.6000000000000001 < y < -2.79999999999999998e-124Initial program 93.9%
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.f6483.5
Simplified83.5%
Taylor expanded in y around 0
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-exp.f6482.9
Simplified82.9%
Taylor expanded in b around 0
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
+-commutativeN/A
lower-fma.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6460.1
Simplified60.1%
lift-*.f64N/A
lift-fma.f64N/A
lift-fma.f64N/A
distribute-lft-inN/A
*-commutativeN/A
lift-*.f64N/A
associate-+l+N/A
distribute-rgt-inN/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
associate-*l*N/A
associate-*l*N/A
lower-fma.f64N/A
Applied egg-rr63.2%
if -2.79999999999999998e-124 < y < 3.85e15Initial program 97.1%
Taylor expanded in y around inf
lower-*.f64N/A
lower-log.f6456.9
Simplified56.9%
Taylor expanded in y around 0
lower-/.f64N/A
lower-*.f64N/A
lower-exp.f64N/A
lower-neg.f6456.9
Simplified56.9%
Final simplification68.5%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -5.8e+111)
(/ (* x (exp (- b))) y)
(if (<= b 1.85e+100)
(* x (/ (pow a (+ t -1.0)) y))
(/
x
(* a (* y (fma b (fma b (fma b 0.16666666666666666 0.5) 1.0) 1.0)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -5.8e+111) {
tmp = (x * exp(-b)) / y;
} else if (b <= 1.85e+100) {
tmp = x * (pow(a, (t + -1.0)) / y);
} else {
tmp = x / (a * (y * fma(b, fma(b, fma(b, 0.16666666666666666, 0.5), 1.0), 1.0)));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -5.8e+111) tmp = Float64(Float64(x * exp(Float64(-b))) / y); elseif (b <= 1.85e+100) tmp = Float64(x * Float64((a ^ Float64(t + -1.0)) / y)); else tmp = Float64(x / Float64(a * Float64(y * fma(b, fma(b, fma(b, 0.16666666666666666, 0.5), 1.0), 1.0)))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -5.8e+111], N[(N[(x * N[Exp[(-b)], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[b, 1.85e+100], N[(x * N[(N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x / N[(a * N[(y * N[(b * N[(b * N[(b * 0.16666666666666666 + 0.5), $MachinePrecision] + 1.0), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -5.8 \cdot 10^{+111}:\\
\;\;\;\;\frac{x \cdot e^{-b}}{y}\\
\mathbf{elif}\;b \leq 1.85 \cdot 10^{+100}:\\
\;\;\;\;x \cdot \frac{{a}^{\left(t + -1\right)}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, \mathsf{fma}\left(b, 0.16666666666666666, 0.5\right), 1\right), 1\right)\right)}\\
\end{array}
\end{array}
if b < -5.7999999999999999e111Initial program 100.0%
Taylor expanded in y around inf
lower-*.f64N/A
lower-log.f6491.1
Simplified91.1%
Taylor expanded in y around 0
lower-/.f64N/A
lower-*.f64N/A
lower-exp.f64N/A
lower-neg.f6484.3
Simplified84.3%
if -5.7999999999999999e111 < b < 1.8500000000000001e100Initial program 97.1%
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.f6467.3
Simplified67.3%
Taylor expanded in b around 0
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
exp-to-powN/A
lower-pow.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
lower-+.f64N/A
lower-/.f6463.6
Simplified63.6%
lift-+.f64N/A
lift-pow.f64N/A
div-invN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
metadata-evalN/A
associate-*l/N/A
metadata-evalN/A
*-lft-identityN/A
lower-/.f6469.5
Applied egg-rr69.5%
if 1.8500000000000001e100 < 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.f6480.5
Simplified80.5%
Taylor expanded in y around 0
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-exp.f6489.3
Simplified89.3%
Taylor expanded in b around 0
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f6489.3
Simplified89.3%
Final simplification75.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (/ (pow z y) y))))
(if (<= y -1.6)
t_1
(if (<= y 3.85e+15)
(/ x (fma (* y 0.5) (* a (* b b)) (* a (fma y b y))))
t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * (pow(z, y) / y);
double tmp;
if (y <= -1.6) {
tmp = t_1;
} else if (y <= 3.85e+15) {
tmp = x / fma((y * 0.5), (a * (b * b)), (a * fma(y, b, y)));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(x * Float64((z ^ y) / y)) tmp = 0.0 if (y <= -1.6) tmp = t_1; elseif (y <= 3.85e+15) tmp = Float64(x / fma(Float64(y * 0.5), Float64(a * Float64(b * b)), Float64(a * 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[Power[z, y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.6], t$95$1, If[LessEqual[y, 3.85e+15], N[(x / N[(N[(y * 0.5), $MachinePrecision] * N[(a * N[(b * b), $MachinePrecision]), $MachinePrecision] + N[(a * N[(y * b + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{{z}^{y}}{y}\\
\mathbf{if}\;y \leq -1.6:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 3.85 \cdot 10^{+15}:\\
\;\;\;\;\frac{x}{\mathsf{fma}\left(y \cdot 0.5, a \cdot \left(b \cdot b\right), a \cdot \mathsf{fma}\left(y, b, y\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.6000000000000001 or 3.85e15 < y Initial program 100.0%
Taylor expanded in y around inf
lower-*.f64N/A
lower-log.f6483.5
Simplified83.5%
Taylor expanded in b around 0
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-pow.f6480.1
Simplified80.1%
lift-pow.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l/N/A
lower-*.f64N/A
lower-/.f6480.1
Applied egg-rr80.1%
if -1.6000000000000001 < y < 3.85e15Initial program 96.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.f6474.6
Simplified74.6%
Taylor expanded in y around 0
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-exp.f6474.9
Simplified74.9%
Taylor expanded in b around 0
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
+-commutativeN/A
lower-fma.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6445.3
Simplified45.3%
lift-*.f64N/A
lift-fma.f64N/A
lift-fma.f64N/A
distribute-lft-inN/A
*-commutativeN/A
lift-*.f64N/A
associate-+l+N/A
distribute-rgt-inN/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
associate-*l*N/A
associate-*l*N/A
lower-fma.f64N/A
Applied egg-rr50.7%
Final simplification64.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma y (* b 0.5) y))
(t_2 (fma t_1 (- b) y))
(t_3 (* a (fma b t_1 (- y))))
(t_4 (/ x (* y a)))
(t_5 (fma (fma b 0.5 1.0) (* y b) y)))
(if (<= b -2.55e+26)
(fma
b
(fma b (* (* b t_4) -0.16666666666666666) (* t_4 (fma b 0.5 -1.0)))
t_4)
(if (<= b -1.05e-262)
(/ x (/ (* a (* t_5 t_2)) t_2))
(if (<= b 2.6e-90)
(/ x (* b (* b (fma (/ y b) (+ a (/ a b)) (* a (* y 0.5))))))
(if (<= b 1450000000.0)
(/ x (/ (* (* a t_5) t_3) t_3))
(/
x
(*
a
(*
y
(fma b (fma b (fma b 0.16666666666666666 0.5) 1.0) 1.0))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma(y, (b * 0.5), y);
double t_2 = fma(t_1, -b, y);
double t_3 = a * fma(b, t_1, -y);
double t_4 = x / (y * a);
double t_5 = fma(fma(b, 0.5, 1.0), (y * b), y);
double tmp;
if (b <= -2.55e+26) {
tmp = fma(b, fma(b, ((b * t_4) * -0.16666666666666666), (t_4 * fma(b, 0.5, -1.0))), t_4);
} else if (b <= -1.05e-262) {
tmp = x / ((a * (t_5 * t_2)) / t_2);
} else if (b <= 2.6e-90) {
tmp = x / (b * (b * fma((y / b), (a + (a / b)), (a * (y * 0.5)))));
} else if (b <= 1450000000.0) {
tmp = x / (((a * t_5) * t_3) / t_3);
} else {
tmp = x / (a * (y * fma(b, fma(b, fma(b, 0.16666666666666666, 0.5), 1.0), 1.0)));
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = fma(y, Float64(b * 0.5), y) t_2 = fma(t_1, Float64(-b), y) t_3 = Float64(a * fma(b, t_1, Float64(-y))) t_4 = Float64(x / Float64(y * a)) t_5 = fma(fma(b, 0.5, 1.0), Float64(y * b), y) tmp = 0.0 if (b <= -2.55e+26) tmp = fma(b, fma(b, Float64(Float64(b * t_4) * -0.16666666666666666), Float64(t_4 * fma(b, 0.5, -1.0))), t_4); elseif (b <= -1.05e-262) tmp = Float64(x / Float64(Float64(a * Float64(t_5 * t_2)) / t_2)); elseif (b <= 2.6e-90) tmp = Float64(x / Float64(b * Float64(b * fma(Float64(y / b), Float64(a + Float64(a / b)), Float64(a * Float64(y * 0.5)))))); elseif (b <= 1450000000.0) tmp = Float64(x / Float64(Float64(Float64(a * t_5) * t_3) / t_3)); else tmp = Float64(x / Float64(a * Float64(y * fma(b, fma(b, fma(b, 0.16666666666666666, 0.5), 1.0), 1.0)))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * N[(b * 0.5), $MachinePrecision] + y), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * (-b) + y), $MachinePrecision]}, Block[{t$95$3 = N[(a * N[(b * t$95$1 + (-y)), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(b * 0.5 + 1.0), $MachinePrecision] * N[(y * b), $MachinePrecision] + y), $MachinePrecision]}, If[LessEqual[b, -2.55e+26], N[(b * N[(b * N[(N[(b * t$95$4), $MachinePrecision] * -0.16666666666666666), $MachinePrecision] + N[(t$95$4 * N[(b * 0.5 + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$4), $MachinePrecision], If[LessEqual[b, -1.05e-262], N[(x / N[(N[(a * N[(t$95$5 * t$95$2), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.6e-90], N[(x / N[(b * N[(b * N[(N[(y / b), $MachinePrecision] * N[(a + N[(a / b), $MachinePrecision]), $MachinePrecision] + N[(a * N[(y * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1450000000.0], N[(x / N[(N[(N[(a * t$95$5), $MachinePrecision] * t$95$3), $MachinePrecision] / t$95$3), $MachinePrecision]), $MachinePrecision], N[(x / N[(a * N[(y * N[(b * N[(b * N[(b * 0.16666666666666666 + 0.5), $MachinePrecision] + 1.0), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(y, b \cdot 0.5, y\right)\\
t_2 := \mathsf{fma}\left(t\_1, -b, y\right)\\
t_3 := a \cdot \mathsf{fma}\left(b, t\_1, -y\right)\\
t_4 := \frac{x}{y \cdot a}\\
t_5 := \mathsf{fma}\left(\mathsf{fma}\left(b, 0.5, 1\right), y \cdot b, y\right)\\
\mathbf{if}\;b \leq -2.55 \cdot 10^{+26}:\\
\;\;\;\;\mathsf{fma}\left(b, \mathsf{fma}\left(b, \left(b \cdot t\_4\right) \cdot -0.16666666666666666, t\_4 \cdot \mathsf{fma}\left(b, 0.5, -1\right)\right), t\_4\right)\\
\mathbf{elif}\;b \leq -1.05 \cdot 10^{-262}:\\
\;\;\;\;\frac{x}{\frac{a \cdot \left(t\_5 \cdot t\_2\right)}{t\_2}}\\
\mathbf{elif}\;b \leq 2.6 \cdot 10^{-90}:\\
\;\;\;\;\frac{x}{b \cdot \left(b \cdot \mathsf{fma}\left(\frac{y}{b}, a + \frac{a}{b}, a \cdot \left(y \cdot 0.5\right)\right)\right)}\\
\mathbf{elif}\;b \leq 1450000000:\\
\;\;\;\;\frac{x}{\frac{\left(a \cdot t\_5\right) \cdot t\_3}{t\_3}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, \mathsf{fma}\left(b, 0.16666666666666666, 0.5\right), 1\right), 1\right)\right)}\\
\end{array}
\end{array}
if b < -2.5499999999999999e26Initial 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.f6469.0
Simplified69.0%
Taylor expanded in y around 0
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-exp.f6475.4
Simplified75.4%
Taylor expanded in b around 0
Simplified63.6%
if -2.5499999999999999e26 < b < -1.05e-262Initial program 95.5%
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.3
Simplified67.3%
Taylor expanded in y around 0
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-exp.f6449.5
Simplified49.5%
Taylor expanded in b around 0
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
+-commutativeN/A
lower-fma.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6446.2
Simplified46.2%
lift-*.f64N/A
lift-fma.f64N/A
flip-+N/A
frac-2negN/A
associate-*r/N/A
lower-/.f64N/A
Applied egg-rr61.4%
if -1.05e-262 < b < 2.6e-90Initial 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.f6473.0
Simplified73.0%
Taylor expanded in y around 0
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-exp.f6442.0
Simplified42.0%
Taylor expanded in b around 0
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
+-commutativeN/A
lower-fma.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6442.0
Simplified42.0%
Taylor expanded in b around inf
unpow2N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
+-commutativeN/A
associate-/l*N/A
unpow2N/A
times-fracN/A
distribute-rgt-outN/A
lower-fma.f64N/A
lower-/.f64N/A
lower-+.f64N/A
lower-/.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6455.8
Simplified55.8%
if 2.6e-90 < b < 1.45e9Initial program 97.8%
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.f6479.4
Simplified79.4%
Taylor expanded in y around 0
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-exp.f6451.8
Simplified51.8%
Taylor expanded in b around 0
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
+-commutativeN/A
lower-fma.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6441.4
Simplified41.4%
lift-*.f64N/A
lift-fma.f64N/A
distribute-lft-inN/A
flip-+N/A
lower-/.f64N/A
Applied egg-rr61.3%
if 1.45e9 < 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.f6472.3
Simplified72.3%
Taylor expanded in y around 0
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-exp.f6480.6
Simplified80.6%
Taylor expanded in b around 0
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f6474.3
Simplified74.3%
Final simplification64.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma (fma y (* b 0.5) y) (- b) y)) (t_2 (/ x (* y a))))
(if (<= b -2.55e+26)
(fma
b
(fma b (* (* b t_2) -0.16666666666666666) (* t_2 (fma b 0.5 -1.0)))
t_2)
(if (<= b 800000000.0)
(/ x (/ (* a (* (fma (fma b 0.5 1.0) (* y b) y) t_1)) t_1))
(/
x
(*
a
(* y (fma b (fma b (fma b 0.16666666666666666 0.5) 1.0) 1.0))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma(fma(y, (b * 0.5), y), -b, y);
double t_2 = x / (y * a);
double tmp;
if (b <= -2.55e+26) {
tmp = fma(b, fma(b, ((b * t_2) * -0.16666666666666666), (t_2 * fma(b, 0.5, -1.0))), t_2);
} else if (b <= 800000000.0) {
tmp = x / ((a * (fma(fma(b, 0.5, 1.0), (y * b), y) * t_1)) / t_1);
} else {
tmp = x / (a * (y * fma(b, fma(b, fma(b, 0.16666666666666666, 0.5), 1.0), 1.0)));
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = fma(fma(y, Float64(b * 0.5), y), Float64(-b), y) t_2 = Float64(x / Float64(y * a)) tmp = 0.0 if (b <= -2.55e+26) tmp = fma(b, fma(b, Float64(Float64(b * t_2) * -0.16666666666666666), Float64(t_2 * fma(b, 0.5, -1.0))), t_2); elseif (b <= 800000000.0) tmp = Float64(x / Float64(Float64(a * Float64(fma(fma(b, 0.5, 1.0), Float64(y * b), y) * t_1)) / t_1)); else tmp = Float64(x / Float64(a * Float64(y * fma(b, fma(b, fma(b, 0.16666666666666666, 0.5), 1.0), 1.0)))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y * N[(b * 0.5), $MachinePrecision] + y), $MachinePrecision] * (-b) + y), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -2.55e+26], N[(b * N[(b * N[(N[(b * t$95$2), $MachinePrecision] * -0.16666666666666666), $MachinePrecision] + N[(t$95$2 * N[(b * 0.5 + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision], If[LessEqual[b, 800000000.0], N[(x / N[(N[(a * N[(N[(N[(b * 0.5 + 1.0), $MachinePrecision] * N[(y * b), $MachinePrecision] + y), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision], N[(x / N[(a * N[(y * N[(b * N[(b * N[(b * 0.16666666666666666 + 0.5), $MachinePrecision] + 1.0), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\mathsf{fma}\left(y, b \cdot 0.5, y\right), -b, y\right)\\
t_2 := \frac{x}{y \cdot a}\\
\mathbf{if}\;b \leq -2.55 \cdot 10^{+26}:\\
\;\;\;\;\mathsf{fma}\left(b, \mathsf{fma}\left(b, \left(b \cdot t\_2\right) \cdot -0.16666666666666666, t\_2 \cdot \mathsf{fma}\left(b, 0.5, -1\right)\right), t\_2\right)\\
\mathbf{elif}\;b \leq 800000000:\\
\;\;\;\;\frac{x}{\frac{a \cdot \left(\mathsf{fma}\left(\mathsf{fma}\left(b, 0.5, 1\right), y \cdot b, y\right) \cdot t\_1\right)}{t\_1}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, \mathsf{fma}\left(b, 0.16666666666666666, 0.5\right), 1\right), 1\right)\right)}\\
\end{array}
\end{array}
if b < -2.5499999999999999e26Initial 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.f6469.0
Simplified69.0%
Taylor expanded in y around 0
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-exp.f6475.4
Simplified75.4%
Taylor expanded in b around 0
Simplified63.6%
if -2.5499999999999999e26 < b < 8e8Initial program 96.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.f6471.7
Simplified71.7%
Taylor expanded in y around 0
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-exp.f6446.9
Simplified46.9%
Taylor expanded in b around 0
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
+-commutativeN/A
lower-fma.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6444.0
Simplified44.0%
lift-*.f64N/A
lift-fma.f64N/A
flip-+N/A
frac-2negN/A
associate-*r/N/A
lower-/.f64N/A
Applied egg-rr53.2%
if 8e8 < 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.f6472.7
Simplified72.7%
Taylor expanded in y around 0
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-exp.f6480.9
Simplified80.9%
Taylor expanded in b around 0
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f6473.1
Simplified73.1%
Final simplification60.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma (* y b) -0.5 y)) (t_2 (/ x (* y a))))
(if (<= b -9e-12)
(fma
b
(fma b (* (* b t_2) -0.16666666666666666) (* t_2 (fma b 0.5 -1.0)))
t_2)
(if (<= b 850000000.0)
(/ x (* a (fma b (/ (* (fma y (* b 0.5) y) t_1) t_1) y)))
(/
x
(*
a
(* y (fma b (fma b (fma b 0.16666666666666666 0.5) 1.0) 1.0))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma((y * b), -0.5, y);
double t_2 = x / (y * a);
double tmp;
if (b <= -9e-12) {
tmp = fma(b, fma(b, ((b * t_2) * -0.16666666666666666), (t_2 * fma(b, 0.5, -1.0))), t_2);
} else if (b <= 850000000.0) {
tmp = x / (a * fma(b, ((fma(y, (b * 0.5), y) * t_1) / t_1), y));
} else {
tmp = x / (a * (y * fma(b, fma(b, fma(b, 0.16666666666666666, 0.5), 1.0), 1.0)));
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = fma(Float64(y * b), -0.5, y) t_2 = Float64(x / Float64(y * a)) tmp = 0.0 if (b <= -9e-12) tmp = fma(b, fma(b, Float64(Float64(b * t_2) * -0.16666666666666666), Float64(t_2 * fma(b, 0.5, -1.0))), t_2); elseif (b <= 850000000.0) tmp = Float64(x / Float64(a * fma(b, Float64(Float64(fma(y, Float64(b * 0.5), y) * t_1) / t_1), y))); else tmp = Float64(x / Float64(a * Float64(y * fma(b, fma(b, fma(b, 0.16666666666666666, 0.5), 1.0), 1.0)))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y * b), $MachinePrecision] * -0.5 + y), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -9e-12], N[(b * N[(b * N[(N[(b * t$95$2), $MachinePrecision] * -0.16666666666666666), $MachinePrecision] + N[(t$95$2 * N[(b * 0.5 + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision], If[LessEqual[b, 850000000.0], N[(x / N[(a * N[(b * N[(N[(N[(y * N[(b * 0.5), $MachinePrecision] + y), $MachinePrecision] * t$95$1), $MachinePrecision] / t$95$1), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(a * N[(y * N[(b * N[(b * N[(b * 0.16666666666666666 + 0.5), $MachinePrecision] + 1.0), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(y \cdot b, -0.5, y\right)\\
t_2 := \frac{x}{y \cdot a}\\
\mathbf{if}\;b \leq -9 \cdot 10^{-12}:\\
\;\;\;\;\mathsf{fma}\left(b, \mathsf{fma}\left(b, \left(b \cdot t\_2\right) \cdot -0.16666666666666666, t\_2 \cdot \mathsf{fma}\left(b, 0.5, -1\right)\right), t\_2\right)\\
\mathbf{elif}\;b \leq 850000000:\\
\;\;\;\;\frac{x}{a \cdot \mathsf{fma}\left(b, \frac{\mathsf{fma}\left(y, b \cdot 0.5, y\right) \cdot t\_1}{t\_1}, y\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, \mathsf{fma}\left(b, 0.16666666666666666, 0.5\right), 1\right), 1\right)\right)}\\
\end{array}
\end{array}
if b < -8.99999999999999962e-12Initial program 99.9%
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.8
Simplified67.8%
Taylor expanded in y around 0
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-exp.f6472.1
Simplified72.1%
Taylor expanded in b around 0
Simplified59.4%
if -8.99999999999999962e-12 < b < 8.5e8Initial program 96.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.f6472.6
Simplified72.6%
Taylor expanded in y around 0
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-exp.f6446.6
Simplified46.6%
Taylor expanded in b around 0
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
+-commutativeN/A
lower-fma.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6445.0
Simplified45.0%
lift-*.f64N/A
flip-+N/A
frac-2negN/A
lower-/.f64N/A
Applied egg-rr53.5%
if 8.5e8 < 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.f6472.7
Simplified72.7%
Taylor expanded in y around 0
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-exp.f6480.9
Simplified80.9%
Taylor expanded in b around 0
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f6473.1
Simplified73.1%
Final simplification60.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (* y a))) (t_2 (fma (* y b) -0.5 y)))
(if (<= b -3e+111)
(fma b (* t_1 (fma b 0.5 -1.0)) t_1)
(if (<= b 850000000.0)
(/ x (* a (fma b (/ (* (fma y (* b 0.5) y) t_2) t_2) y)))
(/
x
(*
a
(* y (fma b (fma b (fma b 0.16666666666666666 0.5) 1.0) 1.0))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (y * a);
double t_2 = fma((y * b), -0.5, y);
double tmp;
if (b <= -3e+111) {
tmp = fma(b, (t_1 * fma(b, 0.5, -1.0)), t_1);
} else if (b <= 850000000.0) {
tmp = x / (a * fma(b, ((fma(y, (b * 0.5), y) * t_2) / t_2), y));
} else {
tmp = x / (a * (y * fma(b, fma(b, fma(b, 0.16666666666666666, 0.5), 1.0), 1.0)));
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(y * a)) t_2 = fma(Float64(y * b), -0.5, y) tmp = 0.0 if (b <= -3e+111) tmp = fma(b, Float64(t_1 * fma(b, 0.5, -1.0)), t_1); elseif (b <= 850000000.0) tmp = Float64(x / Float64(a * fma(b, Float64(Float64(fma(y, Float64(b * 0.5), y) * t_2) / t_2), y))); else tmp = Float64(x / Float64(a * Float64(y * fma(b, fma(b, fma(b, 0.16666666666666666, 0.5), 1.0), 1.0)))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y * b), $MachinePrecision] * -0.5 + y), $MachinePrecision]}, If[LessEqual[b, -3e+111], N[(b * N[(t$95$1 * N[(b * 0.5 + -1.0), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[b, 850000000.0], N[(x / N[(a * N[(b * N[(N[(N[(y * N[(b * 0.5), $MachinePrecision] + y), $MachinePrecision] * t$95$2), $MachinePrecision] / t$95$2), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(a * N[(y * N[(b * N[(b * N[(b * 0.16666666666666666 + 0.5), $MachinePrecision] + 1.0), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{y \cdot a}\\
t_2 := \mathsf{fma}\left(y \cdot b, -0.5, y\right)\\
\mathbf{if}\;b \leq -3 \cdot 10^{+111}:\\
\;\;\;\;\mathsf{fma}\left(b, t\_1 \cdot \mathsf{fma}\left(b, 0.5, -1\right), t\_1\right)\\
\mathbf{elif}\;b \leq 850000000:\\
\;\;\;\;\frac{x}{a \cdot \mathsf{fma}\left(b, \frac{\mathsf{fma}\left(y, b \cdot 0.5, y\right) \cdot t\_2}{t\_2}, y\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, \mathsf{fma}\left(b, 0.16666666666666666, 0.5\right), 1\right), 1\right)\right)}\\
\end{array}
\end{array}
if b < -3e111Initial 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.f6477.4
Simplified77.4%
Taylor expanded in y around 0
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-exp.f6484.3
Simplified84.3%
Taylor expanded in b around 0
lower-fma.f64N/A
Simplified67.1%
if -3e111 < b < 8.5e8Initial program 96.7%
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.9
Simplified68.9%
Taylor expanded in y around 0
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-exp.f6448.1
Simplified48.1%
Taylor expanded in b around 0
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
+-commutativeN/A
lower-fma.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6443.7
Simplified43.7%
lift-*.f64N/A
flip-+N/A
frac-2negN/A
lower-/.f64N/A
Applied egg-rr50.5%
if 8.5e8 < 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.f6472.7
Simplified72.7%
Taylor expanded in y around 0
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-exp.f6480.9
Simplified80.9%
Taylor expanded in b around 0
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f6473.1
Simplified73.1%
Final simplification58.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (* y a))))
(if (<= b -1.1e+30)
(fma b (* t_1 (fma b 0.5 -1.0)) t_1)
(if (<= b 1.55e-66)
(/ x (* b (* b (fma (/ y b) (+ a (/ a b)) (* a (* y 0.5))))))
(/
x
(*
a
(* y (fma b (fma b (fma b 0.16666666666666666 0.5) 1.0) 1.0))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (y * a);
double tmp;
if (b <= -1.1e+30) {
tmp = fma(b, (t_1 * fma(b, 0.5, -1.0)), t_1);
} else if (b <= 1.55e-66) {
tmp = x / (b * (b * fma((y / b), (a + (a / b)), (a * (y * 0.5)))));
} else {
tmp = x / (a * (y * fma(b, fma(b, fma(b, 0.16666666666666666, 0.5), 1.0), 1.0)));
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(y * a)) tmp = 0.0 if (b <= -1.1e+30) tmp = fma(b, Float64(t_1 * fma(b, 0.5, -1.0)), t_1); elseif (b <= 1.55e-66) tmp = Float64(x / Float64(b * Float64(b * fma(Float64(y / b), Float64(a + Float64(a / b)), Float64(a * Float64(y * 0.5)))))); else tmp = Float64(x / Float64(a * Float64(y * fma(b, fma(b, fma(b, 0.16666666666666666, 0.5), 1.0), 1.0)))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.1e+30], N[(b * N[(t$95$1 * N[(b * 0.5 + -1.0), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[b, 1.55e-66], N[(x / N[(b * N[(b * N[(N[(y / b), $MachinePrecision] * N[(a + N[(a / b), $MachinePrecision]), $MachinePrecision] + N[(a * N[(y * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(a * N[(y * N[(b * N[(b * N[(b * 0.16666666666666666 + 0.5), $MachinePrecision] + 1.0), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{y \cdot a}\\
\mathbf{if}\;b \leq -1.1 \cdot 10^{+30}:\\
\;\;\;\;\mathsf{fma}\left(b, t\_1 \cdot \mathsf{fma}\left(b, 0.5, -1\right), t\_1\right)\\
\mathbf{elif}\;b \leq 1.55 \cdot 10^{-66}:\\
\;\;\;\;\frac{x}{b \cdot \left(b \cdot \mathsf{fma}\left(\frac{y}{b}, a + \frac{a}{b}, a \cdot \left(y \cdot 0.5\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, \mathsf{fma}\left(b, 0.16666666666666666, 0.5\right), 1\right), 1\right)\right)}\\
\end{array}
\end{array}
if b < -1.1e30Initial 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.f6470.7
Simplified70.7%
Taylor expanded in y around 0
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-exp.f6477.4
Simplified77.4%
Taylor expanded in b around 0
lower-fma.f64N/A
Simplified58.8%
if -1.1e30 < b < 1.5499999999999999e-66Initial program 96.1%
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
Simplified67.9%
Taylor expanded in y around 0
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-exp.f6445.2
Simplified45.2%
Taylor expanded in b around 0
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
+-commutativeN/A
lower-fma.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6443.6
Simplified43.6%
Taylor expanded in b around inf
unpow2N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
+-commutativeN/A
associate-/l*N/A
unpow2N/A
times-fracN/A
distribute-rgt-outN/A
lower-fma.f64N/A
lower-/.f64N/A
lower-+.f64N/A
lower-/.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6450.2
Simplified50.2%
if 1.5499999999999999e-66 < b Initial 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.f6476.2
Simplified76.2%
Taylor expanded in y around 0
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-exp.f6474.2
Simplified74.2%
Taylor expanded in b around 0
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f6466.0
Simplified66.0%
Final simplification57.4%
(FPCore (x y z t a b) :precision binary64 (if (<= b 1.4e-11) (* (/ x (* y a)) (- 1.0 b)) (/ (* x 2.0) (* a (* y (* b b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 1.4e-11) {
tmp = (x / (y * a)) * (1.0 - b);
} else {
tmp = (x * 2.0) / (a * (y * (b * 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 (b <= 1.4d-11) then
tmp = (x / (y * a)) * (1.0d0 - b)
else
tmp = (x * 2.0d0) / (a * (y * (b * 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 (b <= 1.4e-11) {
tmp = (x / (y * a)) * (1.0 - b);
} else {
tmp = (x * 2.0) / (a * (y * (b * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= 1.4e-11: tmp = (x / (y * a)) * (1.0 - b) else: tmp = (x * 2.0) / (a * (y * (b * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= 1.4e-11) tmp = Float64(Float64(x / Float64(y * a)) * Float64(1.0 - b)); else tmp = Float64(Float64(x * 2.0) / Float64(a * Float64(y * Float64(b * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= 1.4e-11) tmp = (x / (y * a)) * (1.0 - b); else tmp = (x * 2.0) / (a * (y * (b * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, 1.4e-11], N[(N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision] * N[(1.0 - b), $MachinePrecision]), $MachinePrecision], N[(N[(x * 2.0), $MachinePrecision] / N[(a * N[(y * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 1.4 \cdot 10^{-11}:\\
\;\;\;\;\frac{x}{y \cdot a} \cdot \left(1 - b\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot 2}{a \cdot \left(y \cdot \left(b \cdot b\right)\right)}\\
\end{array}
\end{array}
if b < 1.4e-11Initial program 97.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.f6470.7
Simplified70.7%
Taylor expanded in y around 0
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-exp.f6456.4
Simplified56.4%
Taylor expanded in b around 0
associate-/l*N/A
associate-*r*N/A
distribute-lft1-inN/A
lower-*.f64N/A
lower-+.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
lower-*.f6442.9
Simplified42.9%
if 1.4e-11 < 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.f6473.0
Simplified73.0%
Taylor expanded in y around 0
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-exp.f6479.3
Simplified79.3%
Taylor expanded in b around 0
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
+-commutativeN/A
lower-fma.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6453.1
Simplified53.1%
Taylor expanded in b around inf
associate-*r/N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6458.8
Simplified58.8%
Final simplification47.0%
(FPCore (x y z t a b) :precision binary64 (if (<= t 8.2e+87) (/ x (* y a)) (/ 1.0 (/ y x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= 8.2e+87) {
tmp = x / (y * a);
} else {
tmp = 1.0 / (y / 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 (t <= 8.2d+87) then
tmp = x / (y * a)
else
tmp = 1.0d0 / (y / 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 (t <= 8.2e+87) {
tmp = x / (y * a);
} else {
tmp = 1.0 / (y / x);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= 8.2e+87: tmp = x / (y * a) else: tmp = 1.0 / (y / x) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= 8.2e+87) tmp = Float64(x / Float64(y * a)); else tmp = Float64(1.0 / Float64(y / x)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= 8.2e+87) tmp = x / (y * a); else tmp = 1.0 / (y / x); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, 8.2e+87], N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(y / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 8.2 \cdot 10^{+87}:\\
\;\;\;\;\frac{x}{y \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{y}{x}}\\
\end{array}
\end{array}
if t < 8.1999999999999998e87Initial program 97.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.3
Simplified81.3%
Taylor expanded in y around 0
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-exp.f6470.7
Simplified70.7%
Taylor expanded in b around 0
lower-/.f64N/A
lower-*.f6437.7
Simplified37.7%
if 8.1999999999999998e87 < t Initial program 100.0%
Taylor expanded in y around inf
lower-*.f64N/A
lower-log.f6451.1
Simplified51.1%
Taylor expanded in b around 0
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-pow.f6447.5
Simplified47.5%
Taylor expanded in y around 0
lower-/.f6424.9
Simplified24.9%
clear-numN/A
lower-/.f64N/A
lower-/.f6425.7
Applied egg-rr25.7%
Final simplification35.2%
(FPCore (x y z t a b) :precision binary64 (if (<= t 8.2e+87) (/ x (* y a)) (/ x y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= 8.2e+87) {
tmp = x / (y * a);
} else {
tmp = 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 (t <= 8.2d+87) then
tmp = x / (y * a)
else
tmp = 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 (t <= 8.2e+87) {
tmp = x / (y * a);
} else {
tmp = x / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= 8.2e+87: tmp = x / (y * a) else: tmp = x / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= 8.2e+87) tmp = Float64(x / Float64(y * a)); else tmp = Float64(x / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= 8.2e+87) tmp = x / (y * a); else tmp = x / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, 8.2e+87], N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision], N[(x / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 8.2 \cdot 10^{+87}:\\
\;\;\;\;\frac{x}{y \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y}\\
\end{array}
\end{array}
if t < 8.1999999999999998e87Initial program 97.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.3
Simplified81.3%
Taylor expanded in y around 0
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-exp.f6470.7
Simplified70.7%
Taylor expanded in b around 0
lower-/.f64N/A
lower-*.f6437.7
Simplified37.7%
if 8.1999999999999998e87 < t Initial program 100.0%
Taylor expanded in y around inf
lower-*.f64N/A
lower-log.f6451.1
Simplified51.1%
Taylor expanded in b around 0
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-pow.f6447.5
Simplified47.5%
Taylor expanded in y around 0
lower-/.f6424.9
Simplified24.9%
Final simplification35.1%
(FPCore (x y z t a b) :precision binary64 (/ x y))
double code(double x, double y, double z, double t, double a, double b) {
return x / 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 / y
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x / y;
}
def code(x, y, z, t, a, b): return x / y
function code(x, y, z, t, a, b) return Float64(x / y) end
function tmp = code(x, y, z, t, a, b) tmp = x / y; end
code[x_, y_, z_, t_, a_, b_] := N[(x / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{y}
\end{array}
Initial program 98.1%
Taylor expanded in y around inf
lower-*.f64N/A
lower-log.f6467.6
Simplified67.6%
Taylor expanded in b around 0
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-pow.f6446.5
Simplified46.5%
Taylor expanded in y around 0
lower-/.f6417.3
Simplified17.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 2024207
(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))