
(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 17 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 (/ (* (exp (- (+ (* (log a) (- t 1.0)) (* (log z) y)) b)) x) y))
double code(double x, double y, double z, double t, double a, double b) {
return (exp((((log(a) * (t - 1.0)) + (log(z) * y)) - b)) * 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 = (exp((((log(a) * (t - 1.0d0)) + (log(z) * y)) - b)) * x) / y
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (Math.exp((((Math.log(a) * (t - 1.0)) + (Math.log(z) * y)) - b)) * x) / y;
}
def code(x, y, z, t, a, b): return (math.exp((((math.log(a) * (t - 1.0)) + (math.log(z) * y)) - b)) * x) / y
function code(x, y, z, t, a, b) return Float64(Float64(exp(Float64(Float64(Float64(log(a) * Float64(t - 1.0)) + Float64(log(z) * y)) - b)) * x) / y) end
function tmp = code(x, y, z, t, a, b) tmp = (exp((((log(a) * (t - 1.0)) + (log(z) * y)) - b)) * x) / y; end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[Exp[N[(N[(N[(N[Log[a], $MachinePrecision] * N[(t - 1.0), $MachinePrecision]), $MachinePrecision] + N[(N[Log[z], $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision] * x), $MachinePrecision] / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{e^{\left(\log a \cdot \left(t - 1\right) + \log z \cdot y\right) - b} \cdot x}{y}
\end{array}
Initial program 98.9%
Final simplification98.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* (exp (- (fma (log z) y (- (log a))) b)) x) y)))
(if (<= y -2700000000000.0)
t_1
(if (<= y 8e+83) (/ (* (exp (- (* (log a) (- t 1.0)) b)) x) y) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (exp((fma(log(z), y, -log(a)) - b)) * x) / y;
double tmp;
if (y <= -2700000000000.0) {
tmp = t_1;
} else if (y <= 8e+83) {
tmp = (exp(((log(a) * (t - 1.0)) - b)) * x) / y;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(exp(Float64(fma(log(z), y, Float64(-log(a))) - b)) * x) / y) tmp = 0.0 if (y <= -2700000000000.0) tmp = t_1; elseif (y <= 8e+83) tmp = Float64(Float64(exp(Float64(Float64(log(a) * Float64(t - 1.0)) - b)) * x) / y); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[Exp[N[(N[(N[Log[z], $MachinePrecision] * y + (-N[Log[a], $MachinePrecision])), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision] * x), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[y, -2700000000000.0], t$95$1, If[LessEqual[y, 8e+83], N[(N[(N[Exp[N[(N[(N[Log[a], $MachinePrecision] * N[(t - 1.0), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision] * x), $MachinePrecision] / y), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{e^{\mathsf{fma}\left(\log z, y, -\log a\right) - b} \cdot x}{y}\\
\mathbf{if}\;y \leq -2700000000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 8 \cdot 10^{+83}:\\
\;\;\;\;\frac{e^{\log a \cdot \left(t - 1\right) - b} \cdot x}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -2.7e12 or 8.00000000000000025e83 < y Initial program 100.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-log94.5
Applied rewrites94.5%
if -2.7e12 < y < 8.00000000000000025e83Initial program 98.1%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
rem-exp-logN/A
lower-log.f64N/A
rem-exp-log97.3
Applied rewrites97.3%
Final simplification96.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* (exp (- (* (log a) t) b)) x) y))
(t_2 (/ (* (/ (pow z y) a) x) y)))
(if (<= y -9.5e+32)
t_2
(if (<= y -3.5e-144)
t_1
(if (<= y 2.6e-10)
(/ (* (/ 1.0 (* (exp b) a)) x) y)
(if (<= y 1.1e+84) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (exp(((log(a) * t) - b)) * x) / y;
double t_2 = ((pow(z, y) / a) * x) / y;
double tmp;
if (y <= -9.5e+32) {
tmp = t_2;
} else if (y <= -3.5e-144) {
tmp = t_1;
} else if (y <= 2.6e-10) {
tmp = ((1.0 / (exp(b) * a)) * x) / y;
} else if (y <= 1.1e+84) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (exp(((log(a) * t) - b)) * x) / y
t_2 = (((z ** y) / a) * x) / y
if (y <= (-9.5d+32)) then
tmp = t_2
else if (y <= (-3.5d-144)) then
tmp = t_1
else if (y <= 2.6d-10) then
tmp = ((1.0d0 / (exp(b) * a)) * x) / y
else if (y <= 1.1d+84) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (Math.exp(((Math.log(a) * t) - b)) * x) / y;
double t_2 = ((Math.pow(z, y) / a) * x) / y;
double tmp;
if (y <= -9.5e+32) {
tmp = t_2;
} else if (y <= -3.5e-144) {
tmp = t_1;
} else if (y <= 2.6e-10) {
tmp = ((1.0 / (Math.exp(b) * a)) * x) / y;
} else if (y <= 1.1e+84) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (math.exp(((math.log(a) * t) - b)) * x) / y t_2 = ((math.pow(z, y) / a) * x) / y tmp = 0 if y <= -9.5e+32: tmp = t_2 elif y <= -3.5e-144: tmp = t_1 elif y <= 2.6e-10: tmp = ((1.0 / (math.exp(b) * a)) * x) / y elif y <= 1.1e+84: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(exp(Float64(Float64(log(a) * t) - b)) * x) / y) t_2 = Float64(Float64(Float64((z ^ y) / a) * x) / y) tmp = 0.0 if (y <= -9.5e+32) tmp = t_2; elseif (y <= -3.5e-144) tmp = t_1; elseif (y <= 2.6e-10) tmp = Float64(Float64(Float64(1.0 / Float64(exp(b) * a)) * x) / y); elseif (y <= 1.1e+84) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (exp(((log(a) * t) - b)) * x) / y; t_2 = (((z ^ y) / a) * x) / y; tmp = 0.0; if (y <= -9.5e+32) tmp = t_2; elseif (y <= -3.5e-144) tmp = t_1; elseif (y <= 2.6e-10) tmp = ((1.0 / (exp(b) * a)) * x) / y; elseif (y <= 1.1e+84) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[Exp[N[(N[(N[Log[a], $MachinePrecision] * t), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision] * x), $MachinePrecision] / y), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision] * x), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[y, -9.5e+32], t$95$2, If[LessEqual[y, -3.5e-144], t$95$1, If[LessEqual[y, 2.6e-10], N[(N[(N[(1.0 / N[(N[Exp[b], $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, 1.1e+84], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{e^{\log a \cdot t - b} \cdot x}{y}\\
t_2 := \frac{\frac{{z}^{y}}{a} \cdot x}{y}\\
\mathbf{if}\;y \leq -9.5 \cdot 10^{+32}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -3.5 \cdot 10^{-144}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 2.6 \cdot 10^{-10}:\\
\;\;\;\;\frac{\frac{1}{e^{b} \cdot a} \cdot x}{y}\\
\mathbf{elif}\;y \leq 1.1 \cdot 10^{+84}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -9.50000000000000006e32 or 1.0999999999999999e84 < y Initial program 100.0%
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.f6476.3
Applied rewrites76.3%
Taylor expanded in b around 0
Applied rewrites91.2%
if -9.50000000000000006e32 < y < -3.4999999999999998e-144 or 2.59999999999999981e-10 < y < 1.0999999999999999e84Initial program 99.7%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
rem-exp-logN/A
lower-log.f64N/A
rem-exp-log88.2
Applied rewrites88.2%
if -3.4999999999999998e-144 < y < 2.59999999999999981e-10Initial program 97.2%
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.f6485.5
Applied rewrites85.5%
Taylor expanded in y around 0
Applied rewrites85.0%
Final simplification88.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* (exp (- (* (log a) t) b)) x) y)))
(if (<= b -3.3e+38)
t_1
(if (<= b 6.8e-302)
(* (* (/ (pow z y) y) (pow a (- t 1.0))) x)
(if (<= b 8200.0) (/ (* (/ (pow z y) a) x) y) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (exp(((log(a) * t) - b)) * x) / y;
double tmp;
if (b <= -3.3e+38) {
tmp = t_1;
} else if (b <= 6.8e-302) {
tmp = ((pow(z, y) / y) * pow(a, (t - 1.0))) * x;
} else if (b <= 8200.0) {
tmp = ((pow(z, y) / a) * x) / y;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (exp(((log(a) * t) - b)) * x) / y
if (b <= (-3.3d+38)) then
tmp = t_1
else if (b <= 6.8d-302) then
tmp = (((z ** y) / y) * (a ** (t - 1.0d0))) * x
else if (b <= 8200.0d0) then
tmp = (((z ** y) / a) * x) / y
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (Math.exp(((Math.log(a) * t) - b)) * x) / y;
double tmp;
if (b <= -3.3e+38) {
tmp = t_1;
} else if (b <= 6.8e-302) {
tmp = ((Math.pow(z, y) / y) * Math.pow(a, (t - 1.0))) * x;
} else if (b <= 8200.0) {
tmp = ((Math.pow(z, y) / a) * x) / y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (math.exp(((math.log(a) * t) - b)) * x) / y tmp = 0 if b <= -3.3e+38: tmp = t_1 elif b <= 6.8e-302: tmp = ((math.pow(z, y) / y) * math.pow(a, (t - 1.0))) * x elif b <= 8200.0: tmp = ((math.pow(z, y) / a) * x) / y else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(exp(Float64(Float64(log(a) * t) - b)) * x) / y) tmp = 0.0 if (b <= -3.3e+38) tmp = t_1; elseif (b <= 6.8e-302) tmp = Float64(Float64(Float64((z ^ y) / y) * (a ^ Float64(t - 1.0))) * x); elseif (b <= 8200.0) tmp = Float64(Float64(Float64((z ^ y) / a) * x) / y); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (exp(((log(a) * t) - b)) * x) / y; tmp = 0.0; if (b <= -3.3e+38) tmp = t_1; elseif (b <= 6.8e-302) tmp = (((z ^ y) / y) * (a ^ (t - 1.0))) * x; elseif (b <= 8200.0) tmp = (((z ^ y) / a) * x) / y; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[Exp[N[(N[(N[Log[a], $MachinePrecision] * t), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision] * x), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[b, -3.3e+38], t$95$1, If[LessEqual[b, 6.8e-302], N[(N[(N[(N[Power[z, y], $MachinePrecision] / y), $MachinePrecision] * N[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[b, 8200.0], N[(N[(N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision] * x), $MachinePrecision] / y), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{e^{\log a \cdot t - b} \cdot x}{y}\\
\mathbf{if}\;b \leq -3.3 \cdot 10^{+38}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 6.8 \cdot 10^{-302}:\\
\;\;\;\;\left(\frac{{z}^{y}}{y} \cdot {a}^{\left(t - 1\right)}\right) \cdot x\\
\mathbf{elif}\;b \leq 8200:\\
\;\;\;\;\frac{\frac{{z}^{y}}{a} \cdot x}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -3.2999999999999999e38 or 8200 < 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-log90.3
Applied rewrites90.3%
if -3.2999999999999999e38 < b < 6.8e-302Initial program 97.4%
Taylor expanded in x around 0
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites85.9%
Taylor expanded in b around 0
Applied rewrites85.6%
if 6.8e-302 < b < 8200Initial program 98.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.f6483.5
Applied rewrites83.5%
Taylor expanded in b around 0
Applied rewrites84.6%
Final simplification87.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* (/ (pow z y) a) x) y)))
(if (<= y -9.5e+32)
t_1
(if (<= y 4.2e+141) (/ (* (exp (- (* (log a) (- t 1.0)) b)) x) y) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((pow(z, y) / a) * x) / y;
double tmp;
if (y <= -9.5e+32) {
tmp = t_1;
} else if (y <= 4.2e+141) {
tmp = (exp(((log(a) * (t - 1.0)) - b)) * x) / y;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (((z ** y) / a) * x) / y
if (y <= (-9.5d+32)) then
tmp = t_1
else if (y <= 4.2d+141) then
tmp = (exp(((log(a) * (t - 1.0d0)) - b)) * x) / y
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((Math.pow(z, y) / a) * x) / y;
double tmp;
if (y <= -9.5e+32) {
tmp = t_1;
} else if (y <= 4.2e+141) {
tmp = (Math.exp(((Math.log(a) * (t - 1.0)) - b)) * x) / y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((math.pow(z, y) / a) * x) / y tmp = 0 if y <= -9.5e+32: tmp = t_1 elif y <= 4.2e+141: tmp = (math.exp(((math.log(a) * (t - 1.0)) - b)) * x) / y else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64((z ^ y) / a) * x) / y) tmp = 0.0 if (y <= -9.5e+32) tmp = t_1; elseif (y <= 4.2e+141) tmp = Float64(Float64(exp(Float64(Float64(log(a) * Float64(t - 1.0)) - b)) * x) / y); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (((z ^ y) / a) * x) / y; tmp = 0.0; if (y <= -9.5e+32) tmp = t_1; elseif (y <= 4.2e+141) tmp = (exp(((log(a) * (t - 1.0)) - b)) * x) / y; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision] * x), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[y, -9.5e+32], t$95$1, If[LessEqual[y, 4.2e+141], N[(N[(N[Exp[N[(N[(N[Log[a], $MachinePrecision] * N[(t - 1.0), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision] * x), $MachinePrecision] / y), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\frac{{z}^{y}}{a} \cdot x}{y}\\
\mathbf{if}\;y \leq -9.5 \cdot 10^{+32}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 4.2 \cdot 10^{+141}:\\
\;\;\;\;\frac{e^{\log a \cdot \left(t - 1\right) - b} \cdot x}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -9.50000000000000006e32 or 4.1999999999999997e141 < y Initial program 100.0%
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.f6477.0
Applied rewrites77.0%
Taylor expanded in b around 0
Applied rewrites93.2%
if -9.50000000000000006e32 < y < 4.1999999999999997e141Initial program 98.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-log95.3
Applied rewrites95.3%
Final simplification94.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* (/ (pow z y) a) x) y)))
(if (<= y -9.5e+32)
t_1
(if (<= y 1.1e+84) (* (/ (exp (- (* (log a) (- t 1.0)) b)) y) x) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((pow(z, y) / a) * x) / y;
double tmp;
if (y <= -9.5e+32) {
tmp = t_1;
} else if (y <= 1.1e+84) {
tmp = (exp(((log(a) * (t - 1.0)) - b)) / y) * x;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (((z ** y) / a) * x) / y
if (y <= (-9.5d+32)) then
tmp = t_1
else if (y <= 1.1d+84) then
tmp = (exp(((log(a) * (t - 1.0d0)) - b)) / y) * x
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((Math.pow(z, y) / a) * x) / y;
double tmp;
if (y <= -9.5e+32) {
tmp = t_1;
} else if (y <= 1.1e+84) {
tmp = (Math.exp(((Math.log(a) * (t - 1.0)) - b)) / y) * x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((math.pow(z, y) / a) * x) / y tmp = 0 if y <= -9.5e+32: tmp = t_1 elif y <= 1.1e+84: tmp = (math.exp(((math.log(a) * (t - 1.0)) - b)) / y) * x else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64((z ^ y) / a) * x) / y) tmp = 0.0 if (y <= -9.5e+32) tmp = t_1; elseif (y <= 1.1e+84) tmp = Float64(Float64(exp(Float64(Float64(log(a) * Float64(t - 1.0)) - b)) / y) * x); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (((z ^ y) / a) * x) / y; tmp = 0.0; if (y <= -9.5e+32) tmp = t_1; elseif (y <= 1.1e+84) tmp = (exp(((log(a) * (t - 1.0)) - b)) / y) * x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision] * x), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[y, -9.5e+32], t$95$1, If[LessEqual[y, 1.1e+84], N[(N[(N[Exp[N[(N[(N[Log[a], $MachinePrecision] * N[(t - 1.0), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision] * x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\frac{{z}^{y}}{a} \cdot x}{y}\\
\mathbf{if}\;y \leq -9.5 \cdot 10^{+32}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.1 \cdot 10^{+84}:\\
\;\;\;\;\frac{e^{\log a \cdot \left(t - 1\right) - b}}{y} \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -9.50000000000000006e32 or 1.0999999999999999e84 < y Initial program 100.0%
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.f6476.3
Applied rewrites76.3%
Taylor expanded in b around 0
Applied rewrites91.2%
if -9.50000000000000006e32 < y < 1.0999999999999999e84Initial program 98.2%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
rem-exp-logN/A
lower-log.f64N/A
rem-exp-log96.8
Applied rewrites96.8%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6495.2
Applied rewrites95.2%
Final simplification93.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* (/ (pow z y) a) x) y)))
(if (<= y -9.5e+32)
t_1
(if (<= y 1.1e+84) (* (/ x y) (exp (- (* (log a) (- t 1.0)) b))) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((pow(z, y) / a) * x) / y;
double tmp;
if (y <= -9.5e+32) {
tmp = t_1;
} else if (y <= 1.1e+84) {
tmp = (x / y) * exp(((log(a) * (t - 1.0)) - b));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (((z ** y) / a) * x) / y
if (y <= (-9.5d+32)) then
tmp = t_1
else if (y <= 1.1d+84) then
tmp = (x / y) * exp(((log(a) * (t - 1.0d0)) - b))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((Math.pow(z, y) / a) * x) / y;
double tmp;
if (y <= -9.5e+32) {
tmp = t_1;
} else if (y <= 1.1e+84) {
tmp = (x / y) * Math.exp(((Math.log(a) * (t - 1.0)) - b));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((math.pow(z, y) / a) * x) / y tmp = 0 if y <= -9.5e+32: tmp = t_1 elif y <= 1.1e+84: tmp = (x / y) * math.exp(((math.log(a) * (t - 1.0)) - b)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64((z ^ y) / a) * x) / y) tmp = 0.0 if (y <= -9.5e+32) tmp = t_1; elseif (y <= 1.1e+84) tmp = Float64(Float64(x / y) * exp(Float64(Float64(log(a) * Float64(t - 1.0)) - b))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (((z ^ y) / a) * x) / y; tmp = 0.0; if (y <= -9.5e+32) tmp = t_1; elseif (y <= 1.1e+84) tmp = (x / y) * exp(((log(a) * (t - 1.0)) - b)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision] * x), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[y, -9.5e+32], t$95$1, If[LessEqual[y, 1.1e+84], N[(N[(x / y), $MachinePrecision] * N[Exp[N[(N[(N[Log[a], $MachinePrecision] * N[(t - 1.0), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\frac{{z}^{y}}{a} \cdot x}{y}\\
\mathbf{if}\;y \leq -9.5 \cdot 10^{+32}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.1 \cdot 10^{+84}:\\
\;\;\;\;\frac{x}{y} \cdot e^{\log a \cdot \left(t - 1\right) - b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -9.50000000000000006e32 or 1.0999999999999999e84 < y Initial program 100.0%
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.f6476.3
Applied rewrites76.3%
Taylor expanded in b around 0
Applied rewrites91.2%
if -9.50000000000000006e32 < y < 1.0999999999999999e84Initial program 98.2%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
rem-exp-logN/A
lower-log.f64N/A
rem-exp-log96.8
Applied rewrites96.8%
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6488.4
Applied rewrites88.4%
Final simplification89.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* (exp (- (* (log a) t) b)) x) y)))
(if (<= b -2.2e+14)
t_1
(if (<= b 8000.0) (/ (* (* (pow a (- t 1.0)) (pow z y)) x) y) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (exp(((log(a) * t) - b)) * x) / y;
double tmp;
if (b <= -2.2e+14) {
tmp = t_1;
} else if (b <= 8000.0) {
tmp = ((pow(a, (t - 1.0)) * pow(z, y)) * x) / y;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (exp(((log(a) * t) - b)) * x) / y
if (b <= (-2.2d+14)) then
tmp = t_1
else if (b <= 8000.0d0) then
tmp = (((a ** (t - 1.0d0)) * (z ** y)) * x) / y
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (Math.exp(((Math.log(a) * t) - b)) * x) / y;
double tmp;
if (b <= -2.2e+14) {
tmp = t_1;
} else if (b <= 8000.0) {
tmp = ((Math.pow(a, (t - 1.0)) * Math.pow(z, y)) * x) / y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (math.exp(((math.log(a) * t) - b)) * x) / y tmp = 0 if b <= -2.2e+14: tmp = t_1 elif b <= 8000.0: tmp = ((math.pow(a, (t - 1.0)) * math.pow(z, y)) * x) / y else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(exp(Float64(Float64(log(a) * t) - b)) * x) / y) tmp = 0.0 if (b <= -2.2e+14) tmp = t_1; elseif (b <= 8000.0) tmp = Float64(Float64(Float64((a ^ Float64(t - 1.0)) * (z ^ y)) * x) / y); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (exp(((log(a) * t) - b)) * x) / y; tmp = 0.0; if (b <= -2.2e+14) tmp = t_1; elseif (b <= 8000.0) tmp = (((a ^ (t - 1.0)) * (z ^ y)) * x) / y; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[Exp[N[(N[(N[Log[a], $MachinePrecision] * t), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision] * x), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[b, -2.2e+14], t$95$1, If[LessEqual[b, 8000.0], N[(N[(N[(N[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision] * N[Power[z, y], $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision] / y), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{e^{\log a \cdot t - b} \cdot x}{y}\\
\mathbf{if}\;b \leq -2.2 \cdot 10^{+14}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 8000:\\
\;\;\;\;\frac{\left({a}^{\left(t - 1\right)} \cdot {z}^{y}\right) \cdot x}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -2.2e14 or 8e3 < 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-log90.6
Applied rewrites90.6%
if -2.2e14 < b < 8e3Initial program 97.9%
Taylor expanded in b around 0
+-commutativeN/A
exp-sumN/A
lower-*.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
lower--.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f6483.0
Applied rewrites83.0%
Final simplification86.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* (/ (pow z y) a) x) y)))
(if (<= y -4.1)
t_1
(if (<= y 1.05e+84) (* (/ (pow a (- t 1.0)) (* (exp b) y)) x) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((pow(z, y) / a) * x) / y;
double tmp;
if (y <= -4.1) {
tmp = t_1;
} else if (y <= 1.05e+84) {
tmp = (pow(a, (t - 1.0)) / (exp(b) * y)) * x;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (((z ** y) / a) * x) / y
if (y <= (-4.1d0)) then
tmp = t_1
else if (y <= 1.05d+84) then
tmp = ((a ** (t - 1.0d0)) / (exp(b) * y)) * x
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((Math.pow(z, y) / a) * x) / y;
double tmp;
if (y <= -4.1) {
tmp = t_1;
} else if (y <= 1.05e+84) {
tmp = (Math.pow(a, (t - 1.0)) / (Math.exp(b) * y)) * x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((math.pow(z, y) / a) * x) / y tmp = 0 if y <= -4.1: tmp = t_1 elif y <= 1.05e+84: tmp = (math.pow(a, (t - 1.0)) / (math.exp(b) * y)) * x else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64((z ^ y) / a) * x) / y) tmp = 0.0 if (y <= -4.1) tmp = t_1; elseif (y <= 1.05e+84) tmp = Float64(Float64((a ^ Float64(t - 1.0)) / Float64(exp(b) * y)) * x); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (((z ^ y) / a) * x) / y; tmp = 0.0; if (y <= -4.1) tmp = t_1; elseif (y <= 1.05e+84) tmp = ((a ^ (t - 1.0)) / (exp(b) * y)) * x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision] * x), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[y, -4.1], t$95$1, If[LessEqual[y, 1.05e+84], N[(N[(N[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision] / N[(N[Exp[b], $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\frac{{z}^{y}}{a} \cdot x}{y}\\
\mathbf{if}\;y \leq -4.1:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.05 \cdot 10^{+84}:\\
\;\;\;\;\frac{{a}^{\left(t - 1\right)}}{e^{b} \cdot y} \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -4.0999999999999996 or 1.05000000000000009e84 < y Initial program 100.0%
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.f6473.7
Applied rewrites73.7%
Taylor expanded in b around 0
Applied rewrites88.4%
if -4.0999999999999996 < y < 1.05000000000000009e84Initial program 98.1%
Taylor expanded in x around 0
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites80.1%
Taylor expanded in y around 0
Applied rewrites80.5%
Applied rewrites83.9%
Final simplification85.8%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -0.016)
(* (/ 1.0 (* (* (exp b) y) a)) x)
(if (<= b -2.6e-232)
(/ (* (pow a (- t 1.0)) x) y)
(if (<= b 235000.0)
(* (/ x a) (/ (pow z y) y))
(* (/ (exp (- b)) y) x)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -0.016) {
tmp = (1.0 / ((exp(b) * y) * a)) * x;
} else if (b <= -2.6e-232) {
tmp = (pow(a, (t - 1.0)) * x) / y;
} else if (b <= 235000.0) {
tmp = (x / a) * (pow(z, y) / y);
} else {
tmp = (exp(-b) / 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 (b <= (-0.016d0)) then
tmp = (1.0d0 / ((exp(b) * y) * a)) * x
else if (b <= (-2.6d-232)) then
tmp = ((a ** (t - 1.0d0)) * x) / y
else if (b <= 235000.0d0) then
tmp = (x / a) * ((z ** y) / y)
else
tmp = (exp(-b) / 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 (b <= -0.016) {
tmp = (1.0 / ((Math.exp(b) * y) * a)) * x;
} else if (b <= -2.6e-232) {
tmp = (Math.pow(a, (t - 1.0)) * x) / y;
} else if (b <= 235000.0) {
tmp = (x / a) * (Math.pow(z, y) / y);
} else {
tmp = (Math.exp(-b) / y) * x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -0.016: tmp = (1.0 / ((math.exp(b) * y) * a)) * x elif b <= -2.6e-232: tmp = (math.pow(a, (t - 1.0)) * x) / y elif b <= 235000.0: tmp = (x / a) * (math.pow(z, y) / y) else: tmp = (math.exp(-b) / y) * x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -0.016) tmp = Float64(Float64(1.0 / Float64(Float64(exp(b) * y) * a)) * x); elseif (b <= -2.6e-232) tmp = Float64(Float64((a ^ Float64(t - 1.0)) * x) / y); elseif (b <= 235000.0) tmp = Float64(Float64(x / a) * Float64((z ^ y) / y)); else tmp = Float64(Float64(exp(Float64(-b)) / y) * x); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -0.016) tmp = (1.0 / ((exp(b) * y) * a)) * x; elseif (b <= -2.6e-232) tmp = ((a ^ (t - 1.0)) * x) / y; elseif (b <= 235000.0) tmp = (x / a) * ((z ^ y) / y); else tmp = (exp(-b) / y) * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -0.016], N[(N[(1.0 / N[(N[(N[Exp[b], $MachinePrecision] * y), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[b, -2.6e-232], N[(N[(N[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision] * x), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[b, 235000.0], N[(N[(x / a), $MachinePrecision] * N[(N[Power[z, y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(N[(N[Exp[(-b)], $MachinePrecision] / y), $MachinePrecision] * x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -0.016:\\
\;\;\;\;\frac{1}{\left(e^{b} \cdot y\right) \cdot a} \cdot x\\
\mathbf{elif}\;b \leq -2.6 \cdot 10^{-232}:\\
\;\;\;\;\frac{{a}^{\left(t - 1\right)} \cdot x}{y}\\
\mathbf{elif}\;b \leq 235000:\\
\;\;\;\;\frac{x}{a} \cdot \frac{{z}^{y}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{e^{-b}}{y} \cdot x\\
\end{array}
\end{array}
if b < -0.016Initial program 98.5%
Taylor expanded in x around 0
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites66.6%
Taylor expanded in y around 0
Applied rewrites72.2%
Taylor expanded in t around 0
Applied rewrites89.0%
if -0.016 < b < -2.59999999999999996e-232Initial program 98.5%
Taylor expanded in b around 0
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
+-commutativeN/A
exp-sumN/A
lower-*.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
lower--.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
lower-/.f6480.0
Applied rewrites80.0%
Taylor expanded in y around 0
Applied rewrites82.6%
if -2.59999999999999996e-232 < b < 235000Initial program 98.7%
Taylor expanded in b around 0
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
+-commutativeN/A
exp-sumN/A
lower-*.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
lower--.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
lower-/.f6476.5
Applied rewrites76.5%
Taylor expanded in t around 0
Applied rewrites75.3%
if 235000 < b Initial program 100.0%
Taylor expanded in b around inf
mul-1-negN/A
lower-neg.f6480.0
Applied rewrites80.0%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6480.0
Applied rewrites80.0%
Final simplification81.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* (/ (pow z y) a) x) y)))
(if (<= y -3.1e+32)
t_1
(if (<= y 8e+83) (/ (* (/ 1.0 (* (exp b) a)) x) y) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((pow(z, y) / a) * x) / y;
double tmp;
if (y <= -3.1e+32) {
tmp = t_1;
} else if (y <= 8e+83) {
tmp = ((1.0 / (exp(b) * a)) * x) / y;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (((z ** y) / a) * x) / y
if (y <= (-3.1d+32)) then
tmp = t_1
else if (y <= 8d+83) then
tmp = ((1.0d0 / (exp(b) * a)) * x) / y
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((Math.pow(z, y) / a) * x) / y;
double tmp;
if (y <= -3.1e+32) {
tmp = t_1;
} else if (y <= 8e+83) {
tmp = ((1.0 / (Math.exp(b) * a)) * x) / y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((math.pow(z, y) / a) * x) / y tmp = 0 if y <= -3.1e+32: tmp = t_1 elif y <= 8e+83: tmp = ((1.0 / (math.exp(b) * a)) * x) / y else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64((z ^ y) / a) * x) / y) tmp = 0.0 if (y <= -3.1e+32) tmp = t_1; elseif (y <= 8e+83) tmp = Float64(Float64(Float64(1.0 / Float64(exp(b) * a)) * x) / y); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (((z ^ y) / a) * x) / y; tmp = 0.0; if (y <= -3.1e+32) tmp = t_1; elseif (y <= 8e+83) tmp = ((1.0 / (exp(b) * a)) * x) / y; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision] * x), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[y, -3.1e+32], t$95$1, If[LessEqual[y, 8e+83], N[(N[(N[(1.0 / N[(N[Exp[b], $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision] / y), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\frac{{z}^{y}}{a} \cdot x}{y}\\
\mathbf{if}\;y \leq -3.1 \cdot 10^{+32}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 8 \cdot 10^{+83}:\\
\;\;\;\;\frac{\frac{1}{e^{b} \cdot a} \cdot x}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -3.09999999999999993e32 or 8.00000000000000025e83 < y Initial program 100.0%
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.f6476.3
Applied rewrites76.3%
Taylor expanded in b around 0
Applied rewrites91.2%
if -3.09999999999999993e32 < y < 8.00000000000000025e83Initial program 98.2%
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.f6476.8
Applied rewrites76.8%
Taylor expanded in y around 0
Applied rewrites79.8%
Final simplification84.3%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -0.016)
(* (/ 1.0 (* (* (exp b) y) a)) x)
(if (<= b -2.6e-232)
(/ (* (pow a (- t 1.0)) x) y)
(if (<= b 235000.0)
(/ (* (pow z y) x) (* a y))
(* (/ (exp (- b)) y) x)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -0.016) {
tmp = (1.0 / ((exp(b) * y) * a)) * x;
} else if (b <= -2.6e-232) {
tmp = (pow(a, (t - 1.0)) * x) / y;
} else if (b <= 235000.0) {
tmp = (pow(z, y) * x) / (a * y);
} else {
tmp = (exp(-b) / 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 (b <= (-0.016d0)) then
tmp = (1.0d0 / ((exp(b) * y) * a)) * x
else if (b <= (-2.6d-232)) then
tmp = ((a ** (t - 1.0d0)) * x) / y
else if (b <= 235000.0d0) then
tmp = ((z ** y) * x) / (a * y)
else
tmp = (exp(-b) / 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 (b <= -0.016) {
tmp = (1.0 / ((Math.exp(b) * y) * a)) * x;
} else if (b <= -2.6e-232) {
tmp = (Math.pow(a, (t - 1.0)) * x) / y;
} else if (b <= 235000.0) {
tmp = (Math.pow(z, y) * x) / (a * y);
} else {
tmp = (Math.exp(-b) / y) * x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -0.016: tmp = (1.0 / ((math.exp(b) * y) * a)) * x elif b <= -2.6e-232: tmp = (math.pow(a, (t - 1.0)) * x) / y elif b <= 235000.0: tmp = (math.pow(z, y) * x) / (a * y) else: tmp = (math.exp(-b) / y) * x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -0.016) tmp = Float64(Float64(1.0 / Float64(Float64(exp(b) * y) * a)) * x); elseif (b <= -2.6e-232) tmp = Float64(Float64((a ^ Float64(t - 1.0)) * x) / y); elseif (b <= 235000.0) tmp = Float64(Float64((z ^ y) * x) / Float64(a * y)); else tmp = Float64(Float64(exp(Float64(-b)) / y) * x); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -0.016) tmp = (1.0 / ((exp(b) * y) * a)) * x; elseif (b <= -2.6e-232) tmp = ((a ^ (t - 1.0)) * x) / y; elseif (b <= 235000.0) tmp = ((z ^ y) * x) / (a * y); else tmp = (exp(-b) / y) * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -0.016], N[(N[(1.0 / N[(N[(N[Exp[b], $MachinePrecision] * y), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[b, -2.6e-232], N[(N[(N[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision] * x), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[b, 235000.0], N[(N[(N[Power[z, y], $MachinePrecision] * x), $MachinePrecision] / N[(a * y), $MachinePrecision]), $MachinePrecision], N[(N[(N[Exp[(-b)], $MachinePrecision] / y), $MachinePrecision] * x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -0.016:\\
\;\;\;\;\frac{1}{\left(e^{b} \cdot y\right) \cdot a} \cdot x\\
\mathbf{elif}\;b \leq -2.6 \cdot 10^{-232}:\\
\;\;\;\;\frac{{a}^{\left(t - 1\right)} \cdot x}{y}\\
\mathbf{elif}\;b \leq 235000:\\
\;\;\;\;\frac{{z}^{y} \cdot x}{a \cdot y}\\
\mathbf{else}:\\
\;\;\;\;\frac{e^{-b}}{y} \cdot x\\
\end{array}
\end{array}
if b < -0.016Initial program 98.5%
Taylor expanded in x around 0
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites66.6%
Taylor expanded in y around 0
Applied rewrites72.2%
Taylor expanded in t around 0
Applied rewrites89.0%
if -0.016 < b < -2.59999999999999996e-232Initial program 98.5%
Taylor expanded in b around 0
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
+-commutativeN/A
exp-sumN/A
lower-*.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
lower--.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
lower-/.f6480.0
Applied rewrites80.0%
Taylor expanded in y around 0
Applied rewrites82.6%
if -2.59999999999999996e-232 < b < 235000Initial program 98.7%
Taylor expanded in b around 0
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
+-commutativeN/A
exp-sumN/A
lower-*.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
lower--.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
lower-/.f6476.5
Applied rewrites76.5%
Taylor expanded in t around 0
Applied rewrites75.3%
Applied rewrites75.2%
if 235000 < b Initial program 100.0%
Taylor expanded in b around inf
mul-1-negN/A
lower-neg.f6480.0
Applied rewrites80.0%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6480.0
Applied rewrites80.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (/ (exp (- b)) y) x)))
(if (<= b -225000000.0)
t_1
(if (<= b -2.6e-232)
(/ (* (pow a (- t 1.0)) x) y)
(if (<= b 235000.0) (/ (* (pow z y) x) (* a y)) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (exp(-b) / y) * x;
double tmp;
if (b <= -225000000.0) {
tmp = t_1;
} else if (b <= -2.6e-232) {
tmp = (pow(a, (t - 1.0)) * x) / y;
} else if (b <= 235000.0) {
tmp = (pow(z, y) * x) / (a * y);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (exp(-b) / y) * x
if (b <= (-225000000.0d0)) then
tmp = t_1
else if (b <= (-2.6d-232)) then
tmp = ((a ** (t - 1.0d0)) * x) / y
else if (b <= 235000.0d0) then
tmp = ((z ** y) * x) / (a * y)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (Math.exp(-b) / y) * x;
double tmp;
if (b <= -225000000.0) {
tmp = t_1;
} else if (b <= -2.6e-232) {
tmp = (Math.pow(a, (t - 1.0)) * x) / y;
} else if (b <= 235000.0) {
tmp = (Math.pow(z, y) * x) / (a * y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (math.exp(-b) / y) * x tmp = 0 if b <= -225000000.0: tmp = t_1 elif b <= -2.6e-232: tmp = (math.pow(a, (t - 1.0)) * x) / y elif b <= 235000.0: tmp = (math.pow(z, y) * x) / (a * y) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(exp(Float64(-b)) / y) * x) tmp = 0.0 if (b <= -225000000.0) tmp = t_1; elseif (b <= -2.6e-232) tmp = Float64(Float64((a ^ Float64(t - 1.0)) * x) / y); elseif (b <= 235000.0) tmp = Float64(Float64((z ^ y) * x) / Float64(a * y)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (exp(-b) / y) * x; tmp = 0.0; if (b <= -225000000.0) tmp = t_1; elseif (b <= -2.6e-232) tmp = ((a ^ (t - 1.0)) * x) / y; elseif (b <= 235000.0) tmp = ((z ^ y) * x) / (a * y); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[Exp[(-b)], $MachinePrecision] / y), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[b, -225000000.0], t$95$1, If[LessEqual[b, -2.6e-232], N[(N[(N[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision] * x), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[b, 235000.0], N[(N[(N[Power[z, y], $MachinePrecision] * x), $MachinePrecision] / N[(a * y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{e^{-b}}{y} \cdot x\\
\mathbf{if}\;b \leq -225000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -2.6 \cdot 10^{-232}:\\
\;\;\;\;\frac{{a}^{\left(t - 1\right)} \cdot x}{y}\\
\mathbf{elif}\;b \leq 235000:\\
\;\;\;\;\frac{{z}^{y} \cdot x}{a \cdot y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -2.25e8 or 235000 < b Initial program 100.0%
Taylor expanded in b around inf
mul-1-negN/A
lower-neg.f6485.5
Applied rewrites85.5%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6485.5
Applied rewrites85.5%
if -2.25e8 < b < -2.59999999999999996e-232Initial program 96.6%
Taylor expanded in b around 0
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
+-commutativeN/A
exp-sumN/A
lower-*.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
lower--.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
lower-/.f6476.0
Applied rewrites76.0%
Taylor expanded in y around 0
Applied rewrites76.9%
if -2.59999999999999996e-232 < b < 235000Initial program 98.7%
Taylor expanded in b around 0
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
+-commutativeN/A
exp-sumN/A
lower-*.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
lower--.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
lower-/.f6476.5
Applied rewrites76.5%
Taylor expanded in t around 0
Applied rewrites75.3%
Applied rewrites75.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* (/ (pow z y) a) x) y)))
(if (<= y -3.1e+32)
t_1
(if (<= y 8e+83) (* (/ 1.0 (* (* (exp b) y) a)) x) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((pow(z, y) / a) * x) / y;
double tmp;
if (y <= -3.1e+32) {
tmp = t_1;
} else if (y <= 8e+83) {
tmp = (1.0 / ((exp(b) * y) * a)) * x;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (((z ** y) / a) * x) / y
if (y <= (-3.1d+32)) then
tmp = t_1
else if (y <= 8d+83) then
tmp = (1.0d0 / ((exp(b) * y) * a)) * x
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((Math.pow(z, y) / a) * x) / y;
double tmp;
if (y <= -3.1e+32) {
tmp = t_1;
} else if (y <= 8e+83) {
tmp = (1.0 / ((Math.exp(b) * y) * a)) * x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((math.pow(z, y) / a) * x) / y tmp = 0 if y <= -3.1e+32: tmp = t_1 elif y <= 8e+83: tmp = (1.0 / ((math.exp(b) * y) * a)) * x else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64((z ^ y) / a) * x) / y) tmp = 0.0 if (y <= -3.1e+32) tmp = t_1; elseif (y <= 8e+83) tmp = Float64(Float64(1.0 / Float64(Float64(exp(b) * y) * a)) * x); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (((z ^ y) / a) * x) / y; tmp = 0.0; if (y <= -3.1e+32) tmp = t_1; elseif (y <= 8e+83) tmp = (1.0 / ((exp(b) * y) * a)) * x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision] * x), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[y, -3.1e+32], t$95$1, If[LessEqual[y, 8e+83], N[(N[(1.0 / N[(N[(N[Exp[b], $MachinePrecision] * y), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\frac{{z}^{y}}{a} \cdot x}{y}\\
\mathbf{if}\;y \leq -3.1 \cdot 10^{+32}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 8 \cdot 10^{+83}:\\
\;\;\;\;\frac{1}{\left(e^{b} \cdot y\right) \cdot a} \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -3.09999999999999993e32 or 8.00000000000000025e83 < y Initial program 100.0%
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.f6476.3
Applied rewrites76.3%
Taylor expanded in b around 0
Applied rewrites91.2%
if -3.09999999999999993e32 < y < 8.00000000000000025e83Initial program 98.2%
Taylor expanded in x around 0
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites77.4%
Taylor expanded in y around 0
Applied rewrites79.1%
Taylor expanded in t around 0
Applied rewrites77.5%
Final simplification82.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (/ (exp (- b)) y) x)))
(if (<= b -225000000.0)
t_1
(if (<= b 250000.0) (/ (* (pow a (- t 1.0)) x) y) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (exp(-b) / y) * x;
double tmp;
if (b <= -225000000.0) {
tmp = t_1;
} else if (b <= 250000.0) {
tmp = (pow(a, (t - 1.0)) * x) / y;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (exp(-b) / y) * x
if (b <= (-225000000.0d0)) then
tmp = t_1
else if (b <= 250000.0d0) then
tmp = ((a ** (t - 1.0d0)) * x) / y
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (Math.exp(-b) / y) * x;
double tmp;
if (b <= -225000000.0) {
tmp = t_1;
} else if (b <= 250000.0) {
tmp = (Math.pow(a, (t - 1.0)) * x) / y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (math.exp(-b) / y) * x tmp = 0 if b <= -225000000.0: tmp = t_1 elif b <= 250000.0: tmp = (math.pow(a, (t - 1.0)) * x) / y else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(exp(Float64(-b)) / y) * x) tmp = 0.0 if (b <= -225000000.0) tmp = t_1; elseif (b <= 250000.0) tmp = Float64(Float64((a ^ Float64(t - 1.0)) * x) / y); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (exp(-b) / y) * x; tmp = 0.0; if (b <= -225000000.0) tmp = t_1; elseif (b <= 250000.0) tmp = ((a ^ (t - 1.0)) * x) / y; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[Exp[(-b)], $MachinePrecision] / y), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[b, -225000000.0], t$95$1, If[LessEqual[b, 250000.0], N[(N[(N[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision] * x), $MachinePrecision] / y), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{e^{-b}}{y} \cdot x\\
\mathbf{if}\;b \leq -225000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 250000:\\
\;\;\;\;\frac{{a}^{\left(t - 1\right)} \cdot x}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -2.25e8 or 2.5e5 < b Initial program 100.0%
Taylor expanded in b around inf
mul-1-negN/A
lower-neg.f6485.5
Applied rewrites85.5%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6485.5
Applied rewrites85.5%
if -2.25e8 < b < 2.5e5Initial program 97.8%
Taylor expanded in b around 0
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
+-commutativeN/A
exp-sumN/A
lower-*.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
lower--.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
lower-/.f6476.3
Applied rewrites76.3%
Taylor expanded in y around 0
Applied rewrites69.3%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* (/ (exp (- b)) y) x))) (if (<= b -190000000.0) t_1 (if (<= b 8000.0) (/ (/ x a) y) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (exp(-b) / y) * x;
double tmp;
if (b <= -190000000.0) {
tmp = t_1;
} else if (b <= 8000.0) {
tmp = (x / a) / y;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (exp(-b) / y) * x
if (b <= (-190000000.0d0)) then
tmp = t_1
else if (b <= 8000.0d0) then
tmp = (x / a) / y
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (Math.exp(-b) / y) * x;
double tmp;
if (b <= -190000000.0) {
tmp = t_1;
} else if (b <= 8000.0) {
tmp = (x / a) / y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (math.exp(-b) / y) * x tmp = 0 if b <= -190000000.0: tmp = t_1 elif b <= 8000.0: tmp = (x / a) / y else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(exp(Float64(-b)) / y) * x) tmp = 0.0 if (b <= -190000000.0) tmp = t_1; elseif (b <= 8000.0) tmp = Float64(Float64(x / a) / y); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (exp(-b) / y) * x; tmp = 0.0; if (b <= -190000000.0) tmp = t_1; elseif (b <= 8000.0) tmp = (x / a) / y; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[Exp[(-b)], $MachinePrecision] / y), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[b, -190000000.0], t$95$1, If[LessEqual[b, 8000.0], N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{e^{-b}}{y} \cdot x\\
\mathbf{if}\;b \leq -190000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 8000:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -1.9e8 or 8e3 < b Initial program 100.0%
Taylor expanded in b around inf
mul-1-negN/A
lower-neg.f6485.5
Applied rewrites85.5%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6485.5
Applied rewrites85.5%
if -1.9e8 < b < 8e3Initial program 97.8%
Taylor expanded in b around 0
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
+-commutativeN/A
exp-sumN/A
lower-*.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
lower--.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
lower-/.f6476.3
Applied rewrites76.3%
Taylor expanded in t around 0
Applied rewrites72.8%
Taylor expanded in y around 0
Applied rewrites44.8%
(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.9%
Taylor expanded in b around 0
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
+-commutativeN/A
exp-sumN/A
lower-*.f64N/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
lower--.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
lower-/.f6462.7
Applied rewrites62.7%
Taylor expanded in t around 0
Applied rewrites58.7%
Taylor expanded in y around 0
Applied rewrites32.9%
(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 2024298
(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))