
(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 13 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.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= (- t 1.0) -1e+104) (not (<= (- t 1.0) -0.998))) (/ (* x (exp (- (* (log a) t) b))) y) (/ (* x (exp (- (fma (log z) y (- (log a))) b))) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (((t - 1.0) <= -1e+104) || !((t - 1.0) <= -0.998)) {
tmp = (x * exp(((log(a) * t) - b))) / y;
} else {
tmp = (x * exp((fma(log(z), y, -log(a)) - b))) / y;
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if ((Float64(t - 1.0) <= -1e+104) || !(Float64(t - 1.0) <= -0.998)) tmp = Float64(Float64(x * exp(Float64(Float64(log(a) * t) - b))) / y); else tmp = Float64(Float64(x * exp(Float64(fma(log(z), y, Float64(-log(a))) - b))) / y); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[N[(t - 1.0), $MachinePrecision], -1e+104], N[Not[LessEqual[N[(t - 1.0), $MachinePrecision], -0.998]], $MachinePrecision]], N[(N[(x * N[Exp[N[(N[(N[Log[a], $MachinePrecision] * t), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x * N[Exp[N[(N[(N[Log[z], $MachinePrecision] * y + (-N[Log[a], $MachinePrecision])), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t - 1 \leq -1 \cdot 10^{+104} \lor \neg \left(t - 1 \leq -0.998\right):\\
\;\;\;\;\frac{x \cdot e^{\log a \cdot t - b}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot e^{\mathsf{fma}\left(\log z, y, -\log a\right) - b}}{y}\\
\end{array}
\end{array}
if (-.f64 t #s(literal 1 binary64)) < -1e104 or -0.998 < (-.f64 t #s(literal 1 binary64)) 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-log93.3
Applied rewrites93.3%
if -1e104 < (-.f64 t #s(literal 1 binary64)) < -0.998Initial program 97.0%
Taylor expanded in t around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-log.f64N/A
mul-1-negN/A
lower-neg.f64N/A
rem-exp-logN/A
lower-log.f64N/A
rem-exp-log96.3
Applied rewrites96.3%
Final simplification94.9%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -4e+95)
(/ (* x (exp (- (* (log a) t) b))) y)
(if (<= t 1.6e-19)
(/ (* x (/ (/ (pow z y) a) (exp b))) y)
(/ (* x (exp (- (* (- t 1.0) (log a)) b))) y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -4e+95) {
tmp = (x * exp(((log(a) * t) - b))) / y;
} else if (t <= 1.6e-19) {
tmp = (x * ((pow(z, y) / a) / exp(b))) / y;
} else {
tmp = (x * exp((((t - 1.0) * log(a)) - b))) / 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 <= (-4d+95)) then
tmp = (x * exp(((log(a) * t) - b))) / y
else if (t <= 1.6d-19) then
tmp = (x * (((z ** y) / a) / exp(b))) / y
else
tmp = (x * exp((((t - 1.0d0) * log(a)) - b))) / 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 <= -4e+95) {
tmp = (x * Math.exp(((Math.log(a) * t) - b))) / y;
} else if (t <= 1.6e-19) {
tmp = (x * ((Math.pow(z, y) / a) / Math.exp(b))) / y;
} else {
tmp = (x * Math.exp((((t - 1.0) * Math.log(a)) - b))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -4e+95: tmp = (x * math.exp(((math.log(a) * t) - b))) / y elif t <= 1.6e-19: tmp = (x * ((math.pow(z, y) / a) / math.exp(b))) / y else: tmp = (x * math.exp((((t - 1.0) * math.log(a)) - b))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -4e+95) tmp = Float64(Float64(x * exp(Float64(Float64(log(a) * t) - b))) / y); elseif (t <= 1.6e-19) tmp = Float64(Float64(x * Float64(Float64((z ^ y) / a) / exp(b))) / y); else tmp = Float64(Float64(x * exp(Float64(Float64(Float64(t - 1.0) * log(a)) - b))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -4e+95) tmp = (x * exp(((log(a) * t) - b))) / y; elseif (t <= 1.6e-19) tmp = (x * (((z ^ y) / a) / exp(b))) / y; else tmp = (x * exp((((t - 1.0) * log(a)) - b))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -4e+95], N[(N[(x * N[Exp[N[(N[(N[Log[a], $MachinePrecision] * t), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t, 1.6e-19], N[(N[(x * N[(N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision] / N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x * N[Exp[N[(N[(N[(t - 1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4 \cdot 10^{+95}:\\
\;\;\;\;\frac{x \cdot e^{\log a \cdot t - b}}{y}\\
\mathbf{elif}\;t \leq 1.6 \cdot 10^{-19}:\\
\;\;\;\;\frac{x \cdot \frac{\frac{{z}^{y}}{a}}{e^{b}}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot e^{\left(t - 1\right) \cdot \log a - b}}{y}\\
\end{array}
\end{array}
if t < -4.00000000000000008e95Initial program 100.0%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
rem-exp-logN/A
lower-log.f64N/A
rem-exp-log96.7
Applied rewrites96.7%
if -4.00000000000000008e95 < t < 1.59999999999999991e-19Initial program 97.5%
Taylor expanded in t around 0
exp-diffN/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-exp.f6489.8
Applied rewrites89.8%
if 1.59999999999999991e-19 < t Initial program 98.5%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
rem-exp-logN/A
lower-log.f64N/A
rem-exp-log87.2
Applied rewrites87.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= (- t 1.0) -2e+44) (not (<= (- t 1.0) -0.998))) (/ (* x (exp (- (* (log a) t) b))) y) (/ (* (* x (pow z y)) (pow a -1.0)) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (((t - 1.0) <= -2e+44) || !((t - 1.0) <= -0.998)) {
tmp = (x * exp(((log(a) * t) - b))) / y;
} else {
tmp = ((x * pow(z, y)) * pow(a, -1.0)) / 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 - 1.0d0) <= (-2d+44)) .or. (.not. ((t - 1.0d0) <= (-0.998d0)))) then
tmp = (x * exp(((log(a) * t) - b))) / y
else
tmp = ((x * (z ** y)) * (a ** (-1.0d0))) / 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 - 1.0) <= -2e+44) || !((t - 1.0) <= -0.998)) {
tmp = (x * Math.exp(((Math.log(a) * t) - b))) / y;
} else {
tmp = ((x * Math.pow(z, y)) * Math.pow(a, -1.0)) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if ((t - 1.0) <= -2e+44) or not ((t - 1.0) <= -0.998): tmp = (x * math.exp(((math.log(a) * t) - b))) / y else: tmp = ((x * math.pow(z, y)) * math.pow(a, -1.0)) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((Float64(t - 1.0) <= -2e+44) || !(Float64(t - 1.0) <= -0.998)) tmp = Float64(Float64(x * exp(Float64(Float64(log(a) * t) - b))) / y); else tmp = Float64(Float64(Float64(x * (z ^ y)) * (a ^ -1.0)) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (((t - 1.0) <= -2e+44) || ~(((t - 1.0) <= -0.998))) tmp = (x * exp(((log(a) * t) - b))) / y; else tmp = ((x * (z ^ y)) * (a ^ -1.0)) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[N[(t - 1.0), $MachinePrecision], -2e+44], N[Not[LessEqual[N[(t - 1.0), $MachinePrecision], -0.998]], $MachinePrecision]], N[(N[(x * N[Exp[N[(N[(N[Log[a], $MachinePrecision] * t), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision] * N[Power[a, -1.0], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t - 1 \leq -2 \cdot 10^{+44} \lor \neg \left(t - 1 \leq -0.998\right):\\
\;\;\;\;\frac{x \cdot e^{\log a \cdot t - b}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(x \cdot {z}^{y}\right) \cdot {a}^{-1}}{y}\\
\end{array}
\end{array}
if (-.f64 t #s(literal 1 binary64)) < -2.0000000000000002e44 or -0.998 < (-.f64 t #s(literal 1 binary64)) 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-log92.2
Applied rewrites92.2%
if -2.0000000000000002e44 < (-.f64 t #s(literal 1 binary64)) < -0.998Initial program 96.7%
Taylor expanded in b around 0
exp-sumN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
lower--.f6470.6
Applied rewrites70.6%
Taylor expanded in t around 0
Applied rewrites75.3%
Final simplification83.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= (- t 1.0) -2e+44) (not (<= (- t 1.0) 40.0))) (/ (* (pow a (- t 1.0)) x) y) (/ (* (* x (pow z y)) (pow a -1.0)) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (((t - 1.0) <= -2e+44) || !((t - 1.0) <= 40.0)) {
tmp = (pow(a, (t - 1.0)) * x) / y;
} else {
tmp = ((x * pow(z, y)) * pow(a, -1.0)) / 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 - 1.0d0) <= (-2d+44)) .or. (.not. ((t - 1.0d0) <= 40.0d0))) then
tmp = ((a ** (t - 1.0d0)) * x) / y
else
tmp = ((x * (z ** y)) * (a ** (-1.0d0))) / 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 - 1.0) <= -2e+44) || !((t - 1.0) <= 40.0)) {
tmp = (Math.pow(a, (t - 1.0)) * x) / y;
} else {
tmp = ((x * Math.pow(z, y)) * Math.pow(a, -1.0)) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if ((t - 1.0) <= -2e+44) or not ((t - 1.0) <= 40.0): tmp = (math.pow(a, (t - 1.0)) * x) / y else: tmp = ((x * math.pow(z, y)) * math.pow(a, -1.0)) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((Float64(t - 1.0) <= -2e+44) || !(Float64(t - 1.0) <= 40.0)) tmp = Float64(Float64((a ^ Float64(t - 1.0)) * x) / y); else tmp = Float64(Float64(Float64(x * (z ^ y)) * (a ^ -1.0)) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (((t - 1.0) <= -2e+44) || ~(((t - 1.0) <= 40.0))) tmp = ((a ^ (t - 1.0)) * x) / y; else tmp = ((x * (z ^ y)) * (a ^ -1.0)) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[N[(t - 1.0), $MachinePrecision], -2e+44], N[Not[LessEqual[N[(t - 1.0), $MachinePrecision], 40.0]], $MachinePrecision]], N[(N[(N[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision] * x), $MachinePrecision] / y), $MachinePrecision], N[(N[(N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision] * N[Power[a, -1.0], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t - 1 \leq -2 \cdot 10^{+44} \lor \neg \left(t - 1 \leq 40\right):\\
\;\;\;\;\frac{{a}^{\left(t - 1\right)} \cdot x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(x \cdot {z}^{y}\right) \cdot {a}^{-1}}{y}\\
\end{array}
\end{array}
if (-.f64 t #s(literal 1 binary64)) < -2.0000000000000002e44 or 40 < (-.f64 t #s(literal 1 binary64)) Initial program 100.0%
Taylor expanded in b around 0
exp-sumN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
lower--.f6464.9
Applied rewrites64.9%
Taylor expanded in y around 0
Applied rewrites82.7%
if -2.0000000000000002e44 < (-.f64 t #s(literal 1 binary64)) < 40Initial program 96.8%
Taylor expanded in b around 0
exp-sumN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
lower--.f6470.3
Applied rewrites70.3%
Taylor expanded in t around 0
Applied rewrites75.6%
Final simplification79.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.5e+115) (not (<= y 8.8e+76))) (/ (/ (* (pow z y) x) a) y) (/ (* x (exp (- (* (- t 1.0) (log a)) b))) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.5e+115) || !(y <= 8.8e+76)) {
tmp = ((pow(z, y) * x) / a) / y;
} else {
tmp = (x * exp((((t - 1.0) * log(a)) - b))) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-1.5d+115)) .or. (.not. (y <= 8.8d+76))) then
tmp = (((z ** y) * x) / a) / y
else
tmp = (x * exp((((t - 1.0d0) * log(a)) - b))) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.5e+115) || !(y <= 8.8e+76)) {
tmp = ((Math.pow(z, y) * x) / a) / y;
} else {
tmp = (x * Math.exp((((t - 1.0) * Math.log(a)) - b))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1.5e+115) or not (y <= 8.8e+76): tmp = ((math.pow(z, y) * x) / a) / y else: tmp = (x * math.exp((((t - 1.0) * math.log(a)) - b))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1.5e+115) || !(y <= 8.8e+76)) tmp = Float64(Float64(Float64((z ^ y) * x) / a) / y); else tmp = Float64(Float64(x * exp(Float64(Float64(Float64(t - 1.0) * log(a)) - b))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -1.5e+115) || ~((y <= 8.8e+76))) tmp = (((z ^ y) * x) / a) / y; else tmp = (x * exp((((t - 1.0) * log(a)) - b))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1.5e+115], N[Not[LessEqual[y, 8.8e+76]], $MachinePrecision]], N[(N[(N[(N[Power[z, y], $MachinePrecision] * x), $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision], N[(N[(x * N[Exp[N[(N[(N[(t - 1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.5 \cdot 10^{+115} \lor \neg \left(y \leq 8.8 \cdot 10^{+76}\right):\\
\;\;\;\;\frac{\frac{{z}^{y} \cdot x}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot e^{\left(t - 1\right) \cdot \log a - b}}{y}\\
\end{array}
\end{array}
if y < -1.5e115 or 8.8000000000000002e76 < y Initial program 100.0%
Taylor expanded in b around 0
exp-sumN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
lower--.f6463.8
Applied rewrites63.8%
Taylor expanded in t around 0
Applied rewrites84.9%
if -1.5e115 < y < 8.8000000000000002e76Initial program 97.4%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
rem-exp-logN/A
lower-log.f64N/A
rem-exp-log93.5
Applied rewrites93.5%
Final simplification90.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -5.5e-27) (not (<= b 640.0))) (/ (* x (exp (- (* (log a) t) b))) y) (/ (* (* x (pow z y)) (pow a (- t 1.0))) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -5.5e-27) || !(b <= 640.0)) {
tmp = (x * exp(((log(a) * t) - b))) / y;
} else {
tmp = ((x * pow(z, y)) * pow(a, (t - 1.0))) / 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 ((b <= (-5.5d-27)) .or. (.not. (b <= 640.0d0))) then
tmp = (x * exp(((log(a) * t) - b))) / y
else
tmp = ((x * (z ** y)) * (a ** (t - 1.0d0))) / 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 ((b <= -5.5e-27) || !(b <= 640.0)) {
tmp = (x * Math.exp(((Math.log(a) * t) - b))) / y;
} else {
tmp = ((x * Math.pow(z, y)) * Math.pow(a, (t - 1.0))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -5.5e-27) or not (b <= 640.0): tmp = (x * math.exp(((math.log(a) * t) - b))) / y else: tmp = ((x * math.pow(z, y)) * math.pow(a, (t - 1.0))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -5.5e-27) || !(b <= 640.0)) tmp = Float64(Float64(x * exp(Float64(Float64(log(a) * t) - b))) / y); else tmp = Float64(Float64(Float64(x * (z ^ y)) * (a ^ Float64(t - 1.0))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -5.5e-27) || ~((b <= 640.0))) tmp = (x * exp(((log(a) * t) - b))) / y; else tmp = ((x * (z ^ y)) * (a ^ (t - 1.0))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -5.5e-27], N[Not[LessEqual[b, 640.0]], $MachinePrecision]], N[(N[(x * N[Exp[N[(N[(N[Log[a], $MachinePrecision] * t), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision] * N[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -5.5 \cdot 10^{-27} \lor \neg \left(b \leq 640\right):\\
\;\;\;\;\frac{x \cdot e^{\log a \cdot t - b}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(x \cdot {z}^{y}\right) \cdot {a}^{\left(t - 1\right)}}{y}\\
\end{array}
\end{array}
if b < -5.5000000000000002e-27 or 640 < b 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-log93.9
Applied rewrites93.9%
if -5.5000000000000002e-27 < b < 640Initial program 96.7%
Taylor expanded in b around 0
exp-sumN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
lower--.f6480.9
Applied rewrites80.9%
Final simplification87.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -5.5e-27) (not (<= b 640.0))) (/ (* x (exp (- (* (log a) t) b))) y) (* (* x (pow z y)) (/ (pow a (- t 1.0)) y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -5.5e-27) || !(b <= 640.0)) {
tmp = (x * exp(((log(a) * t) - b))) / y;
} else {
tmp = (x * pow(z, y)) * (pow(a, (t - 1.0)) / 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 ((b <= (-5.5d-27)) .or. (.not. (b <= 640.0d0))) then
tmp = (x * exp(((log(a) * t) - b))) / y
else
tmp = (x * (z ** y)) * ((a ** (t - 1.0d0)) / 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 ((b <= -5.5e-27) || !(b <= 640.0)) {
tmp = (x * Math.exp(((Math.log(a) * t) - b))) / y;
} else {
tmp = (x * Math.pow(z, y)) * (Math.pow(a, (t - 1.0)) / y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -5.5e-27) or not (b <= 640.0): tmp = (x * math.exp(((math.log(a) * t) - b))) / y else: tmp = (x * math.pow(z, y)) * (math.pow(a, (t - 1.0)) / y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -5.5e-27) || !(b <= 640.0)) tmp = Float64(Float64(x * exp(Float64(Float64(log(a) * t) - b))) / y); else tmp = Float64(Float64(x * (z ^ y)) * Float64((a ^ Float64(t - 1.0)) / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -5.5e-27) || ~((b <= 640.0))) tmp = (x * exp(((log(a) * t) - b))) / y; else tmp = (x * (z ^ y)) * ((a ^ (t - 1.0)) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -5.5e-27], N[Not[LessEqual[b, 640.0]], $MachinePrecision]], N[(N[(x * N[Exp[N[(N[(N[Log[a], $MachinePrecision] * t), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision] * N[(N[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -5.5 \cdot 10^{-27} \lor \neg \left(b \leq 640\right):\\
\;\;\;\;\frac{x \cdot e^{\log a \cdot t - b}}{y}\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot {z}^{y}\right) \cdot \frac{{a}^{\left(t - 1\right)}}{y}\\
\end{array}
\end{array}
if b < -5.5000000000000002e-27 or 640 < b 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-log93.9
Applied rewrites93.9%
if -5.5000000000000002e-27 < b < 640Initial program 96.7%
Taylor expanded in b around 0
exp-sumN/A
associate-*r*N/A
associate-/l*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
lower-/.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
lower--.f6477.7
Applied rewrites77.7%
Final simplification85.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= (- t 1.0) -2e+44) (not (<= (- t 1.0) 40.0))) (/ (* (pow a (- t 1.0)) x) y) (/ (/ (* (pow z y) x) a) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (((t - 1.0) <= -2e+44) || !((t - 1.0) <= 40.0)) {
tmp = (pow(a, (t - 1.0)) * x) / y;
} else {
tmp = ((pow(z, y) * x) / a) / 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 - 1.0d0) <= (-2d+44)) .or. (.not. ((t - 1.0d0) <= 40.0d0))) then
tmp = ((a ** (t - 1.0d0)) * x) / y
else
tmp = (((z ** y) * x) / a) / 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 - 1.0) <= -2e+44) || !((t - 1.0) <= 40.0)) {
tmp = (Math.pow(a, (t - 1.0)) * x) / y;
} else {
tmp = ((Math.pow(z, y) * x) / a) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if ((t - 1.0) <= -2e+44) or not ((t - 1.0) <= 40.0): tmp = (math.pow(a, (t - 1.0)) * x) / y else: tmp = ((math.pow(z, y) * x) / a) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((Float64(t - 1.0) <= -2e+44) || !(Float64(t - 1.0) <= 40.0)) tmp = Float64(Float64((a ^ Float64(t - 1.0)) * x) / y); else tmp = Float64(Float64(Float64((z ^ y) * x) / a) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (((t - 1.0) <= -2e+44) || ~(((t - 1.0) <= 40.0))) tmp = ((a ^ (t - 1.0)) * x) / y; else tmp = (((z ^ y) * x) / a) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[N[(t - 1.0), $MachinePrecision], -2e+44], N[Not[LessEqual[N[(t - 1.0), $MachinePrecision], 40.0]], $MachinePrecision]], N[(N[(N[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision] * x), $MachinePrecision] / y), $MachinePrecision], N[(N[(N[(N[Power[z, y], $MachinePrecision] * x), $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t - 1 \leq -2 \cdot 10^{+44} \lor \neg \left(t - 1 \leq 40\right):\\
\;\;\;\;\frac{{a}^{\left(t - 1\right)} \cdot x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{{z}^{y} \cdot x}{a}}{y}\\
\end{array}
\end{array}
if (-.f64 t #s(literal 1 binary64)) < -2.0000000000000002e44 or 40 < (-.f64 t #s(literal 1 binary64)) Initial program 100.0%
Taylor expanded in b around 0
exp-sumN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
lower--.f6464.9
Applied rewrites64.9%
Taylor expanded in y around 0
Applied rewrites82.7%
if -2.0000000000000002e44 < (-.f64 t #s(literal 1 binary64)) < 40Initial program 96.8%
Taylor expanded in b around 0
exp-sumN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
lower--.f6470.3
Applied rewrites70.3%
Taylor expanded in t around 0
Applied rewrites75.6%
Final simplification79.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -6.5e+22) (not (<= b 1700.0))) (* (/ (exp (- b)) y) x) (/ (* (pow a (- t 1.0)) x) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -6.5e+22) || !(b <= 1700.0)) {
tmp = (exp(-b) / y) * x;
} else {
tmp = (pow(a, (t - 1.0)) * 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 ((b <= (-6.5d+22)) .or. (.not. (b <= 1700.0d0))) then
tmp = (exp(-b) / y) * x
else
tmp = ((a ** (t - 1.0d0)) * 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 ((b <= -6.5e+22) || !(b <= 1700.0)) {
tmp = (Math.exp(-b) / y) * x;
} else {
tmp = (Math.pow(a, (t - 1.0)) * x) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -6.5e+22) or not (b <= 1700.0): tmp = (math.exp(-b) / y) * x else: tmp = (math.pow(a, (t - 1.0)) * x) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -6.5e+22) || !(b <= 1700.0)) tmp = Float64(Float64(exp(Float64(-b)) / y) * x); else tmp = Float64(Float64((a ^ Float64(t - 1.0)) * x) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -6.5e+22) || ~((b <= 1700.0))) tmp = (exp(-b) / y) * x; else tmp = ((a ^ (t - 1.0)) * x) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -6.5e+22], N[Not[LessEqual[b, 1700.0]], $MachinePrecision]], N[(N[(N[Exp[(-b)], $MachinePrecision] / y), $MachinePrecision] * x), $MachinePrecision], N[(N[(N[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision] * x), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -6.5 \cdot 10^{+22} \lor \neg \left(b \leq 1700\right):\\
\;\;\;\;\frac{e^{-b}}{y} \cdot x\\
\mathbf{else}:\\
\;\;\;\;\frac{{a}^{\left(t - 1\right)} \cdot x}{y}\\
\end{array}
\end{array}
if b < -6.49999999999999979e22 or 1700 < b Initial program 100.0%
Taylor expanded in b around inf
mul-1-negN/A
lower-neg.f6484.4
Applied rewrites84.4%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6484.4
Applied rewrites84.4%
if -6.49999999999999979e22 < b < 1700Initial program 96.9%
Taylor expanded in b around 0
exp-sumN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
lower--.f6479.7
Applied rewrites79.7%
Taylor expanded in y around 0
Applied rewrites72.4%
Final simplification78.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -2500000.0) (not (<= b 680.0))) (* (/ (exp (- b)) y) x) (/ (/ x a) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -2500000.0) || !(b <= 680.0)) {
tmp = (exp(-b) / y) * x;
} else {
tmp = (x / a) / 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 ((b <= (-2500000.0d0)) .or. (.not. (b <= 680.0d0))) then
tmp = (exp(-b) / y) * x
else
tmp = (x / a) / 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 ((b <= -2500000.0) || !(b <= 680.0)) {
tmp = (Math.exp(-b) / y) * x;
} else {
tmp = (x / a) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -2500000.0) or not (b <= 680.0): tmp = (math.exp(-b) / y) * x else: tmp = (x / a) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -2500000.0) || !(b <= 680.0)) tmp = Float64(Float64(exp(Float64(-b)) / y) * x); else tmp = Float64(Float64(x / a) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -2500000.0) || ~((b <= 680.0))) tmp = (exp(-b) / y) * x; else tmp = (x / a) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -2500000.0], N[Not[LessEqual[b, 680.0]], $MachinePrecision]], N[(N[(N[Exp[(-b)], $MachinePrecision] / y), $MachinePrecision] * x), $MachinePrecision], N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2500000 \lor \neg \left(b \leq 680\right):\\
\;\;\;\;\frac{e^{-b}}{y} \cdot x\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\
\end{array}
\end{array}
if b < -2.5e6 or 680 < b Initial program 100.0%
Taylor expanded in b around inf
mul-1-negN/A
lower-neg.f6484.0
Applied rewrites84.0%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6484.0
Applied rewrites84.0%
if -2.5e6 < b < 680Initial program 96.8%
Taylor expanded in b around 0
exp-sumN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
lower--.f6480.8
Applied rewrites80.8%
Taylor expanded in t around 0
Applied rewrites68.0%
Taylor expanded in y around 0
Applied rewrites34.6%
Final simplification58.3%
(FPCore (x y z t a b) :precision binary64 (pow (/ y (/ x a)) -1.0))
double code(double x, double y, double z, double t, double a, double b) {
return pow((y / (x / a)), -1.0);
}
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 = (y / (x / a)) ** (-1.0d0)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return Math.pow((y / (x / a)), -1.0);
}
def code(x, y, z, t, a, b): return math.pow((y / (x / a)), -1.0)
function code(x, y, z, t, a, b) return Float64(y / Float64(x / a)) ^ -1.0 end
function tmp = code(x, y, z, t, a, b) tmp = (y / (x / a)) ^ -1.0; end
code[x_, y_, z_, t_, a_, b_] := N[Power[N[(y / N[(x / a), $MachinePrecision]), $MachinePrecision], -1.0], $MachinePrecision]
\begin{array}{l}
\\
{\left(\frac{y}{\frac{x}{a}}\right)}^{-1}
\end{array}
Initial program 98.3%
Taylor expanded in b around 0
exp-sumN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
lower--.f6467.7
Applied rewrites67.7%
Taylor expanded in t around 0
Applied rewrites60.5%
Taylor expanded in y around 0
Applied rewrites31.3%
lift-/.f64N/A
clear-numN/A
lower-/.f64N/A
lower-/.f6431.6
Applied rewrites31.6%
Final simplification31.6%
(FPCore (x y z t a b) :precision binary64 (/ (/ x a) y))
double code(double x, double y, double z, double t, double a, double b) {
return (x / a) / 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 / a) / y
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x / a) / y;
}
def code(x, y, z, t, a, b): return (x / a) / y
function code(x, y, z, t, a, b) return Float64(Float64(x / a) / y) end
function tmp = code(x, y, z, t, a, b) tmp = (x / a) / y; end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{x}{a}}{y}
\end{array}
Initial program 98.3%
Taylor expanded in b around 0
exp-sumN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
lower--.f6467.7
Applied rewrites67.7%
Taylor expanded in t around 0
Applied rewrites60.5%
Taylor expanded in y around 0
Applied rewrites31.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (pow a (- t 1.0)))
(t_2 (/ (* x (/ t_1 y)) (- (+ b 1.0) (* y (log z))))))
(if (< t -0.8845848504127471)
t_2
(if (< t 852031.2288374073)
(/ (* (/ x y) t_1) (exp (- b (* (log z) y))))
t_2))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = pow(a, (t - 1.0));
double t_2 = (x * (t_1 / y)) / ((b + 1.0) - (y * log(z)));
double tmp;
if (t < -0.8845848504127471) {
tmp = t_2;
} else if (t < 852031.2288374073) {
tmp = ((x / y) * t_1) / exp((b - (log(z) * y)));
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = a ** (t - 1.0d0)
t_2 = (x * (t_1 / y)) / ((b + 1.0d0) - (y * log(z)))
if (t < (-0.8845848504127471d0)) then
tmp = t_2
else if (t < 852031.2288374073d0) then
tmp = ((x / y) * t_1) / exp((b - (log(z) * y)))
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = Math.pow(a, (t - 1.0));
double t_2 = (x * (t_1 / y)) / ((b + 1.0) - (y * Math.log(z)));
double tmp;
if (t < -0.8845848504127471) {
tmp = t_2;
} else if (t < 852031.2288374073) {
tmp = ((x / y) * t_1) / Math.exp((b - (Math.log(z) * y)));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = math.pow(a, (t - 1.0)) t_2 = (x * (t_1 / y)) / ((b + 1.0) - (y * math.log(z))) tmp = 0 if t < -0.8845848504127471: tmp = t_2 elif t < 852031.2288374073: tmp = ((x / y) * t_1) / math.exp((b - (math.log(z) * y))) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = a ^ Float64(t - 1.0) t_2 = Float64(Float64(x * Float64(t_1 / y)) / Float64(Float64(b + 1.0) - Float64(y * log(z)))) tmp = 0.0 if (t < -0.8845848504127471) tmp = t_2; elseif (t < 852031.2288374073) tmp = Float64(Float64(Float64(x / y) * t_1) / exp(Float64(b - Float64(log(z) * y)))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a ^ (t - 1.0); t_2 = (x * (t_1 / y)) / ((b + 1.0) - (y * log(z))); tmp = 0.0; if (t < -0.8845848504127471) tmp = t_2; elseif (t < 852031.2288374073) tmp = ((x / y) * t_1) / exp((b - (log(z) * y))); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * N[(t$95$1 / y), $MachinePrecision]), $MachinePrecision] / N[(N[(b + 1.0), $MachinePrecision] - N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t, -0.8845848504127471], t$95$2, If[Less[t, 852031.2288374073], N[(N[(N[(x / y), $MachinePrecision] * t$95$1), $MachinePrecision] / N[Exp[N[(b - N[(N[Log[z], $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := {a}^{\left(t - 1\right)}\\
t_2 := \frac{x \cdot \frac{t\_1}{y}}{\left(b + 1\right) - y \cdot \log z}\\
\mathbf{if}\;t < -0.8845848504127471:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t < 852031.2288374073:\\
\;\;\;\;\frac{\frac{x}{y} \cdot t\_1}{e^{b - \log z \cdot y}}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
herbie shell --seed 2024313
(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))