
(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;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
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 15 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;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (x * exp((((y * log(z)) + ((t - 1.0d0) * log(a))) - b))) / y
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x * Math.exp((((y * Math.log(z)) + ((t - 1.0) * Math.log(a))) - b))) / y;
}
def code(x, y, z, t, a, b): return (x * math.exp((((y * math.log(z)) + ((t - 1.0) * math.log(a))) - b))) / y
function code(x, y, z, t, a, b) return Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) + Float64(Float64(t - 1.0) * log(a))) - b))) / y) end
function tmp = code(x, y, z, t, a, b) tmp = (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y; end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x * N[Exp[N[(N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] + N[(N[(t - 1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}
\end{array}
(FPCore (x y z t a b) :precision binary64 (/ (* x (exp (- (+ (* y (log z)) (* (- t 1.0) (log a))) b))) y))
double code(double x, double y, double z, double t, double a, double b) {
return (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (x * exp((((y * log(z)) + ((t - 1.0d0) * log(a))) - b))) / y
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x * Math.exp((((y * Math.log(z)) + ((t - 1.0) * Math.log(a))) - b))) / y;
}
def code(x, y, z, t, a, b): return (x * math.exp((((y * math.log(z)) + ((t - 1.0) * math.log(a))) - b))) / y
function code(x, y, z, t, a, b) return Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) + Float64(Float64(t - 1.0) * log(a))) - b))) / y) end
function tmp = code(x, y, z, t, a, b) tmp = (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y; end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x * N[Exp[N[(N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] + N[(N[(t - 1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}
\end{array}
Initial program 98.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.65) (not (<= y 2.2))) (/ (* x (exp (- (* (log z) y) b))) y) (* (/ (* (pow a (- t 1.0)) (pow z y)) (* (exp b) y)) x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.65) || !(y <= 2.2)) {
tmp = (x * exp(((log(z) * y) - b))) / y;
} else {
tmp = ((pow(a, (t - 1.0)) * pow(z, y)) / (exp(b) * y)) * x;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-1.65d0)) .or. (.not. (y <= 2.2d0))) then
tmp = (x * exp(((log(z) * y) - b))) / y
else
tmp = (((a ** (t - 1.0d0)) * (z ** y)) / (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 ((y <= -1.65) || !(y <= 2.2)) {
tmp = (x * Math.exp(((Math.log(z) * y) - b))) / y;
} else {
tmp = ((Math.pow(a, (t - 1.0)) * Math.pow(z, y)) / (Math.exp(b) * y)) * x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1.65) or not (y <= 2.2): tmp = (x * math.exp(((math.log(z) * y) - b))) / y else: tmp = ((math.pow(a, (t - 1.0)) * math.pow(z, y)) / (math.exp(b) * y)) * x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1.65) || !(y <= 2.2)) tmp = Float64(Float64(x * exp(Float64(Float64(log(z) * y) - b))) / y); else tmp = Float64(Float64(Float64((a ^ Float64(t - 1.0)) * (z ^ y)) / Float64(exp(b) * y)) * x); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -1.65) || ~((y <= 2.2))) tmp = (x * exp(((log(z) * y) - b))) / y; else tmp = (((a ^ (t - 1.0)) * (z ^ y)) / (exp(b) * y)) * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1.65], N[Not[LessEqual[y, 2.2]], $MachinePrecision]], N[(N[(x * N[Exp[N[(N[(N[Log[z], $MachinePrecision] * y), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(N[(N[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision] * N[Power[z, y], $MachinePrecision]), $MachinePrecision] / N[(N[Exp[b], $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.65 \lor \neg \left(y \leq 2.2\right):\\
\;\;\;\;\frac{x \cdot e^{\log z \cdot y - b}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{{a}^{\left(t - 1\right)} \cdot {z}^{y}}{e^{b} \cdot y} \cdot x\\
\end{array}
\end{array}
if y < -1.6499999999999999 or 2.2000000000000002 < y Initial program 100.0%
Taylor expanded in y around inf
Applied rewrites89.9%
if -1.6499999999999999 < y < 2.2000000000000002Initial program 97.3%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites90.0%
Final simplification89.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* x (exp (- (* (log z) y) b))) y)))
(if (<= y -2.05e+32)
t_1
(if (<= y 1.2e-60)
(/ (* x (exp (- (* (log a) t) b))) y)
(if (<= y 7.2e+16) (* (* (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 = (x * exp(((log(z) * y) - b))) / y;
double tmp;
if (y <= -2.05e+32) {
tmp = t_1;
} else if (y <= 1.2e-60) {
tmp = (x * exp(((log(a) * t) - b))) / y;
} else if (y <= 7.2e+16) {
tmp = (pow(a, (t - 1.0)) * pow(z, y)) * (x / y);
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (x * exp(((log(z) * y) - b))) / y
if (y <= (-2.05d+32)) then
tmp = t_1
else if (y <= 1.2d-60) then
tmp = (x * exp(((log(a) * t) - b))) / y
else if (y <= 7.2d+16) 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 = (x * Math.exp(((Math.log(z) * y) - b))) / y;
double tmp;
if (y <= -2.05e+32) {
tmp = t_1;
} else if (y <= 1.2e-60) {
tmp = (x * Math.exp(((Math.log(a) * t) - b))) / y;
} else if (y <= 7.2e+16) {
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 = (x * math.exp(((math.log(z) * y) - b))) / y tmp = 0 if y <= -2.05e+32: tmp = t_1 elif y <= 1.2e-60: tmp = (x * math.exp(((math.log(a) * t) - b))) / y elif y <= 7.2e+16: 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(x * exp(Float64(Float64(log(z) * y) - b))) / y) tmp = 0.0 if (y <= -2.05e+32) tmp = t_1; elseif (y <= 1.2e-60) tmp = Float64(Float64(x * exp(Float64(Float64(log(a) * t) - b))) / y); elseif (y <= 7.2e+16) tmp = Float64(Float64((a ^ Float64(t - 1.0)) * (z ^ y)) * Float64(x / y)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x * exp(((log(z) * y) - b))) / y; tmp = 0.0; if (y <= -2.05e+32) tmp = t_1; elseif (y <= 1.2e-60) tmp = (x * exp(((log(a) * t) - b))) / y; elseif (y <= 7.2e+16) 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[(x * N[Exp[N[(N[(N[Log[z], $MachinePrecision] * y), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[y, -2.05e+32], t$95$1, If[LessEqual[y, 1.2e-60], N[(N[(x * N[Exp[N[(N[(N[Log[a], $MachinePrecision] * t), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, 7.2e+16], N[(N[(N[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision] * N[Power[z, y], $MachinePrecision]), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x \cdot e^{\log z \cdot y - b}}{y}\\
\mathbf{if}\;y \leq -2.05 \cdot 10^{+32}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.2 \cdot 10^{-60}:\\
\;\;\;\;\frac{x \cdot e^{\log a \cdot t - b}}{y}\\
\mathbf{elif}\;y \leq 7.2 \cdot 10^{+16}:\\
\;\;\;\;\left({a}^{\left(t - 1\right)} \cdot {z}^{y}\right) \cdot \frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -2.0499999999999999e32 or 7.2e16 < y Initial program 100.0%
Taylor expanded in y around inf
Applied rewrites93.6%
if -2.0499999999999999e32 < y < 1.20000000000000005e-60Initial program 97.5%
Taylor expanded in t around inf
Applied rewrites85.1%
if 1.20000000000000005e-60 < y < 7.2e16Initial program 97.9%
Taylor expanded in b around 0
Applied rewrites85.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* x (exp (- (* (log z) y) b))) y)))
(if (<= y -2.05e+32)
t_1
(if (<= y 2.8e-63)
(/ (* x (exp (- (* (log a) t) b))) y)
(if (<= y 7.2e+16) (* (/ (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 = (x * exp(((log(z) * y) - b))) / y;
double tmp;
if (y <= -2.05e+32) {
tmp = t_1;
} else if (y <= 2.8e-63) {
tmp = (x * exp(((log(a) * t) - b))) / y;
} else if (y <= 7.2e+16) {
tmp = (pow(a, (t - 1.0)) / y) * x;
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (x * exp(((log(z) * y) - b))) / y
if (y <= (-2.05d+32)) then
tmp = t_1
else if (y <= 2.8d-63) then
tmp = (x * exp(((log(a) * t) - b))) / y
else if (y <= 7.2d+16) 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 = (x * Math.exp(((Math.log(z) * y) - b))) / y;
double tmp;
if (y <= -2.05e+32) {
tmp = t_1;
} else if (y <= 2.8e-63) {
tmp = (x * Math.exp(((Math.log(a) * t) - b))) / y;
} else if (y <= 7.2e+16) {
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 = (x * math.exp(((math.log(z) * y) - b))) / y tmp = 0 if y <= -2.05e+32: tmp = t_1 elif y <= 2.8e-63: tmp = (x * math.exp(((math.log(a) * t) - b))) / y elif y <= 7.2e+16: 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(x * exp(Float64(Float64(log(z) * y) - b))) / y) tmp = 0.0 if (y <= -2.05e+32) tmp = t_1; elseif (y <= 2.8e-63) tmp = Float64(Float64(x * exp(Float64(Float64(log(a) * t) - b))) / y); elseif (y <= 7.2e+16) 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 = (x * exp(((log(z) * y) - b))) / y; tmp = 0.0; if (y <= -2.05e+32) tmp = t_1; elseif (y <= 2.8e-63) tmp = (x * exp(((log(a) * t) - b))) / y; elseif (y <= 7.2e+16) 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[(x * N[Exp[N[(N[(N[Log[z], $MachinePrecision] * y), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[y, -2.05e+32], t$95$1, If[LessEqual[y, 2.8e-63], N[(N[(x * N[Exp[N[(N[(N[Log[a], $MachinePrecision] * t), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, 7.2e+16], 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{x \cdot e^{\log z \cdot y - b}}{y}\\
\mathbf{if}\;y \leq -2.05 \cdot 10^{+32}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 2.8 \cdot 10^{-63}:\\
\;\;\;\;\frac{x \cdot e^{\log a \cdot t - b}}{y}\\
\mathbf{elif}\;y \leq 7.2 \cdot 10^{+16}:\\
\;\;\;\;\frac{{a}^{\left(t - 1\right)}}{y} \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -2.0499999999999999e32 or 7.2e16 < y Initial program 100.0%
Taylor expanded in y around inf
Applied rewrites93.6%
if -2.0499999999999999e32 < y < 2.8000000000000002e-63Initial program 97.5%
Taylor expanded in t around inf
Applied rewrites85.1%
if 2.8000000000000002e-63 < y < 7.2e16Initial program 97.9%
Taylor expanded in b around 0
Applied rewrites85.0%
Taylor expanded in y around 0
Applied rewrites82.4%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6482.4
Applied rewrites82.4%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -7e-7)
(/ (* x (exp (- (* (log a) t) b))) y)
(if (<= b 8.6e-36)
(/ (* x (* (pow a (- t 1.0)) (pow z y))) y)
(/ (* x (exp (- (* (log z) y) b))) y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -7e-7) {
tmp = (x * exp(((log(a) * t) - b))) / y;
} else if (b <= 8.6e-36) {
tmp = (x * (pow(a, (t - 1.0)) * pow(z, y))) / y;
} else {
tmp = (x * exp(((log(z) * y) - b))) / y;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
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 <= (-7d-7)) then
tmp = (x * exp(((log(a) * t) - b))) / y
else if (b <= 8.6d-36) then
tmp = (x * ((a ** (t - 1.0d0)) * (z ** y))) / y
else
tmp = (x * exp(((log(z) * y) - b))) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -7e-7) {
tmp = (x * Math.exp(((Math.log(a) * t) - b))) / y;
} else if (b <= 8.6e-36) {
tmp = (x * (Math.pow(a, (t - 1.0)) * Math.pow(z, y))) / y;
} else {
tmp = (x * Math.exp(((Math.log(z) * y) - b))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -7e-7: tmp = (x * math.exp(((math.log(a) * t) - b))) / y elif b <= 8.6e-36: tmp = (x * (math.pow(a, (t - 1.0)) * math.pow(z, y))) / y else: tmp = (x * math.exp(((math.log(z) * y) - b))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -7e-7) tmp = Float64(Float64(x * exp(Float64(Float64(log(a) * t) - b))) / y); elseif (b <= 8.6e-36) tmp = Float64(Float64(x * Float64((a ^ Float64(t - 1.0)) * (z ^ y))) / y); else tmp = Float64(Float64(x * exp(Float64(Float64(log(z) * y) - b))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -7e-7) tmp = (x * exp(((log(a) * t) - b))) / y; elseif (b <= 8.6e-36) tmp = (x * ((a ^ (t - 1.0)) * (z ^ y))) / y; else tmp = (x * exp(((log(z) * y) - b))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -7e-7], N[(N[(x * N[Exp[N[(N[(N[Log[a], $MachinePrecision] * t), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[b, 8.6e-36], N[(N[(x * N[(N[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision] * N[Power[z, y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x * N[Exp[N[(N[(N[Log[z], $MachinePrecision] * y), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -7 \cdot 10^{-7}:\\
\;\;\;\;\frac{x \cdot e^{\log a \cdot t - b}}{y}\\
\mathbf{elif}\;b \leq 8.6 \cdot 10^{-36}:\\
\;\;\;\;\frac{x \cdot \left({a}^{\left(t - 1\right)} \cdot {z}^{y}\right)}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot e^{\log z \cdot y - b}}{y}\\
\end{array}
\end{array}
if b < -6.99999999999999968e-7Initial program 100.0%
Taylor expanded in t around inf
Applied rewrites89.5%
if -6.99999999999999968e-7 < b < 8.6000000000000004e-36Initial program 97.4%
Taylor expanded in b around 0
Applied rewrites86.8%
if 8.6000000000000004e-36 < b Initial program 99.8%
Taylor expanded in y around inf
Applied rewrites95.1%
(FPCore (x y z t a b) :precision binary64 (if (<= b -1.35e-29) (/ (* x (exp (- (* (log a) t) b))) y) (if (<= b 2300.0) (/ (* (/ (pow z y) y) x) a) (* (/ (exp (- b)) y) x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.35e-29) {
tmp = (x * exp(((log(a) * t) - b))) / y;
} else if (b <= 2300.0) {
tmp = ((pow(z, y) / y) * x) / a;
} else {
tmp = (exp(-b) / y) * x;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-1.35d-29)) then
tmp = (x * exp(((log(a) * t) - b))) / y
else if (b <= 2300.0d0) then
tmp = (((z ** y) / y) * x) / a
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 <= -1.35e-29) {
tmp = (x * Math.exp(((Math.log(a) * t) - b))) / y;
} else if (b <= 2300.0) {
tmp = ((Math.pow(z, y) / y) * x) / a;
} else {
tmp = (Math.exp(-b) / y) * x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -1.35e-29: tmp = (x * math.exp(((math.log(a) * t) - b))) / y elif b <= 2300.0: tmp = ((math.pow(z, y) / y) * x) / a else: tmp = (math.exp(-b) / y) * x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1.35e-29) tmp = Float64(Float64(x * exp(Float64(Float64(log(a) * t) - b))) / y); elseif (b <= 2300.0) tmp = Float64(Float64(Float64((z ^ y) / y) * x) / a); 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 <= -1.35e-29) tmp = (x * exp(((log(a) * t) - b))) / y; elseif (b <= 2300.0) tmp = (((z ^ y) / y) * x) / a; else tmp = (exp(-b) / y) * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.35e-29], N[(N[(x * N[Exp[N[(N[(N[Log[a], $MachinePrecision] * t), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[b, 2300.0], N[(N[(N[(N[Power[z, y], $MachinePrecision] / y), $MachinePrecision] * x), $MachinePrecision] / a), $MachinePrecision], N[(N[(N[Exp[(-b)], $MachinePrecision] / y), $MachinePrecision] * x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.35 \cdot 10^{-29}:\\
\;\;\;\;\frac{x \cdot e^{\log a \cdot t - b}}{y}\\
\mathbf{elif}\;b \leq 2300:\\
\;\;\;\;\frac{\frac{{z}^{y}}{y} \cdot x}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{e^{-b}}{y} \cdot x\\
\end{array}
\end{array}
if b < -1.35000000000000011e-29Initial program 99.9%
Taylor expanded in t around inf
Applied rewrites88.0%
if -1.35000000000000011e-29 < b < 2300Initial program 97.5%
Taylor expanded in b around 0
Applied rewrites81.3%
Applied rewrites81.3%
Applied rewrites86.2%
Taylor expanded in t around 0
Applied rewrites80.2%
if 2300 < b Initial program 100.0%
Taylor expanded in y around inf
Applied rewrites96.2%
Taylor expanded in b around inf
Applied rewrites90.5%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6490.5
Applied rewrites90.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (pow a (- t 1.0)))
(t_2 (* (/ (exp (- b)) y) x))
(t_3 (* (pow z y) (/ x (* a y)))))
(if (<= b -4.2e+38)
t_2
(if (<= b -1.3e-49)
(* (/ t_1 y) x)
(if (<= b -5.2e-210)
t_3
(if (<= b 2.05e-99) (/ (* x t_1) y) (if (<= b 80.0) t_3 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 = (exp(-b) / y) * x;
double t_3 = pow(z, y) * (x / (a * y));
double tmp;
if (b <= -4.2e+38) {
tmp = t_2;
} else if (b <= -1.3e-49) {
tmp = (t_1 / y) * x;
} else if (b <= -5.2e-210) {
tmp = t_3;
} else if (b <= 2.05e-99) {
tmp = (x * t_1) / y;
} else if (b <= 80.0) {
tmp = t_3;
} else {
tmp = t_2;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
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) :: t_3
real(8) :: tmp
t_1 = a ** (t - 1.0d0)
t_2 = (exp(-b) / y) * x
t_3 = (z ** y) * (x / (a * y))
if (b <= (-4.2d+38)) then
tmp = t_2
else if (b <= (-1.3d-49)) then
tmp = (t_1 / y) * x
else if (b <= (-5.2d-210)) then
tmp = t_3
else if (b <= 2.05d-99) then
tmp = (x * t_1) / y
else if (b <= 80.0d0) then
tmp = t_3
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 = (Math.exp(-b) / y) * x;
double t_3 = Math.pow(z, y) * (x / (a * y));
double tmp;
if (b <= -4.2e+38) {
tmp = t_2;
} else if (b <= -1.3e-49) {
tmp = (t_1 / y) * x;
} else if (b <= -5.2e-210) {
tmp = t_3;
} else if (b <= 2.05e-99) {
tmp = (x * t_1) / y;
} else if (b <= 80.0) {
tmp = t_3;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = math.pow(a, (t - 1.0)) t_2 = (math.exp(-b) / y) * x t_3 = math.pow(z, y) * (x / (a * y)) tmp = 0 if b <= -4.2e+38: tmp = t_2 elif b <= -1.3e-49: tmp = (t_1 / y) * x elif b <= -5.2e-210: tmp = t_3 elif b <= 2.05e-99: tmp = (x * t_1) / y elif b <= 80.0: tmp = t_3 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(exp(Float64(-b)) / y) * x) t_3 = Float64((z ^ y) * Float64(x / Float64(a * y))) tmp = 0.0 if (b <= -4.2e+38) tmp = t_2; elseif (b <= -1.3e-49) tmp = Float64(Float64(t_1 / y) * x); elseif (b <= -5.2e-210) tmp = t_3; elseif (b <= 2.05e-99) tmp = Float64(Float64(x * t_1) / y); elseif (b <= 80.0) tmp = t_3; 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 = (exp(-b) / y) * x; t_3 = (z ^ y) * (x / (a * y)); tmp = 0.0; if (b <= -4.2e+38) tmp = t_2; elseif (b <= -1.3e-49) tmp = (t_1 / y) * x; elseif (b <= -5.2e-210) tmp = t_3; elseif (b <= 2.05e-99) tmp = (x * t_1) / y; elseif (b <= 80.0) tmp = t_3; 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[(N[Exp[(-b)], $MachinePrecision] / y), $MachinePrecision] * x), $MachinePrecision]}, Block[{t$95$3 = N[(N[Power[z, y], $MachinePrecision] * N[(x / N[(a * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -4.2e+38], t$95$2, If[LessEqual[b, -1.3e-49], N[(N[(t$95$1 / y), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[b, -5.2e-210], t$95$3, If[LessEqual[b, 2.05e-99], N[(N[(x * t$95$1), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[b, 80.0], t$95$3, t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := {a}^{\left(t - 1\right)}\\
t_2 := \frac{e^{-b}}{y} \cdot x\\
t_3 := {z}^{y} \cdot \frac{x}{a \cdot y}\\
\mathbf{if}\;b \leq -4.2 \cdot 10^{+38}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \leq -1.3 \cdot 10^{-49}:\\
\;\;\;\;\frac{t\_1}{y} \cdot x\\
\mathbf{elif}\;b \leq -5.2 \cdot 10^{-210}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;b \leq 2.05 \cdot 10^{-99}:\\
\;\;\;\;\frac{x \cdot t\_1}{y}\\
\mathbf{elif}\;b \leq 80:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if b < -4.2e38 or 80 < b Initial program 100.0%
Taylor expanded in y around inf
Applied rewrites90.8%
Taylor expanded in b around inf
Applied rewrites83.3%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6483.3
Applied rewrites83.3%
if -4.2e38 < b < -1.29999999999999997e-49Initial program 99.6%
Taylor expanded in b around 0
Applied rewrites62.2%
Taylor expanded in y around 0
Applied rewrites72.3%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6481.4
Applied rewrites81.4%
if -1.29999999999999997e-49 < b < -5.1999999999999997e-210 or 2.05000000000000014e-99 < b < 80Initial program 95.7%
Taylor expanded in b around 0
Applied rewrites83.3%
Applied rewrites83.3%
Taylor expanded in t around 0
Applied rewrites78.1%
Applied rewrites83.5%
if -5.1999999999999997e-210 < b < 2.05000000000000014e-99Initial program 98.7%
Taylor expanded in b around 0
Applied rewrites88.8%
Taylor expanded in y around 0
Applied rewrites76.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -5000.0) (not (<= b 2300.0))) (* (/ (exp (- b)) y) x) (/ (* (/ (pow z y) y) x) a)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -5000.0) || !(b <= 2300.0)) {
tmp = (exp(-b) / y) * x;
} else {
tmp = ((pow(z, y) / y) * x) / a;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
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 <= (-5000.0d0)) .or. (.not. (b <= 2300.0d0))) then
tmp = (exp(-b) / y) * x
else
tmp = (((z ** y) / y) * x) / a
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 <= -5000.0) || !(b <= 2300.0)) {
tmp = (Math.exp(-b) / y) * x;
} else {
tmp = ((Math.pow(z, y) / y) * x) / a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -5000.0) or not (b <= 2300.0): tmp = (math.exp(-b) / y) * x else: tmp = ((math.pow(z, y) / y) * x) / a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -5000.0) || !(b <= 2300.0)) tmp = Float64(Float64(exp(Float64(-b)) / y) * x); else tmp = Float64(Float64(Float64((z ^ y) / y) * x) / a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -5000.0) || ~((b <= 2300.0))) tmp = (exp(-b) / y) * x; else tmp = (((z ^ y) / y) * x) / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -5000.0], N[Not[LessEqual[b, 2300.0]], $MachinePrecision]], N[(N[(N[Exp[(-b)], $MachinePrecision] / y), $MachinePrecision] * x), $MachinePrecision], N[(N[(N[(N[Power[z, y], $MachinePrecision] / y), $MachinePrecision] * x), $MachinePrecision] / a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -5000 \lor \neg \left(b \leq 2300\right):\\
\;\;\;\;\frac{e^{-b}}{y} \cdot x\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{{z}^{y}}{y} \cdot x}{a}\\
\end{array}
\end{array}
if b < -5e3 or 2300 < b Initial program 100.0%
Taylor expanded in y around inf
Applied rewrites89.1%
Taylor expanded in b around inf
Applied rewrites83.6%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6483.6
Applied rewrites83.6%
if -5e3 < b < 2300Initial program 97.5%
Taylor expanded in b around 0
Applied rewrites80.0%
Applied rewrites80.0%
Applied rewrites84.6%
Taylor expanded in t around 0
Applied rewrites78.3%
Final simplification80.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -32000000.0) (not (<= b 80.0))) (* (/ (exp (- b)) y) x) (/ (* (pow z y) x) (* a y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -32000000.0) || !(b <= 80.0)) {
tmp = (exp(-b) / y) * x;
} else {
tmp = (pow(z, y) * x) / (a * y);
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
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 <= (-32000000.0d0)) .or. (.not. (b <= 80.0d0))) then
tmp = (exp(-b) / y) * x
else
tmp = ((z ** y) * x) / (a * y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -32000000.0) || !(b <= 80.0)) {
tmp = (Math.exp(-b) / y) * x;
} else {
tmp = (Math.pow(z, y) * x) / (a * y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -32000000.0) or not (b <= 80.0): tmp = (math.exp(-b) / y) * x else: tmp = (math.pow(z, y) * x) / (a * y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -32000000.0) || !(b <= 80.0)) tmp = Float64(Float64(exp(Float64(-b)) / y) * x); else tmp = Float64(Float64((z ^ y) * x) / Float64(a * y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -32000000.0) || ~((b <= 80.0))) tmp = (exp(-b) / y) * x; else tmp = ((z ^ y) * x) / (a * y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -32000000.0], N[Not[LessEqual[b, 80.0]], $MachinePrecision]], N[(N[(N[Exp[(-b)], $MachinePrecision] / y), $MachinePrecision] * x), $MachinePrecision], N[(N[(N[Power[z, y], $MachinePrecision] * x), $MachinePrecision] / N[(a * y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -32000000 \lor \neg \left(b \leq 80\right):\\
\;\;\;\;\frac{e^{-b}}{y} \cdot x\\
\mathbf{else}:\\
\;\;\;\;\frac{{z}^{y} \cdot x}{a \cdot y}\\
\end{array}
\end{array}
if b < -3.2e7 or 80 < b Initial program 100.0%
Taylor expanded in y around inf
Applied rewrites89.1%
Taylor expanded in b around inf
Applied rewrites82.8%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6482.8
Applied rewrites82.8%
if -3.2e7 < b < 80Initial program 97.5%
Taylor expanded in b around 0
Applied rewrites80.0%
Applied rewrites80.0%
Taylor expanded in t around 0
Applied rewrites69.9%
Applied rewrites72.9%
Final simplification77.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -4.2e+38) (not (<= b 38000.0))) (* (/ (exp (- b)) y) x) (* (/ (pow a (- t 1.0)) y) x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -4.2e+38) || !(b <= 38000.0)) {
tmp = (exp(-b) / y) * x;
} else {
tmp = (pow(a, (t - 1.0)) / y) * x;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
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 <= (-4.2d+38)) .or. (.not. (b <= 38000.0d0))) then
tmp = (exp(-b) / y) * x
else
tmp = ((a ** (t - 1.0d0)) / y) * x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -4.2e+38) || !(b <= 38000.0)) {
tmp = (Math.exp(-b) / y) * x;
} else {
tmp = (Math.pow(a, (t - 1.0)) / y) * x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -4.2e+38) or not (b <= 38000.0): tmp = (math.exp(-b) / y) * x else: tmp = (math.pow(a, (t - 1.0)) / y) * x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -4.2e+38) || !(b <= 38000.0)) tmp = Float64(Float64(exp(Float64(-b)) / y) * x); else tmp = Float64(Float64((a ^ Float64(t - 1.0)) / y) * x); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -4.2e+38) || ~((b <= 38000.0))) tmp = (exp(-b) / y) * x; else tmp = ((a ^ (t - 1.0)) / y) * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -4.2e+38], N[Not[LessEqual[b, 38000.0]], $MachinePrecision]], N[(N[(N[Exp[(-b)], $MachinePrecision] / y), $MachinePrecision] * x), $MachinePrecision], N[(N[(N[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision] * x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -4.2 \cdot 10^{+38} \lor \neg \left(b \leq 38000\right):\\
\;\;\;\;\frac{e^{-b}}{y} \cdot x\\
\mathbf{else}:\\
\;\;\;\;\frac{{a}^{\left(t - 1\right)}}{y} \cdot x\\
\end{array}
\end{array}
if b < -4.2e38 or 38000 < b Initial program 100.0%
Taylor expanded in y around inf
Applied rewrites90.7%
Taylor expanded in b around inf
Applied rewrites84.0%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6484.0
Applied rewrites84.0%
if -4.2e38 < b < 38000Initial program 97.7%
Taylor expanded in b around 0
Applied rewrites82.8%
Taylor expanded in y around 0
Applied rewrites67.3%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6468.7
Applied rewrites68.7%
Final simplification75.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -7e-7) (not (<= b 80.0))) (* (/ (exp (- b)) y) x) (* (pow a (- t 1.0)) (/ x y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -7e-7) || !(b <= 80.0)) {
tmp = (exp(-b) / y) * x;
} else {
tmp = pow(a, (t - 1.0)) * (x / y);
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
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 <= (-7d-7)) .or. (.not. (b <= 80.0d0))) then
tmp = (exp(-b) / y) * x
else
tmp = (a ** (t - 1.0d0)) * (x / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -7e-7) || !(b <= 80.0)) {
tmp = (Math.exp(-b) / y) * x;
} else {
tmp = Math.pow(a, (t - 1.0)) * (x / y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -7e-7) or not (b <= 80.0): tmp = (math.exp(-b) / y) * x else: tmp = math.pow(a, (t - 1.0)) * (x / y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -7e-7) || !(b <= 80.0)) tmp = Float64(Float64(exp(Float64(-b)) / y) * x); else tmp = Float64((a ^ Float64(t - 1.0)) * Float64(x / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -7e-7) || ~((b <= 80.0))) tmp = (exp(-b) / y) * x; else tmp = (a ^ (t - 1.0)) * (x / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -7e-7], N[Not[LessEqual[b, 80.0]], $MachinePrecision]], N[(N[(N[Exp[(-b)], $MachinePrecision] / y), $MachinePrecision] * x), $MachinePrecision], N[(N[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -7 \cdot 10^{-7} \lor \neg \left(b \leq 80\right):\\
\;\;\;\;\frac{e^{-b}}{y} \cdot x\\
\mathbf{else}:\\
\;\;\;\;{a}^{\left(t - 1\right)} \cdot \frac{x}{y}\\
\end{array}
\end{array}
if b < -6.99999999999999968e-7 or 80 < b Initial program 100.0%
Taylor expanded in y around inf
Applied rewrites89.2%
Taylor expanded in b around inf
Applied rewrites83.1%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6483.1
Applied rewrites83.1%
if -6.99999999999999968e-7 < b < 80Initial program 97.5%
Taylor expanded in b around 0
Applied rewrites81.2%
Taylor expanded in y around 0
Applied rewrites65.1%
Final simplification74.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -7e-7) (not (<= b 70.0))) (* (/ (exp (- b)) y) x) (* (/ (pow a -1.0) y) x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -7e-7) || !(b <= 70.0)) {
tmp = (exp(-b) / y) * x;
} else {
tmp = (pow(a, -1.0) / y) * x;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
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 <= (-7d-7)) .or. (.not. (b <= 70.0d0))) then
tmp = (exp(-b) / y) * x
else
tmp = ((a ** (-1.0d0)) / y) * x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -7e-7) || !(b <= 70.0)) {
tmp = (Math.exp(-b) / y) * x;
} else {
tmp = (Math.pow(a, -1.0) / y) * x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -7e-7) or not (b <= 70.0): tmp = (math.exp(-b) / y) * x else: tmp = (math.pow(a, -1.0) / y) * x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -7e-7) || !(b <= 70.0)) tmp = Float64(Float64(exp(Float64(-b)) / y) * x); else tmp = Float64(Float64((a ^ -1.0) / y) * x); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -7e-7) || ~((b <= 70.0))) tmp = (exp(-b) / y) * x; else tmp = ((a ^ -1.0) / y) * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -7e-7], N[Not[LessEqual[b, 70.0]], $MachinePrecision]], N[(N[(N[Exp[(-b)], $MachinePrecision] / y), $MachinePrecision] * x), $MachinePrecision], N[(N[(N[Power[a, -1.0], $MachinePrecision] / y), $MachinePrecision] * x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -7 \cdot 10^{-7} \lor \neg \left(b \leq 70\right):\\
\;\;\;\;\frac{e^{-b}}{y} \cdot x\\
\mathbf{else}:\\
\;\;\;\;\frac{{a}^{-1}}{y} \cdot x\\
\end{array}
\end{array}
if b < -6.99999999999999968e-7 or 70 < b Initial program 100.0%
Taylor expanded in y around inf
Applied rewrites89.2%
Taylor expanded in b around inf
Applied rewrites83.1%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6483.1
Applied rewrites83.1%
if -6.99999999999999968e-7 < b < 70Initial program 97.5%
Taylor expanded in b around 0
Applied rewrites85.9%
Taylor expanded in y around 0
Applied rewrites67.5%
Taylor expanded in t around 0
Applied rewrites35.8%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites37.4%
Final simplification60.2%
(FPCore (x y z t a b) :precision binary64 (* (/ 1.0 a) (/ x y)))
double code(double x, double y, double z, double t, double a, double b) {
return (1.0 / a) * (x / y);
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
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) * (x / y)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (1.0 / a) * (x / y);
}
def code(x, y, z, t, a, b): return (1.0 / a) * (x / y)
function code(x, y, z, t, a, b) return Float64(Float64(1.0 / a) * Float64(x / y)) end
function tmp = code(x, y, z, t, a, b) tmp = (1.0 / a) * (x / y); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(1.0 / a), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{1}{a} \cdot \frac{x}{y}
\end{array}
Initial program 98.8%
Taylor expanded in b around 0
Applied rewrites68.4%
Taylor expanded in y around 0
Applied rewrites56.5%
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lift-/.f64N/A
lower-*.f6454.8
Applied rewrites54.8%
Taylor expanded in t around 0
Applied rewrites34.1%
(FPCore (x y z t a b) :precision binary64 (* (/ 1.0 y) (/ x a)))
double code(double x, double y, double z, double t, double a, double b) {
return (1.0 / y) * (x / a);
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
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 / y) * (x / a)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (1.0 / y) * (x / a);
}
def code(x, y, z, t, a, b): return (1.0 / y) * (x / a)
function code(x, y, z, t, a, b) return Float64(Float64(1.0 / y) * Float64(x / a)) end
function tmp = code(x, y, z, t, a, b) tmp = (1.0 / y) * (x / a); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(1.0 / y), $MachinePrecision] * N[(x / a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{1}{y} \cdot \frac{x}{a}
\end{array}
Initial program 98.8%
Taylor expanded in b around 0
Applied rewrites64.4%
Applied rewrites64.4%
Taylor expanded in t around 0
Applied rewrites56.5%
Taylor expanded in y around 0
Applied rewrites30.9%
(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;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
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.8%
Taylor expanded in b around 0
Applied rewrites64.4%
Applied rewrites64.4%
Taylor expanded in t around 0
Applied rewrites56.5%
Taylor expanded in y around 0
Applied rewrites30.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;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
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 2025019
(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))