
(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 (/ (* (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.6%
Final simplification98.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* (/ (pow z y) a) x) y)))
(if (<= y -1.3e-10)
t_1
(if (<= y -9.4e-307)
(/ (* (/ (pow a t) a) x) y)
(if (<= y 2.9e-23) (* (/ (exp (- (- (log a)) 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 <= -1.3e-10) {
tmp = t_1;
} else if (y <= -9.4e-307) {
tmp = ((pow(a, t) / a) * x) / y;
} else if (y <= 2.9e-23) {
tmp = (exp((-log(a) - 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 <= (-1.3d-10)) then
tmp = t_1
else if (y <= (-9.4d-307)) then
tmp = (((a ** t) / a) * x) / y
else if (y <= 2.9d-23) then
tmp = (exp((-log(a) - 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 <= -1.3e-10) {
tmp = t_1;
} else if (y <= -9.4e-307) {
tmp = ((Math.pow(a, t) / a) * x) / y;
} else if (y <= 2.9e-23) {
tmp = (Math.exp((-Math.log(a) - 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 <= -1.3e-10: tmp = t_1 elif y <= -9.4e-307: tmp = ((math.pow(a, t) / a) * x) / y elif y <= 2.9e-23: tmp = (math.exp((-math.log(a) - 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 <= -1.3e-10) tmp = t_1; elseif (y <= -9.4e-307) tmp = Float64(Float64(Float64((a ^ t) / a) * x) / y); elseif (y <= 2.9e-23) tmp = Float64(Float64(exp(Float64(Float64(-log(a)) - 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 <= -1.3e-10) tmp = t_1; elseif (y <= -9.4e-307) tmp = (((a ^ t) / a) * x) / y; elseif (y <= 2.9e-23) tmp = (exp((-log(a) - 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, -1.3e-10], t$95$1, If[LessEqual[y, -9.4e-307], N[(N[(N[(N[Power[a, t], $MachinePrecision] / a), $MachinePrecision] * x), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, 2.9e-23], N[(N[(N[Exp[N[((-N[Log[a], $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 -1.3 \cdot 10^{-10}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -9.4 \cdot 10^{-307}:\\
\;\;\;\;\frac{\frac{{a}^{t}}{a} \cdot x}{y}\\
\mathbf{elif}\;y \leq 2.9 \cdot 10^{-23}:\\
\;\;\;\;\frac{e^{\left(-\log a\right) - b}}{y} \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.29999999999999991e-10 or 2.9000000000000002e-23 < y Initial program 99.9%
Taylor expanded in b around 0
sub-negN/A
metadata-evalN/A
distribute-rgt-inN/A
associate-+l+N/A
+-commutativeN/A
associate-+l+N/A
+-commutativeN/A
exp-sumN/A
lower-*.f64N/A
*-commutativeN/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
+-commutativeN/A
mul-1-negN/A
Applied rewrites75.6%
Taylor expanded in t around 0
Applied rewrites86.3%
if -1.29999999999999991e-10 < y < -9.39999999999999935e-307Initial program 97.9%
Taylor expanded in b around 0
sub-negN/A
metadata-evalN/A
distribute-rgt-inN/A
associate-+l+N/A
+-commutativeN/A
associate-+l+N/A
+-commutativeN/A
exp-sumN/A
lower-*.f64N/A
*-commutativeN/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
+-commutativeN/A
mul-1-negN/A
Applied rewrites79.2%
Applied rewrites79.2%
Taylor expanded in y around 0
Applied rewrites79.2%
if -9.39999999999999935e-307 < y < 2.9000000000000002e-23Initial program 96.9%
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.9
Applied rewrites96.9%
Taylor expanded in t around 0
Applied rewrites77.2%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6478.5
Applied rewrites78.5%
Final simplification82.4%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -520000.0)
(/ (* (/ (pow z y) a) x) y)
(if (<= y 7e+54)
(/ (* (exp (- (* (log a) (- t 1.0)) b)) x) y)
(/ (* (exp (* (log z) y)) x) y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -520000.0) {
tmp = ((pow(z, y) / a) * x) / y;
} else if (y <= 7e+54) {
tmp = (exp(((log(a) * (t - 1.0)) - b)) * x) / y;
} else {
tmp = (exp((log(z) * y)) * x) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-520000.0d0)) then
tmp = (((z ** y) / a) * x) / y
else if (y <= 7d+54) then
tmp = (exp(((log(a) * (t - 1.0d0)) - b)) * x) / y
else
tmp = (exp((log(z) * y)) * x) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -520000.0) {
tmp = ((Math.pow(z, y) / a) * x) / y;
} else if (y <= 7e+54) {
tmp = (Math.exp(((Math.log(a) * (t - 1.0)) - b)) * x) / y;
} else {
tmp = (Math.exp((Math.log(z) * y)) * x) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -520000.0: tmp = ((math.pow(z, y) / a) * x) / y elif y <= 7e+54: tmp = (math.exp(((math.log(a) * (t - 1.0)) - b)) * x) / y else: tmp = (math.exp((math.log(z) * y)) * x) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -520000.0) tmp = Float64(Float64(Float64((z ^ y) / a) * x) / y); elseif (y <= 7e+54) tmp = Float64(Float64(exp(Float64(Float64(log(a) * Float64(t - 1.0)) - b)) * x) / y); else tmp = Float64(Float64(exp(Float64(log(z) * y)) * x) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -520000.0) tmp = (((z ^ y) / a) * x) / y; elseif (y <= 7e+54) tmp = (exp(((log(a) * (t - 1.0)) - b)) * x) / y; else tmp = (exp((log(z) * y)) * x) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -520000.0], N[(N[(N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision] * x), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, 7e+54], N[(N[(N[Exp[N[(N[(N[Log[a], $MachinePrecision] * N[(t - 1.0), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision] * x), $MachinePrecision] / y), $MachinePrecision], N[(N[(N[Exp[N[(N[Log[z], $MachinePrecision] * y), $MachinePrecision]], $MachinePrecision] * x), $MachinePrecision] / y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -520000:\\
\;\;\;\;\frac{\frac{{z}^{y}}{a} \cdot x}{y}\\
\mathbf{elif}\;y \leq 7 \cdot 10^{+54}:\\
\;\;\;\;\frac{e^{\log a \cdot \left(t - 1\right) - b} \cdot x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{e^{\log z \cdot y} \cdot x}{y}\\
\end{array}
\end{array}
if y < -5.2e5Initial program 100.0%
Taylor expanded in b around 0
sub-negN/A
metadata-evalN/A
distribute-rgt-inN/A
associate-+l+N/A
+-commutativeN/A
associate-+l+N/A
+-commutativeN/A
exp-sumN/A
lower-*.f64N/A
*-commutativeN/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
+-commutativeN/A
mul-1-negN/A
Applied rewrites75.2%
Taylor expanded in t around 0
Applied rewrites84.2%
if -5.2e5 < y < 7.0000000000000002e54Initial program 97.7%
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.7
Applied rewrites96.7%
if 7.0000000000000002e54 < y Initial program 100.0%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
lower-log.f6492.0
Applied rewrites92.0%
Final simplification93.0%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -520000.0)
(/ (* (/ (pow z y) a) x) y)
(if (<= y 7e+54)
(* (/ (exp (- (* (log a) (- t 1.0)) b)) y) x)
(/ (* (exp (* (log z) y)) x) y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -520000.0) {
tmp = ((pow(z, y) / a) * x) / y;
} else if (y <= 7e+54) {
tmp = (exp(((log(a) * (t - 1.0)) - b)) / y) * x;
} else {
tmp = (exp((log(z) * y)) * x) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-520000.0d0)) then
tmp = (((z ** y) / a) * x) / y
else if (y <= 7d+54) then
tmp = (exp(((log(a) * (t - 1.0d0)) - b)) / y) * x
else
tmp = (exp((log(z) * y)) * x) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -520000.0) {
tmp = ((Math.pow(z, y) / a) * x) / y;
} else if (y <= 7e+54) {
tmp = (Math.exp(((Math.log(a) * (t - 1.0)) - b)) / y) * x;
} else {
tmp = (Math.exp((Math.log(z) * y)) * x) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -520000.0: tmp = ((math.pow(z, y) / a) * x) / y elif y <= 7e+54: tmp = (math.exp(((math.log(a) * (t - 1.0)) - b)) / y) * x else: tmp = (math.exp((math.log(z) * y)) * x) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -520000.0) tmp = Float64(Float64(Float64((z ^ y) / a) * x) / y); elseif (y <= 7e+54) tmp = Float64(Float64(exp(Float64(Float64(log(a) * Float64(t - 1.0)) - b)) / y) * x); else tmp = Float64(Float64(exp(Float64(log(z) * y)) * x) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -520000.0) tmp = (((z ^ y) / a) * x) / y; elseif (y <= 7e+54) tmp = (exp(((log(a) * (t - 1.0)) - b)) / y) * x; else tmp = (exp((log(z) * y)) * x) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -520000.0], N[(N[(N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision] * x), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, 7e+54], N[(N[(N[Exp[N[(N[(N[Log[a], $MachinePrecision] * N[(t - 1.0), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision] * x), $MachinePrecision], N[(N[(N[Exp[N[(N[Log[z], $MachinePrecision] * y), $MachinePrecision]], $MachinePrecision] * x), $MachinePrecision] / y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -520000:\\
\;\;\;\;\frac{\frac{{z}^{y}}{a} \cdot x}{y}\\
\mathbf{elif}\;y \leq 7 \cdot 10^{+54}:\\
\;\;\;\;\frac{e^{\log a \cdot \left(t - 1\right) - b}}{y} \cdot x\\
\mathbf{else}:\\
\;\;\;\;\frac{e^{\log z \cdot y} \cdot x}{y}\\
\end{array}
\end{array}
if y < -5.2e5Initial program 100.0%
Taylor expanded in b around 0
sub-negN/A
metadata-evalN/A
distribute-rgt-inN/A
associate-+l+N/A
+-commutativeN/A
associate-+l+N/A
+-commutativeN/A
exp-sumN/A
lower-*.f64N/A
*-commutativeN/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
+-commutativeN/A
mul-1-negN/A
Applied rewrites75.2%
Taylor expanded in t around 0
Applied rewrites84.2%
if -5.2e5 < y < 7.0000000000000002e54Initial program 97.7%
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.7
Applied rewrites96.7%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites95.8%
if 7.0000000000000002e54 < y Initial program 100.0%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
lower-log.f6492.0
Applied rewrites92.0%
Final simplification92.5%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -30.0)
(/ (* (/ (pow z y) a) x) y)
(if (<= y 6e+54)
(* (/ (pow a (- t 1.0)) (* (exp b) y)) x)
(/ (* (exp (* (log z) y)) x) y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -30.0) {
tmp = ((pow(z, y) / a) * x) / y;
} else if (y <= 6e+54) {
tmp = (pow(a, (t - 1.0)) / (exp(b) * y)) * x;
} else {
tmp = (exp((log(z) * y)) * x) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-30.0d0)) then
tmp = (((z ** y) / a) * x) / y
else if (y <= 6d+54) then
tmp = ((a ** (t - 1.0d0)) / (exp(b) * y)) * x
else
tmp = (exp((log(z) * y)) * x) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -30.0) {
tmp = ((Math.pow(z, y) / a) * x) / y;
} else if (y <= 6e+54) {
tmp = (Math.pow(a, (t - 1.0)) / (Math.exp(b) * y)) * x;
} else {
tmp = (Math.exp((Math.log(z) * y)) * x) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -30.0: tmp = ((math.pow(z, y) / a) * x) / y elif y <= 6e+54: tmp = (math.pow(a, (t - 1.0)) / (math.exp(b) * y)) * x else: tmp = (math.exp((math.log(z) * y)) * x) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -30.0) tmp = Float64(Float64(Float64((z ^ y) / a) * x) / y); elseif (y <= 6e+54) tmp = Float64(Float64((a ^ Float64(t - 1.0)) / Float64(exp(b) * y)) * x); else tmp = Float64(Float64(exp(Float64(log(z) * y)) * x) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -30.0) tmp = (((z ^ y) / a) * x) / y; elseif (y <= 6e+54) tmp = ((a ^ (t - 1.0)) / (exp(b) * y)) * x; else tmp = (exp((log(z) * y)) * x) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -30.0], N[(N[(N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision] * x), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, 6e+54], N[(N[(N[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision] / N[(N[Exp[b], $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], N[(N[(N[Exp[N[(N[Log[z], $MachinePrecision] * y), $MachinePrecision]], $MachinePrecision] * x), $MachinePrecision] / y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -30:\\
\;\;\;\;\frac{\frac{{z}^{y}}{a} \cdot x}{y}\\
\mathbf{elif}\;y \leq 6 \cdot 10^{+54}:\\
\;\;\;\;\frac{{a}^{\left(t - 1\right)}}{e^{b} \cdot y} \cdot x\\
\mathbf{else}:\\
\;\;\;\;\frac{e^{\log z \cdot y} \cdot x}{y}\\
\end{array}
\end{array}
if y < -30Initial program 100.0%
Taylor expanded in b around 0
sub-negN/A
metadata-evalN/A
distribute-rgt-inN/A
associate-+l+N/A
+-commutativeN/A
associate-+l+N/A
+-commutativeN/A
exp-sumN/A
lower-*.f64N/A
*-commutativeN/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
+-commutativeN/A
mul-1-negN/A
Applied rewrites73.8%
Taylor expanded in t around 0
Applied rewrites84.5%
if -30 < y < 5.9999999999999998e54Initial program 97.7%
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.6
Applied rewrites96.6%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites95.8%
Taylor expanded in y around 0
exp-diffN/A
associate-/l/N/A
lower-/.f64N/A
exp-to-powN/A
lower-pow.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-exp.f6486.8
Applied rewrites86.8%
if 5.9999999999999998e54 < y Initial program 100.0%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
lower-log.f6492.0
Applied rewrites92.0%
Final simplification87.3%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -3.1e+128)
(* (/ (pow a (- t 1.0)) y) x)
(if (<= t 6.8e-171)
(/ (* (exp (- (- (log a)) b)) x) y)
(if (<= t 5.1e+33)
(/ (* (/ (pow z y) a) x) y)
(/ (* (* (/ 1.0 (sqrt a)) (/ (pow a t) (sqrt a))) x) y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -3.1e+128) {
tmp = (pow(a, (t - 1.0)) / y) * x;
} else if (t <= 6.8e-171) {
tmp = (exp((-log(a) - b)) * x) / y;
} else if (t <= 5.1e+33) {
tmp = ((pow(z, y) / a) * x) / y;
} else {
tmp = (((1.0 / sqrt(a)) * (pow(a, t) / sqrt(a))) * x) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= (-3.1d+128)) then
tmp = ((a ** (t - 1.0d0)) / y) * x
else if (t <= 6.8d-171) then
tmp = (exp((-log(a) - b)) * x) / y
else if (t <= 5.1d+33) then
tmp = (((z ** y) / a) * x) / y
else
tmp = (((1.0d0 / sqrt(a)) * ((a ** t) / sqrt(a))) * x) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -3.1e+128) {
tmp = (Math.pow(a, (t - 1.0)) / y) * x;
} else if (t <= 6.8e-171) {
tmp = (Math.exp((-Math.log(a) - b)) * x) / y;
} else if (t <= 5.1e+33) {
tmp = ((Math.pow(z, y) / a) * x) / y;
} else {
tmp = (((1.0 / Math.sqrt(a)) * (Math.pow(a, t) / Math.sqrt(a))) * x) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -3.1e+128: tmp = (math.pow(a, (t - 1.0)) / y) * x elif t <= 6.8e-171: tmp = (math.exp((-math.log(a) - b)) * x) / y elif t <= 5.1e+33: tmp = ((math.pow(z, y) / a) * x) / y else: tmp = (((1.0 / math.sqrt(a)) * (math.pow(a, t) / math.sqrt(a))) * x) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -3.1e+128) tmp = Float64(Float64((a ^ Float64(t - 1.0)) / y) * x); elseif (t <= 6.8e-171) tmp = Float64(Float64(exp(Float64(Float64(-log(a)) - b)) * x) / y); elseif (t <= 5.1e+33) tmp = Float64(Float64(Float64((z ^ y) / a) * x) / y); else tmp = Float64(Float64(Float64(Float64(1.0 / sqrt(a)) * Float64((a ^ t) / sqrt(a))) * x) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -3.1e+128) tmp = ((a ^ (t - 1.0)) / y) * x; elseif (t <= 6.8e-171) tmp = (exp((-log(a) - b)) * x) / y; elseif (t <= 5.1e+33) tmp = (((z ^ y) / a) * x) / y; else tmp = (((1.0 / sqrt(a)) * ((a ^ t) / sqrt(a))) * x) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -3.1e+128], N[(N[(N[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[t, 6.8e-171], N[(N[(N[Exp[N[((-N[Log[a], $MachinePrecision]) - b), $MachinePrecision]], $MachinePrecision] * x), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t, 5.1e+33], N[(N[(N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision] * x), $MachinePrecision] / y), $MachinePrecision], N[(N[(N[(N[(1.0 / N[Sqrt[a], $MachinePrecision]), $MachinePrecision] * N[(N[Power[a, t], $MachinePrecision] / N[Sqrt[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision] / y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.1 \cdot 10^{+128}:\\
\;\;\;\;\frac{{a}^{\left(t - 1\right)}}{y} \cdot x\\
\mathbf{elif}\;t \leq 6.8 \cdot 10^{-171}:\\
\;\;\;\;\frac{e^{\left(-\log a\right) - b} \cdot x}{y}\\
\mathbf{elif}\;t \leq 5.1 \cdot 10^{+33}:\\
\;\;\;\;\frac{\frac{{z}^{y}}{a} \cdot x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(\frac{1}{\sqrt{a}} \cdot \frac{{a}^{t}}{\sqrt{a}}\right) \cdot x}{y}\\
\end{array}
\end{array}
if t < -3.10000000000000004e128Initial program 100.0%
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--.f6482.7
Applied rewrites82.7%
Taylor expanded in y around 0
Applied rewrites89.3%
if -3.10000000000000004e128 < t < 6.7999999999999997e-171Initial program 97.9%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
rem-exp-logN/A
lower-log.f64N/A
rem-exp-log82.2
Applied rewrites82.2%
Taylor expanded in t around 0
Applied rewrites77.4%
if 6.7999999999999997e-171 < t < 5.0999999999999999e33Initial program 97.5%
Taylor expanded in b around 0
sub-negN/A
metadata-evalN/A
distribute-rgt-inN/A
associate-+l+N/A
+-commutativeN/A
associate-+l+N/A
+-commutativeN/A
exp-sumN/A
lower-*.f64N/A
*-commutativeN/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
+-commutativeN/A
mul-1-negN/A
Applied rewrites77.3%
Taylor expanded in t around 0
Applied rewrites80.4%
if 5.0999999999999999e33 < t Initial program 100.0%
Taylor expanded in b around 0
sub-negN/A
metadata-evalN/A
distribute-rgt-inN/A
associate-+l+N/A
+-commutativeN/A
associate-+l+N/A
+-commutativeN/A
exp-sumN/A
lower-*.f64N/A
*-commutativeN/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
+-commutativeN/A
mul-1-negN/A
Applied rewrites86.6%
Taylor expanded in y around 0
Applied rewrites90.5%
Applied rewrites90.5%
Final simplification82.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* (/ (pow z y) a) x) y)))
(if (<= y -1.3e-10)
t_1
(if (<= y 5.2e-6) (* (/ (pow a (- t 1.0)) 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 <= -1.3e-10) {
tmp = t_1;
} else if (y <= 5.2e-6) {
tmp = (pow(a, (t - 1.0)) / 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 <= (-1.3d-10)) then
tmp = t_1
else if (y <= 5.2d-6) then
tmp = ((a ** (t - 1.0d0)) / 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 <= -1.3e-10) {
tmp = t_1;
} else if (y <= 5.2e-6) {
tmp = (Math.pow(a, (t - 1.0)) / 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 <= -1.3e-10: tmp = t_1 elif y <= 5.2e-6: tmp = (math.pow(a, (t - 1.0)) / 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 <= -1.3e-10) tmp = t_1; elseif (y <= 5.2e-6) tmp = Float64(Float64((a ^ Float64(t - 1.0)) / 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 <= -1.3e-10) tmp = t_1; elseif (y <= 5.2e-6) tmp = ((a ^ (t - 1.0)) / 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, -1.3e-10], t$95$1, If[LessEqual[y, 5.2e-6], N[(N[(N[Power[a, N[(t - 1.0), $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 -1.3 \cdot 10^{-10}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 5.2 \cdot 10^{-6}:\\
\;\;\;\;\frac{{a}^{\left(t - 1\right)}}{y} \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.29999999999999991e-10 or 5.20000000000000019e-6 < y Initial program 99.9%
Taylor expanded in b around 0
sub-negN/A
metadata-evalN/A
distribute-rgt-inN/A
associate-+l+N/A
+-commutativeN/A
associate-+l+N/A
+-commutativeN/A
exp-sumN/A
lower-*.f64N/A
*-commutativeN/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
+-commutativeN/A
mul-1-negN/A
Applied rewrites75.2%
Taylor expanded in t around 0
Applied rewrites86.9%
if -1.29999999999999991e-10 < y < 5.20000000000000019e-6Initial program 97.5%
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--.f6475.4
Applied rewrites75.4%
Taylor expanded in y around 0
Applied rewrites75.4%
Final simplification80.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (/ (exp (- b)) y) x)))
(if (<= b -3.2e+23)
t_1
(if (<= b 4500.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 <= -3.2e+23) {
tmp = t_1;
} else if (b <= 4500.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 <= (-3.2d+23)) then
tmp = t_1
else if (b <= 4500.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 <= -3.2e+23) {
tmp = t_1;
} else if (b <= 4500.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 <= -3.2e+23: tmp = t_1 elif b <= 4500.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 <= -3.2e+23) tmp = t_1; elseif (b <= 4500.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 <= -3.2e+23) tmp = t_1; elseif (b <= 4500.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, -3.2e+23], t$95$1, If[LessEqual[b, 4500.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 -3.2 \cdot 10^{+23}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 4500:\\
\;\;\;\;\frac{{a}^{\left(t - 1\right)} \cdot x}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -3.2e23 or 4500 < b Initial program 100.0%
Taylor expanded in b around inf
mul-1-negN/A
lower-neg.f6479.7
Applied rewrites79.7%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6479.7
Applied rewrites79.7%
if -3.2e23 < b < 4500Initial program 97.3%
Taylor expanded in b around 0
sub-negN/A
metadata-evalN/A
distribute-rgt-inN/A
associate-+l+N/A
+-commutativeN/A
associate-+l+N/A
+-commutativeN/A
exp-sumN/A
lower-*.f64N/A
*-commutativeN/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
+-commutativeN/A
mul-1-negN/A
Applied rewrites91.9%
Taylor expanded in y around 0
Applied rewrites77.0%
Final simplification78.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (/ (exp (- b)) y) x)))
(if (<= b -3.2e+23)
t_1
(if (<= b 4500.0) (* (/ (pow a (- t 1.0)) y) x) 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 <= -3.2e+23) {
tmp = t_1;
} else if (b <= 4500.0) {
tmp = (pow(a, (t - 1.0)) / 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 = (exp(-b) / y) * x
if (b <= (-3.2d+23)) then
tmp = t_1
else if (b <= 4500.0d0) then
tmp = ((a ** (t - 1.0d0)) / 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.exp(-b) / y) * x;
double tmp;
if (b <= -3.2e+23) {
tmp = t_1;
} else if (b <= 4500.0) {
tmp = (Math.pow(a, (t - 1.0)) / y) * x;
} 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 <= -3.2e+23: tmp = t_1 elif b <= 4500.0: tmp = (math.pow(a, (t - 1.0)) / y) * x 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 <= -3.2e+23) tmp = t_1; elseif (b <= 4500.0) tmp = Float64(Float64((a ^ Float64(t - 1.0)) / y) * x); 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 <= -3.2e+23) tmp = t_1; elseif (b <= 4500.0) tmp = ((a ^ (t - 1.0)) / 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[Exp[(-b)], $MachinePrecision] / y), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[b, -3.2e+23], t$95$1, If[LessEqual[b, 4500.0], N[(N[(N[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision] * x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{e^{-b}}{y} \cdot x\\
\mathbf{if}\;b \leq -3.2 \cdot 10^{+23}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 4500:\\
\;\;\;\;\frac{{a}^{\left(t - 1\right)}}{y} \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -3.2e23 or 4500 < b Initial program 100.0%
Taylor expanded in b around inf
mul-1-negN/A
lower-neg.f6479.7
Applied rewrites79.7%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6479.7
Applied rewrites79.7%
if -3.2e23 < b < 4500Initial program 97.3%
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--.f6489.7
Applied rewrites89.7%
Taylor expanded in y around 0
Applied rewrites76.6%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* (/ (exp (- b)) y) x))) (if (<= b -135.0) t_1 (if (<= b 2.05e-8) (/ (* (/ 1.0 a) 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 <= -135.0) {
tmp = t_1;
} else if (b <= 2.05e-8) {
tmp = ((1.0 / 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(-b) / y) * x
if (b <= (-135.0d0)) then
tmp = t_1
else if (b <= 2.05d-8) then
tmp = ((1.0d0 / 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(-b) / y) * x;
double tmp;
if (b <= -135.0) {
tmp = t_1;
} else if (b <= 2.05e-8) {
tmp = ((1.0 / a) * 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 <= -135.0: tmp = t_1 elif b <= 2.05e-8: tmp = ((1.0 / a) * 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 <= -135.0) tmp = t_1; elseif (b <= 2.05e-8) tmp = Float64(Float64(Float64(1.0 / a) * 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 <= -135.0) tmp = t_1; elseif (b <= 2.05e-8) tmp = ((1.0 / 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[(-b)], $MachinePrecision] / y), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[b, -135.0], t$95$1, If[LessEqual[b, 2.05e-8], N[(N[(N[(1.0 / a), $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 -135:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 2.05 \cdot 10^{-8}:\\
\;\;\;\;\frac{\frac{1}{a} \cdot x}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -135 or 2.05000000000000016e-8 < b Initial program 100.0%
Taylor expanded in b around inf
mul-1-negN/A
lower-neg.f6477.1
Applied rewrites77.1%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6477.1
Applied rewrites77.1%
if -135 < b < 2.05000000000000016e-8Initial program 97.1%
Taylor expanded in b around 0
sub-negN/A
metadata-evalN/A
distribute-rgt-inN/A
associate-+l+N/A
+-commutativeN/A
associate-+l+N/A
+-commutativeN/A
exp-sumN/A
lower-*.f64N/A
*-commutativeN/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
+-commutativeN/A
mul-1-negN/A
Applied rewrites93.6%
Taylor expanded in t around 0
Applied rewrites76.6%
Taylor expanded in y around 0
Applied rewrites43.5%
Final simplification61.5%
(FPCore (x y z t a b) :precision binary64 (if (<= t -1e-177) (/ (* (/ 1.0 a) x) y) (* (/ (/ 1.0 a) y) x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1e-177) {
tmp = ((1.0 / a) * x) / y;
} else {
tmp = ((1.0 / a) / y) * x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= (-1d-177)) then
tmp = ((1.0d0 / a) * x) / y
else
tmp = ((1.0d0 / a) / y) * x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1e-177) {
tmp = ((1.0 / a) * x) / y;
} else {
tmp = ((1.0 / a) / y) * x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -1e-177: tmp = ((1.0 / a) * x) / y else: tmp = ((1.0 / a) / y) * x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -1e-177) tmp = Float64(Float64(Float64(1.0 / a) * x) / y); else tmp = Float64(Float64(Float64(1.0 / a) / y) * x); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -1e-177) tmp = ((1.0 / a) * x) / y; else tmp = ((1.0 / a) / y) * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -1e-177], N[(N[(N[(1.0 / a), $MachinePrecision] * x), $MachinePrecision] / y), $MachinePrecision], N[(N[(N[(1.0 / a), $MachinePrecision] / y), $MachinePrecision] * x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1 \cdot 10^{-177}:\\
\;\;\;\;\frac{\frac{1}{a} \cdot x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1}{a}}{y} \cdot x\\
\end{array}
\end{array}
if t < -9.99999999999999952e-178Initial program 99.2%
Taylor expanded in b around 0
sub-negN/A
metadata-evalN/A
distribute-rgt-inN/A
associate-+l+N/A
+-commutativeN/A
associate-+l+N/A
+-commutativeN/A
exp-sumN/A
lower-*.f64N/A
*-commutativeN/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
+-commutativeN/A
mul-1-negN/A
Applied rewrites74.1%
Taylor expanded in t around 0
Applied rewrites63.0%
Taylor expanded in y around 0
Applied rewrites35.4%
if -9.99999999999999952e-178 < t Initial program 98.2%
Taylor expanded in b around 0
sub-negN/A
metadata-evalN/A
distribute-rgt-inN/A
associate-+l+N/A
+-commutativeN/A
associate-+l+N/A
+-commutativeN/A
exp-sumN/A
lower-*.f64N/A
*-commutativeN/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
+-commutativeN/A
mul-1-negN/A
Applied rewrites75.4%
Taylor expanded in t around 0
Applied rewrites60.2%
Taylor expanded in y around 0
Applied rewrites28.0%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6431.0
Applied rewrites31.0%
Final simplification33.0%
(FPCore (x y z t a b) :precision binary64 (* (/ (/ 1.0 a) y) x))
double code(double x, double y, double z, double t, double a, double b) {
return ((1.0 / a) / y) * x;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((1.0d0 / a) / y) * x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((1.0 / a) / y) * x;
}
def code(x, y, z, t, a, b): return ((1.0 / a) / y) * x
function code(x, y, z, t, a, b) return Float64(Float64(Float64(1.0 / a) / y) * x) end
function tmp = code(x, y, z, t, a, b) tmp = ((1.0 / a) / y) * x; end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(1.0 / a), $MachinePrecision] / y), $MachinePrecision] * x), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{1}{a}}{y} \cdot x
\end{array}
Initial program 98.6%
Taylor expanded in b around 0
sub-negN/A
metadata-evalN/A
distribute-rgt-inN/A
associate-+l+N/A
+-commutativeN/A
associate-+l+N/A
+-commutativeN/A
exp-sumN/A
lower-*.f64N/A
*-commutativeN/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
+-commutativeN/A
mul-1-negN/A
Applied rewrites74.8%
Taylor expanded in t around 0
Applied rewrites61.5%
Taylor expanded in y around 0
Applied rewrites31.4%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6430.4
Applied rewrites30.4%
(FPCore (x y z t a b) :precision binary64 (* (/ x y) (/ 1.0 a)))
double code(double x, double y, double z, double t, double a, double b) {
return (x / y) * (1.0 / a);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (x / y) * (1.0d0 / a)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x / y) * (1.0 / a);
}
def code(x, y, z, t, a, b): return (x / y) * (1.0 / a)
function code(x, y, z, t, a, b) return Float64(Float64(x / y) * Float64(1.0 / a)) end
function tmp = code(x, y, z, t, a, b) tmp = (x / y) * (1.0 / a); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x / y), $MachinePrecision] * N[(1.0 / a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{y} \cdot \frac{1}{a}
\end{array}
Initial program 98.6%
Taylor expanded in b around 0
sub-negN/A
metadata-evalN/A
distribute-rgt-inN/A
associate-+l+N/A
+-commutativeN/A
associate-+l+N/A
+-commutativeN/A
exp-sumN/A
lower-*.f64N/A
*-commutativeN/A
exp-prodN/A
lower-pow.f64N/A
rem-exp-logN/A
+-commutativeN/A
mul-1-negN/A
Applied rewrites74.8%
Taylor expanded in t around 0
Applied rewrites61.5%
Taylor expanded in y around 0
Applied rewrites31.4%
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6430.3
Applied rewrites30.3%
Final simplification30.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 2024244
(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))