
(FPCore (x y z t a b) :precision binary64 (* x (exp (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b))))))
double code(double x, double y, double z, double t, double a, double b) {
return x * exp(((y * (log(z) - t)) + (a * (log((1.0 - z)) - b))));
}
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)) + (a * (log((1.0d0 - z)) - b))))
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)) + (a * (Math.log((1.0 - z)) - b))));
}
def code(x, y, z, t, a, b): return x * math.exp(((y * (math.log(z) - t)) + (a * (math.log((1.0 - z)) - b))))
function code(x, y, z, t, a, b) return Float64(x * exp(Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(log(Float64(1.0 - z)) - b))))) end
function tmp = code(x, y, z, t, a, b) tmp = x * exp(((y * (log(z) - t)) + (a * (log((1.0 - z)) - b)))); end
code[x_, y_, z_, t_, a_, b_] := N[(x * N[Exp[N[(N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision] + N[(a * N[(N[Log[N[(1.0 - z), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)}
Herbie found 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (* x (exp (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b))))))
double code(double x, double y, double z, double t, double a, double b) {
return x * exp(((y * (log(z) - t)) + (a * (log((1.0 - z)) - b))));
}
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)) + (a * (log((1.0d0 - z)) - b))))
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)) + (a * (Math.log((1.0 - z)) - b))));
}
def code(x, y, z, t, a, b): return x * math.exp(((y * (math.log(z) - t)) + (a * (math.log((1.0 - z)) - b))))
function code(x, y, z, t, a, b) return Float64(x * exp(Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(log(Float64(1.0 - z)) - b))))) end
function tmp = code(x, y, z, t, a, b) tmp = x * exp(((y * (log(z) - t)) + (a * (log((1.0 - z)) - b)))); end
code[x_, y_, z_, t_, a_, b_] := N[(x * N[Exp[N[(N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision] + N[(a * N[(N[Log[N[(1.0 - z), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)}
(FPCore (x y z t a b) :precision binary64 (* x (exp (+ (* y (- (log z) t)) (* a (- (* -1.0 z) b))))))
double code(double x, double y, double z, double t, double a, double b) {
return x * exp(((y * (log(z) - t)) + (a * ((-1.0 * z) - b))));
}
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)) + (a * (((-1.0d0) * z) - b))))
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)) + (a * ((-1.0 * z) - b))));
}
def code(x, y, z, t, a, b): return x * math.exp(((y * (math.log(z) - t)) + (a * ((-1.0 * z) - b))))
function code(x, y, z, t, a, b) return Float64(x * exp(Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(Float64(-1.0 * z) - b))))) end
function tmp = code(x, y, z, t, a, b) tmp = x * exp(((y * (log(z) - t)) + (a * ((-1.0 * z) - b)))); end
code[x_, y_, z_, t_, a_, b_] := N[(x * N[Exp[N[(N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision] + N[(a * N[(N[(-1.0 * z), $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(-1 \cdot z - b\right)}
Initial program 96.6%
Taylor expanded in z around 0
lower-*.f6499.3
Applied rewrites99.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (exp (* y (- (log z) t))))))
(if (<= y -1.35e-65)
t_1
(if (<= y 6.2e+33) (* (exp (* (- (- z) b) a)) x) t_1))))double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * exp((y * (log(z) - t)));
double tmp;
if (y <= -1.35e-65) {
tmp = t_1;
} else if (y <= 6.2e+33) {
tmp = exp(((-z - b) * a)) * 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((y * (log(z) - t)))
if (y <= (-1.35d-65)) then
tmp = t_1
else if (y <= 6.2d+33) then
tmp = exp(((-z - b) * a)) * x
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * Math.exp((y * (Math.log(z) - t)));
double tmp;
if (y <= -1.35e-65) {
tmp = t_1;
} else if (y <= 6.2e+33) {
tmp = Math.exp(((-z - b) * a)) * x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x * math.exp((y * (math.log(z) - t))) tmp = 0 if y <= -1.35e-65: tmp = t_1 elif y <= 6.2e+33: tmp = math.exp(((-z - b) * a)) * x else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x * exp(Float64(y * Float64(log(z) - t)))) tmp = 0.0 if (y <= -1.35e-65) tmp = t_1; elseif (y <= 6.2e+33) tmp = Float64(exp(Float64(Float64(Float64(-z) - b) * a)) * x); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x * exp((y * (log(z) - t))); tmp = 0.0; if (y <= -1.35e-65) tmp = t_1; elseif (y <= 6.2e+33) tmp = exp(((-z - b) * a)) * x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[Exp[N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.35e-65], t$95$1, If[LessEqual[y, 6.2e+33], N[(N[Exp[N[(N[((-z) - b), $MachinePrecision] * a), $MachinePrecision]], $MachinePrecision] * x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := x \cdot e^{y \cdot \left(\log z - t\right)}\\
\mathbf{if}\;y \leq -1.35 \cdot 10^{-65}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 6.2 \cdot 10^{+33}:\\
\;\;\;\;e^{\left(\left(-z\right) - b\right) \cdot a} \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if y < -1.3499999999999999e-65 or 6.2e33 < y Initial program 96.6%
Taylor expanded in a around 0
lower-exp.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-log.f6471.9
Applied rewrites71.9%
if -1.3499999999999999e-65 < y < 6.2e33Initial program 96.6%
Taylor expanded in y around 0
lower-*.f64N/A
lower--.f64N/A
lower-log.f64N/A
lower--.f6458.9
Applied rewrites58.9%
lift-log.f64N/A
lift--.f64N/A
sub-flipN/A
mul-1-negN/A
lift-*.f64N/A
lower-log1p.f6462.5
lift-*.f64N/A
mul-1-negN/A
lower-neg.f6462.5
Applied rewrites62.5%
Taylor expanded in z around 0
lower-*.f6462.5
Applied rewrites62.5%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6462.5
Applied rewrites62.5%
(FPCore (x y z t a b) :precision binary64 (if (<= y -10600000.0) (* (pow z y) x) (if (<= y 1.25e+35) (* (exp (* (- (- z) b) a)) x) (* (exp (* (- y) t)) x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -10600000.0) {
tmp = pow(z, y) * x;
} else if (y <= 1.25e+35) {
tmp = exp(((-z - b) * a)) * x;
} else {
tmp = exp((-y * t)) * 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 <= (-10600000.0d0)) then
tmp = (z ** y) * x
else if (y <= 1.25d+35) then
tmp = exp(((-z - b) * a)) * x
else
tmp = exp((-y * t)) * 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 <= -10600000.0) {
tmp = Math.pow(z, y) * x;
} else if (y <= 1.25e+35) {
tmp = Math.exp(((-z - b) * a)) * x;
} else {
tmp = Math.exp((-y * t)) * x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -10600000.0: tmp = math.pow(z, y) * x elif y <= 1.25e+35: tmp = math.exp(((-z - b) * a)) * x else: tmp = math.exp((-y * t)) * x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -10600000.0) tmp = Float64((z ^ y) * x); elseif (y <= 1.25e+35) tmp = Float64(exp(Float64(Float64(Float64(-z) - b) * a)) * x); else tmp = Float64(exp(Float64(Float64(-y) * t)) * x); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -10600000.0) tmp = (z ^ y) * x; elseif (y <= 1.25e+35) tmp = exp(((-z - b) * a)) * x; else tmp = exp((-y * t)) * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -10600000.0], N[(N[Power[z, y], $MachinePrecision] * x), $MachinePrecision], If[LessEqual[y, 1.25e+35], N[(N[Exp[N[(N[((-z) - b), $MachinePrecision] * a), $MachinePrecision]], $MachinePrecision] * x), $MachinePrecision], N[(N[Exp[N[((-y) * t), $MachinePrecision]], $MachinePrecision] * x), $MachinePrecision]]]
\begin{array}{l}
\mathbf{if}\;y \leq -10600000:\\
\;\;\;\;{z}^{y} \cdot x\\
\mathbf{elif}\;y \leq 1.25 \cdot 10^{+35}:\\
\;\;\;\;e^{\left(\left(-z\right) - b\right) \cdot a} \cdot x\\
\mathbf{else}:\\
\;\;\;\;e^{\left(-y\right) \cdot t} \cdot x\\
\end{array}
if y < -1.06e7Initial program 96.6%
Taylor expanded in a around 0
lower-exp.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-log.f6471.9
Applied rewrites71.9%
Taylor expanded in t around 0
lower-pow.f6451.9
Applied rewrites51.9%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6451.9
Applied rewrites51.9%
if -1.06e7 < y < 1.25000000000000005e35Initial program 96.6%
Taylor expanded in y around 0
lower-*.f64N/A
lower--.f64N/A
lower-log.f64N/A
lower--.f6458.9
Applied rewrites58.9%
lift-log.f64N/A
lift--.f64N/A
sub-flipN/A
mul-1-negN/A
lift-*.f64N/A
lower-log1p.f6462.5
lift-*.f64N/A
mul-1-negN/A
lower-neg.f6462.5
Applied rewrites62.5%
Taylor expanded in z around 0
lower-*.f6462.5
Applied rewrites62.5%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6462.5
Applied rewrites62.5%
if 1.25000000000000005e35 < y Initial program 96.6%
Taylor expanded in t around inf
lower-*.f64N/A
lower-*.f6456.5
Applied rewrites56.5%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6456.5
lift-*.f64N/A
mul-1-negN/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lower-*.f64N/A
lower-neg.f6456.5
Applied rewrites56.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (pow z y) x)))
(if (<= y -10600000.0)
t_1
(if (<= y 3.4e+128) (* (exp (* (- b) a)) x) t_1))))double code(double x, double y, double z, double t, double a, double b) {
double t_1 = pow(z, y) * x;
double tmp;
if (y <= -10600000.0) {
tmp = t_1;
} else if (y <= 3.4e+128) {
tmp = exp((-b * a)) * 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 = (z ** y) * x
if (y <= (-10600000.0d0)) then
tmp = t_1
else if (y <= 3.4d+128) then
tmp = exp((-b * a)) * x
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = Math.pow(z, y) * x;
double tmp;
if (y <= -10600000.0) {
tmp = t_1;
} else if (y <= 3.4e+128) {
tmp = Math.exp((-b * a)) * x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = math.pow(z, y) * x tmp = 0 if y <= -10600000.0: tmp = t_1 elif y <= 3.4e+128: tmp = math.exp((-b * a)) * x else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64((z ^ y) * x) tmp = 0.0 if (y <= -10600000.0) tmp = t_1; elseif (y <= 3.4e+128) tmp = Float64(exp(Float64(Float64(-b) * a)) * x); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z ^ y) * x; tmp = 0.0; if (y <= -10600000.0) tmp = t_1; elseif (y <= 3.4e+128) tmp = exp((-b * a)) * x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[Power[z, y], $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[y, -10600000.0], t$95$1, If[LessEqual[y, 3.4e+128], N[(N[Exp[N[((-b) * a), $MachinePrecision]], $MachinePrecision] * x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := {z}^{y} \cdot x\\
\mathbf{if}\;y \leq -10600000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 3.4 \cdot 10^{+128}:\\
\;\;\;\;e^{\left(-b\right) \cdot a} \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if y < -1.06e7 or 3.3999999999999999e128 < y Initial program 96.6%
Taylor expanded in a around 0
lower-exp.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-log.f6471.9
Applied rewrites71.9%
Taylor expanded in t around 0
lower-pow.f6451.9
Applied rewrites51.9%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6451.9
Applied rewrites51.9%
if -1.06e7 < y < 3.3999999999999999e128Initial program 96.6%
Taylor expanded in y around 0
lower-*.f64N/A
lower--.f64N/A
lower-log.f64N/A
lower--.f6458.9
Applied rewrites58.9%
lift-log.f64N/A
lift--.f64N/A
sub-flipN/A
mul-1-negN/A
lift-*.f64N/A
lower-log1p.f6462.5
lift-*.f64N/A
mul-1-negN/A
lower-neg.f6462.5
Applied rewrites62.5%
Taylor expanded in z around 0
lower-*.f6458.1
Applied rewrites58.1%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6458.1
Applied rewrites58.1%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* (exp (* (- y) t)) x))) (if (<= t -32000.0) t_1 (if (<= t 1.25e-139) (* (exp (* (- b) a)) x) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = exp((-y * t)) * x;
double tmp;
if (t <= -32000.0) {
tmp = t_1;
} else if (t <= 1.25e-139) {
tmp = exp((-b * a)) * 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 = exp((-y * t)) * x
if (t <= (-32000.0d0)) then
tmp = t_1
else if (t <= 1.25d-139) then
tmp = exp((-b * a)) * x
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = Math.exp((-y * t)) * x;
double tmp;
if (t <= -32000.0) {
tmp = t_1;
} else if (t <= 1.25e-139) {
tmp = Math.exp((-b * a)) * x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = math.exp((-y * t)) * x tmp = 0 if t <= -32000.0: tmp = t_1 elif t <= 1.25e-139: tmp = math.exp((-b * a)) * x else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(exp(Float64(Float64(-y) * t)) * x) tmp = 0.0 if (t <= -32000.0) tmp = t_1; elseif (t <= 1.25e-139) tmp = Float64(exp(Float64(Float64(-b) * a)) * x); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = exp((-y * t)) * x; tmp = 0.0; if (t <= -32000.0) tmp = t_1; elseif (t <= 1.25e-139) tmp = exp((-b * a)) * x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[Exp[N[((-y) * t), $MachinePrecision]], $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[t, -32000.0], t$95$1, If[LessEqual[t, 1.25e-139], N[(N[Exp[N[((-b) * a), $MachinePrecision]], $MachinePrecision] * x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := e^{\left(-y\right) \cdot t} \cdot x\\
\mathbf{if}\;t \leq -32000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.25 \cdot 10^{-139}:\\
\;\;\;\;e^{\left(-b\right) \cdot a} \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if t < -32000 or 1.25000000000000008e-139 < t Initial program 96.6%
Taylor expanded in t around inf
lower-*.f64N/A
lower-*.f6456.5
Applied rewrites56.5%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6456.5
lift-*.f64N/A
mul-1-negN/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lower-*.f64N/A
lower-neg.f6456.5
Applied rewrites56.5%
if -32000 < t < 1.25000000000000008e-139Initial program 96.6%
Taylor expanded in y around 0
lower-*.f64N/A
lower--.f64N/A
lower-log.f64N/A
lower--.f6458.9
Applied rewrites58.9%
lift-log.f64N/A
lift--.f64N/A
sub-flipN/A
mul-1-negN/A
lift-*.f64N/A
lower-log1p.f6462.5
lift-*.f64N/A
mul-1-negN/A
lower-neg.f6462.5
Applied rewrites62.5%
Taylor expanded in z around 0
lower-*.f6458.1
Applied rewrites58.1%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6458.1
Applied rewrites58.1%
(FPCore (x y z t a b) :precision binary64 (if (<= y -1.1e+215) (+ x (* x (* y (- (log z) t)))) (* (exp (* (- b) a)) x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.1e+215) {
tmp = x + (x * (y * (log(z) - t)));
} else {
tmp = exp((-b * a)) * 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.1d+215)) then
tmp = x + (x * (y * (log(z) - t)))
else
tmp = exp((-b * a)) * 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.1e+215) {
tmp = x + (x * (y * (Math.log(z) - t)));
} else {
tmp = Math.exp((-b * a)) * x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -1.1e+215: tmp = x + (x * (y * (math.log(z) - t))) else: tmp = math.exp((-b * a)) * x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -1.1e+215) tmp = Float64(x + Float64(x * Float64(y * Float64(log(z) - t)))); else tmp = Float64(exp(Float64(Float64(-b) * a)) * x); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -1.1e+215) tmp = x + (x * (y * (log(z) - t))); else tmp = exp((-b * a)) * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.1e+215], N[(x + N[(x * N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[((-b) * a), $MachinePrecision]], $MachinePrecision] * x), $MachinePrecision]]
\begin{array}{l}
\mathbf{if}\;y \leq -1.1 \cdot 10^{+215}:\\
\;\;\;\;x + x \cdot \left(y \cdot \left(\log z - t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;e^{\left(-b\right) \cdot a} \cdot x\\
\end{array}
if y < -1.1000000000000001e215Initial program 96.6%
Taylor expanded in y around 0
lower-fma.f64N/A
lower-exp.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-log.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
Applied rewrites56.6%
Taylor expanded in a around 0
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-log.f6429.7
Applied rewrites29.7%
if -1.1000000000000001e215 < y Initial program 96.6%
Taylor expanded in y around 0
lower-*.f64N/A
lower--.f64N/A
lower-log.f64N/A
lower--.f6458.9
Applied rewrites58.9%
lift-log.f64N/A
lift--.f64N/A
sub-flipN/A
mul-1-negN/A
lift-*.f64N/A
lower-log1p.f6462.5
lift-*.f64N/A
mul-1-negN/A
lower-neg.f6462.5
Applied rewrites62.5%
Taylor expanded in z around 0
lower-*.f6458.1
Applied rewrites58.1%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6458.1
Applied rewrites58.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* y (- (log z) t))))
(*
(copysign 1.0 x)
(if (<= (* (fabs x) (exp (+ t_1 (* a (- (log (- 1.0 z)) b))))) 0.0)
(* (* (- t) (fabs x)) y)
(+ (fabs x) (* (fabs x) t_1))))))double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y * (log(z) - t);
double tmp;
if ((fabs(x) * exp((t_1 + (a * (log((1.0 - z)) - b))))) <= 0.0) {
tmp = (-t * fabs(x)) * y;
} else {
tmp = fabs(x) + (fabs(x) * t_1);
}
return copysign(1.0, x) * tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y * (Math.log(z) - t);
double tmp;
if ((Math.abs(x) * Math.exp((t_1 + (a * (Math.log((1.0 - z)) - b))))) <= 0.0) {
tmp = (-t * Math.abs(x)) * y;
} else {
tmp = Math.abs(x) + (Math.abs(x) * t_1);
}
return Math.copySign(1.0, x) * tmp;
}
def code(x, y, z, t, a, b): t_1 = y * (math.log(z) - t) tmp = 0 if (math.fabs(x) * math.exp((t_1 + (a * (math.log((1.0 - z)) - b))))) <= 0.0: tmp = (-t * math.fabs(x)) * y else: tmp = math.fabs(x) + (math.fabs(x) * t_1) return math.copysign(1.0, x) * tmp
function code(x, y, z, t, a, b) t_1 = Float64(y * Float64(log(z) - t)) tmp = 0.0 if (Float64(abs(x) * exp(Float64(t_1 + Float64(a * Float64(log(Float64(1.0 - z)) - b))))) <= 0.0) tmp = Float64(Float64(Float64(-t) * abs(x)) * y); else tmp = Float64(abs(x) + Float64(abs(x) * t_1)); end return Float64(copysign(1.0, x) * tmp) end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y * (log(z) - t); tmp = 0.0; if ((abs(x) * exp((t_1 + (a * (log((1.0 - z)) - b))))) <= 0.0) tmp = (-t * abs(x)) * y; else tmp = abs(x) + (abs(x) * t_1); end tmp_2 = (sign(x) * abs(1.0)) * tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]}, N[(N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[(N[Abs[x], $MachinePrecision] * N[Exp[N[(t$95$1 + N[(a * N[(N[Log[N[(1.0 - z), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 0.0], N[(N[((-t) * N[Abs[x], $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], N[(N[Abs[x], $MachinePrecision] + N[(N[Abs[x], $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]
\begin{array}{l}
t_1 := y \cdot \left(\log z - t\right)\\
\mathsf{copysign}\left(1, x\right) \cdot \begin{array}{l}
\mathbf{if}\;\left|x\right| \cdot e^{t\_1 + a \cdot \left(\log \left(1 - z\right) - b\right)} \leq 0:\\
\;\;\;\;\left(\left(-t\right) \cdot \left|x\right|\right) \cdot y\\
\mathbf{else}:\\
\;\;\;\;\left|x\right| + \left|x\right| \cdot t\_1\\
\end{array}
\end{array}
if (*.f64 x (exp.f64 (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))))) < 0.0Initial program 96.6%
Taylor expanded in y around 0
lower-fma.f64N/A
lower-exp.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-log.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
Applied rewrites56.6%
Taylor expanded in a around 0
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-log.f6429.7
Applied rewrites29.7%
Taylor expanded in t around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6417.4
Applied rewrites17.4%
lift-*.f64N/A
mul-1-negN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
distribute-lft-neg-inN/A
lower-*.f64N/A
distribute-lft-neg-outN/A
lower-*.f64N/A
lower-neg.f6417.7
Applied rewrites17.7%
if 0.0 < (*.f64 x (exp.f64 (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))))) Initial program 96.6%
Taylor expanded in y around 0
lower-fma.f64N/A
lower-exp.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-log.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
Applied rewrites56.6%
Taylor expanded in a around 0
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-log.f6429.7
Applied rewrites29.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (log z) t)) (t_2 (+ (* y t_1) (* a (- (log (- 1.0 z)) b)))))
(if (<= t_2 -1000.0)
(* (* (- t) x) y)
(if (<= t_2 1e+27) (fma (* (log z) y) x x) (fma (* x t_1) y x)))))double code(double x, double y, double z, double t, double a, double b) {
double t_1 = log(z) - t;
double t_2 = (y * t_1) + (a * (log((1.0 - z)) - b));
double tmp;
if (t_2 <= -1000.0) {
tmp = (-t * x) * y;
} else if (t_2 <= 1e+27) {
tmp = fma((log(z) * y), x, x);
} else {
tmp = fma((x * t_1), y, x);
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(log(z) - t) t_2 = Float64(Float64(y * t_1) + Float64(a * Float64(log(Float64(1.0 - z)) - b))) tmp = 0.0 if (t_2 <= -1000.0) tmp = Float64(Float64(Float64(-t) * x) * y); elseif (t_2 <= 1e+27) tmp = fma(Float64(log(z) * y), x, x); else tmp = fma(Float64(x * t_1), y, x); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y * t$95$1), $MachinePrecision] + N[(a * N[(N[Log[N[(1.0 - z), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1000.0], N[(N[((-t) * x), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[t$95$2, 1e+27], N[(N[(N[Log[z], $MachinePrecision] * y), $MachinePrecision] * x + x), $MachinePrecision], N[(N[(x * t$95$1), $MachinePrecision] * y + x), $MachinePrecision]]]]]
\begin{array}{l}
t_1 := \log z - t\\
t_2 := y \cdot t\_1 + a \cdot \left(\log \left(1 - z\right) - b\right)\\
\mathbf{if}\;t\_2 \leq -1000:\\
\;\;\;\;\left(\left(-t\right) \cdot x\right) \cdot y\\
\mathbf{elif}\;t\_2 \leq 10^{+27}:\\
\;\;\;\;\mathsf{fma}\left(\log z \cdot y, x, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x \cdot t\_1, y, x\right)\\
\end{array}
if (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < -1e3Initial program 96.6%
Taylor expanded in y around 0
lower-fma.f64N/A
lower-exp.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-log.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
Applied rewrites56.6%
Taylor expanded in a around 0
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-log.f6429.7
Applied rewrites29.7%
Taylor expanded in t around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6417.4
Applied rewrites17.4%
lift-*.f64N/A
mul-1-negN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
distribute-lft-neg-inN/A
lower-*.f64N/A
distribute-lft-neg-outN/A
lower-*.f64N/A
lower-neg.f6417.7
Applied rewrites17.7%
if -1e3 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 1e27Initial program 96.6%
Taylor expanded in y around 0
lower-fma.f64N/A
lower-exp.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-log.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
Applied rewrites56.6%
Taylor expanded in a around 0
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-log.f6429.7
Applied rewrites29.7%
Taylor expanded in t around 0
lower-*.f64N/A
lower-log.f6423.2
Applied rewrites23.2%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6423.2
lift-*.f64N/A
*-commutativeN/A
lower-*.f6423.2
Applied rewrites23.2%
if 1e27 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) Initial program 96.6%
Taylor expanded in y around 0
lower-fma.f64N/A
lower-exp.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-log.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
Applied rewrites56.6%
Taylor expanded in a around 0
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-log.f6429.7
Applied rewrites29.7%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f6428.1
Applied rewrites28.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (log z) t)))
(*
(copysign 1.0 x)
(if (<= (* (fabs x) (exp (+ (* y t_1) (* a (- (log (- 1.0 z)) b))))) 0.0)
(* (* (- t) (fabs x)) y)
(fma t_1 (* y (fabs x)) (fabs x))))))double code(double x, double y, double z, double t, double a, double b) {
double t_1 = log(z) - t;
double tmp;
if ((fabs(x) * exp(((y * t_1) + (a * (log((1.0 - z)) - b))))) <= 0.0) {
tmp = (-t * fabs(x)) * y;
} else {
tmp = fma(t_1, (y * fabs(x)), fabs(x));
}
return copysign(1.0, x) * tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(log(z) - t) tmp = 0.0 if (Float64(abs(x) * exp(Float64(Float64(y * t_1) + Float64(a * Float64(log(Float64(1.0 - z)) - b))))) <= 0.0) tmp = Float64(Float64(Float64(-t) * abs(x)) * y); else tmp = fma(t_1, Float64(y * abs(x)), abs(x)); end return Float64(copysign(1.0, x) * tmp) end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]}, N[(N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[(N[Abs[x], $MachinePrecision] * N[Exp[N[(N[(y * t$95$1), $MachinePrecision] + N[(a * N[(N[Log[N[(1.0 - z), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 0.0], N[(N[((-t) * N[Abs[x], $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], N[(t$95$1 * N[(y * N[Abs[x], $MachinePrecision]), $MachinePrecision] + N[Abs[x], $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]
\begin{array}{l}
t_1 := \log z - t\\
\mathsf{copysign}\left(1, x\right) \cdot \begin{array}{l}
\mathbf{if}\;\left|x\right| \cdot e^{y \cdot t\_1 + a \cdot \left(\log \left(1 - z\right) - b\right)} \leq 0:\\
\;\;\;\;\left(\left(-t\right) \cdot \left|x\right|\right) \cdot y\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t\_1, y \cdot \left|x\right|, \left|x\right|\right)\\
\end{array}
\end{array}
if (*.f64 x (exp.f64 (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))))) < 0.0Initial program 96.6%
Taylor expanded in y around 0
lower-fma.f64N/A
lower-exp.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-log.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
Applied rewrites56.6%
Taylor expanded in a around 0
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-log.f6429.7
Applied rewrites29.7%
Taylor expanded in t around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6417.4
Applied rewrites17.4%
lift-*.f64N/A
mul-1-negN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
distribute-lft-neg-inN/A
lower-*.f64N/A
distribute-lft-neg-outN/A
lower-*.f64N/A
lower-neg.f6417.7
Applied rewrites17.7%
if 0.0 < (*.f64 x (exp.f64 (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))))) Initial program 96.6%
Taylor expanded in y around 0
lower-fma.f64N/A
lower-exp.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-log.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
Applied rewrites56.6%
Taylor expanded in a around 0
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-log.f6429.7
Applied rewrites29.7%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6428.0
Applied rewrites28.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b)))))
(if (<= t_1 -1000.0)
(* (* (- t) x) y)
(if (<= t_1 1e+236)
(fma (* (log z) y) x x)
(+ x (* x (* y (* -1.0 t))))))))double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * (log(z) - t)) + (a * (log((1.0 - z)) - b));
double tmp;
if (t_1 <= -1000.0) {
tmp = (-t * x) * y;
} else if (t_1 <= 1e+236) {
tmp = fma((log(z) * y), x, x);
} else {
tmp = x + (x * (y * (-1.0 * t)));
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(log(Float64(1.0 - z)) - b))) tmp = 0.0 if (t_1 <= -1000.0) tmp = Float64(Float64(Float64(-t) * x) * y); elseif (t_1 <= 1e+236) tmp = fma(Float64(log(z) * y), x, x); else tmp = Float64(x + Float64(x * Float64(y * Float64(-1.0 * t)))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision] + N[(a * N[(N[Log[N[(1.0 - z), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1000.0], N[(N[((-t) * x), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[t$95$1, 1e+236], N[(N[(N[Log[z], $MachinePrecision] * y), $MachinePrecision] * x + x), $MachinePrecision], N[(x + N[(x * N[(y * N[(-1.0 * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
t_1 := y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)\\
\mathbf{if}\;t\_1 \leq -1000:\\
\;\;\;\;\left(\left(-t\right) \cdot x\right) \cdot y\\
\mathbf{elif}\;t\_1 \leq 10^{+236}:\\
\;\;\;\;\mathsf{fma}\left(\log z \cdot y, x, x\right)\\
\mathbf{else}:\\
\;\;\;\;x + x \cdot \left(y \cdot \left(-1 \cdot t\right)\right)\\
\end{array}
if (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < -1e3Initial program 96.6%
Taylor expanded in y around 0
lower-fma.f64N/A
lower-exp.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-log.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
Applied rewrites56.6%
Taylor expanded in a around 0
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-log.f6429.7
Applied rewrites29.7%
Taylor expanded in t around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6417.4
Applied rewrites17.4%
lift-*.f64N/A
mul-1-negN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
distribute-lft-neg-inN/A
lower-*.f64N/A
distribute-lft-neg-outN/A
lower-*.f64N/A
lower-neg.f6417.7
Applied rewrites17.7%
if -1e3 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 1.00000000000000005e236Initial program 96.6%
Taylor expanded in y around 0
lower-fma.f64N/A
lower-exp.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-log.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
Applied rewrites56.6%
Taylor expanded in a around 0
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-log.f6429.7
Applied rewrites29.7%
Taylor expanded in t around 0
lower-*.f64N/A
lower-log.f6423.2
Applied rewrites23.2%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6423.2
lift-*.f64N/A
*-commutativeN/A
lower-*.f6423.2
Applied rewrites23.2%
if 1.00000000000000005e236 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) Initial program 96.6%
Taylor expanded in y around 0
lower-fma.f64N/A
lower-exp.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-log.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
Applied rewrites56.6%
Taylor expanded in a around 0
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-log.f6429.7
Applied rewrites29.7%
Taylor expanded in t around inf
lower-*.f6427.3
Applied rewrites27.3%
(FPCore (x y z t a b)
:precision binary64
(*
(copysign 1.0 x)
(if (<=
(* (fabs x) (exp (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b)))))
0.0)
(* (* (- t) (fabs x)) y)
(+ (fabs x) (* (fabs x) (* y (* -1.0 t)))))))double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((fabs(x) * exp(((y * (log(z) - t)) + (a * (log((1.0 - z)) - b))))) <= 0.0) {
tmp = (-t * fabs(x)) * y;
} else {
tmp = fabs(x) + (fabs(x) * (y * (-1.0 * t)));
}
return copysign(1.0, x) * tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((Math.abs(x) * Math.exp(((y * (Math.log(z) - t)) + (a * (Math.log((1.0 - z)) - b))))) <= 0.0) {
tmp = (-t * Math.abs(x)) * y;
} else {
tmp = Math.abs(x) + (Math.abs(x) * (y * (-1.0 * t)));
}
return Math.copySign(1.0, x) * tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (math.fabs(x) * math.exp(((y * (math.log(z) - t)) + (a * (math.log((1.0 - z)) - b))))) <= 0.0: tmp = (-t * math.fabs(x)) * y else: tmp = math.fabs(x) + (math.fabs(x) * (y * (-1.0 * t))) return math.copysign(1.0, x) * tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (Float64(abs(x) * exp(Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(log(Float64(1.0 - z)) - b))))) <= 0.0) tmp = Float64(Float64(Float64(-t) * abs(x)) * y); else tmp = Float64(abs(x) + Float64(abs(x) * Float64(y * Float64(-1.0 * t)))); end return Float64(copysign(1.0, x) * tmp) end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((abs(x) * exp(((y * (log(z) - t)) + (a * (log((1.0 - z)) - b))))) <= 0.0) tmp = (-t * abs(x)) * y; else tmp = abs(x) + (abs(x) * (y * (-1.0 * t))); end tmp_2 = (sign(x) * abs(1.0)) * tmp; end
code[x_, y_, z_, t_, a_, b_] := N[(N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[(N[Abs[x], $MachinePrecision] * N[Exp[N[(N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision] + N[(a * N[(N[Log[N[(1.0 - z), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 0.0], N[(N[((-t) * N[Abs[x], $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], N[(N[Abs[x], $MachinePrecision] + N[(N[Abs[x], $MachinePrecision] * N[(y * N[(-1.0 * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\mathsf{copysign}\left(1, x\right) \cdot \begin{array}{l}
\mathbf{if}\;\left|x\right| \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \leq 0:\\
\;\;\;\;\left(\left(-t\right) \cdot \left|x\right|\right) \cdot y\\
\mathbf{else}:\\
\;\;\;\;\left|x\right| + \left|x\right| \cdot \left(y \cdot \left(-1 \cdot t\right)\right)\\
\end{array}
if (*.f64 x (exp.f64 (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))))) < 0.0Initial program 96.6%
Taylor expanded in y around 0
lower-fma.f64N/A
lower-exp.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-log.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
Applied rewrites56.6%
Taylor expanded in a around 0
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-log.f6429.7
Applied rewrites29.7%
Taylor expanded in t around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6417.4
Applied rewrites17.4%
lift-*.f64N/A
mul-1-negN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
distribute-lft-neg-inN/A
lower-*.f64N/A
distribute-lft-neg-outN/A
lower-*.f64N/A
lower-neg.f6417.7
Applied rewrites17.7%
if 0.0 < (*.f64 x (exp.f64 (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))))) Initial program 96.6%
Taylor expanded in y around 0
lower-fma.f64N/A
lower-exp.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-log.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
Applied rewrites56.6%
Taylor expanded in a around 0
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-log.f6429.7
Applied rewrites29.7%
Taylor expanded in t around inf
lower-*.f6427.3
Applied rewrites27.3%
(FPCore (x y z t a b)
:precision binary64
(*
(copysign 1.0 x)
(if (<=
(* (fabs x) (exp (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b)))))
0.0)
(* (* (- t) (fabs x)) y)
(fma (* -1.0 t) (* y (fabs x)) (fabs x)))))double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((fabs(x) * exp(((y * (log(z) - t)) + (a * (log((1.0 - z)) - b))))) <= 0.0) {
tmp = (-t * fabs(x)) * y;
} else {
tmp = fma((-1.0 * t), (y * fabs(x)), fabs(x));
}
return copysign(1.0, x) * tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (Float64(abs(x) * exp(Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(log(Float64(1.0 - z)) - b))))) <= 0.0) tmp = Float64(Float64(Float64(-t) * abs(x)) * y); else tmp = fma(Float64(-1.0 * t), Float64(y * abs(x)), abs(x)); end return Float64(copysign(1.0, x) * tmp) end
code[x_, y_, z_, t_, a_, b_] := N[(N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[(N[Abs[x], $MachinePrecision] * N[Exp[N[(N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision] + N[(a * N[(N[Log[N[(1.0 - z), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 0.0], N[(N[((-t) * N[Abs[x], $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], N[(N[(-1.0 * t), $MachinePrecision] * N[(y * N[Abs[x], $MachinePrecision]), $MachinePrecision] + N[Abs[x], $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\mathsf{copysign}\left(1, x\right) \cdot \begin{array}{l}
\mathbf{if}\;\left|x\right| \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \leq 0:\\
\;\;\;\;\left(\left(-t\right) \cdot \left|x\right|\right) \cdot y\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-1 \cdot t, y \cdot \left|x\right|, \left|x\right|\right)\\
\end{array}
if (*.f64 x (exp.f64 (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))))) < 0.0Initial program 96.6%
Taylor expanded in y around 0
lower-fma.f64N/A
lower-exp.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-log.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
Applied rewrites56.6%
Taylor expanded in a around 0
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-log.f6429.7
Applied rewrites29.7%
Taylor expanded in t around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6417.4
Applied rewrites17.4%
lift-*.f64N/A
mul-1-negN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
distribute-lft-neg-inN/A
lower-*.f64N/A
distribute-lft-neg-outN/A
lower-*.f64N/A
lower-neg.f6417.7
Applied rewrites17.7%
if 0.0 < (*.f64 x (exp.f64 (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))))) Initial program 96.6%
Taylor expanded in y around 0
lower-fma.f64N/A
lower-exp.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-log.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
Applied rewrites56.6%
Taylor expanded in a around 0
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-log.f6429.7
Applied rewrites29.7%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6428.0
Applied rewrites28.0%
Taylor expanded in t around inf
lower-*.f6426.6
Applied rewrites26.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b)))))
(if (<= t_1 -1000.0)
(* (* (- t) x) y)
(if (<= t_1 5e+53) (* x 1.0) (* (* (- y) x) t)))))double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * (log(z) - t)) + (a * (log((1.0 - z)) - b));
double tmp;
if (t_1 <= -1000.0) {
tmp = (-t * x) * y;
} else if (t_1 <= 5e+53) {
tmp = x * 1.0;
} else {
tmp = (-y * x) * t;
}
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 = (y * (log(z) - t)) + (a * (log((1.0d0 - z)) - b))
if (t_1 <= (-1000.0d0)) then
tmp = (-t * x) * y
else if (t_1 <= 5d+53) then
tmp = x * 1.0d0
else
tmp = (-y * x) * t
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 = (y * (Math.log(z) - t)) + (a * (Math.log((1.0 - z)) - b));
double tmp;
if (t_1 <= -1000.0) {
tmp = (-t * x) * y;
} else if (t_1 <= 5e+53) {
tmp = x * 1.0;
} else {
tmp = (-y * x) * t;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (y * (math.log(z) - t)) + (a * (math.log((1.0 - z)) - b)) tmp = 0 if t_1 <= -1000.0: tmp = (-t * x) * y elif t_1 <= 5e+53: tmp = x * 1.0 else: tmp = (-y * x) * t return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(log(Float64(1.0 - z)) - b))) tmp = 0.0 if (t_1 <= -1000.0) tmp = Float64(Float64(Float64(-t) * x) * y); elseif (t_1 <= 5e+53) tmp = Float64(x * 1.0); else tmp = Float64(Float64(Float64(-y) * x) * t); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (y * (log(z) - t)) + (a * (log((1.0 - z)) - b)); tmp = 0.0; if (t_1 <= -1000.0) tmp = (-t * x) * y; elseif (t_1 <= 5e+53) tmp = x * 1.0; else tmp = (-y * x) * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision] + N[(a * N[(N[Log[N[(1.0 - z), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1000.0], N[(N[((-t) * x), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[t$95$1, 5e+53], N[(x * 1.0), $MachinePrecision], N[(N[((-y) * x), $MachinePrecision] * t), $MachinePrecision]]]]
\begin{array}{l}
t_1 := y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)\\
\mathbf{if}\;t\_1 \leq -1000:\\
\;\;\;\;\left(\left(-t\right) \cdot x\right) \cdot y\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+53}:\\
\;\;\;\;x \cdot 1\\
\mathbf{else}:\\
\;\;\;\;\left(\left(-y\right) \cdot x\right) \cdot t\\
\end{array}
if (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < -1e3Initial program 96.6%
Taylor expanded in y around 0
lower-fma.f64N/A
lower-exp.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-log.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
Applied rewrites56.6%
Taylor expanded in a around 0
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-log.f6429.7
Applied rewrites29.7%
Taylor expanded in t around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6417.4
Applied rewrites17.4%
lift-*.f64N/A
mul-1-negN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
distribute-lft-neg-inN/A
lower-*.f64N/A
distribute-lft-neg-outN/A
lower-*.f64N/A
lower-neg.f6417.7
Applied rewrites17.7%
if -1e3 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 5.0000000000000004e53Initial program 96.6%
Taylor expanded in a around 0
lower-exp.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-log.f6471.9
Applied rewrites71.9%
Taylor expanded in y around 0
Applied rewrites19.1%
if 5.0000000000000004e53 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) Initial program 96.6%
Taylor expanded in y around 0
lower-fma.f64N/A
lower-exp.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-log.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
Applied rewrites56.6%
Taylor expanded in a around 0
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-log.f6429.7
Applied rewrites29.7%
Taylor expanded in t around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6417.4
Applied rewrites17.4%
lift-*.f64N/A
mul-1-negN/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lower-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lower-*.f64N/A
lower-neg.f6417.4
Applied rewrites17.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b)))))
(if (<= t_1 -1000.0)
(* (* (- t) x) y)
(if (<= t_1 5e+53) (* x 1.0) (* (* (- t) y) x)))))double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * (log(z) - t)) + (a * (log((1.0 - z)) - b));
double tmp;
if (t_1 <= -1000.0) {
tmp = (-t * x) * y;
} else if (t_1 <= 5e+53) {
tmp = x * 1.0;
} else {
tmp = (-t * 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) :: t_1
real(8) :: tmp
t_1 = (y * (log(z) - t)) + (a * (log((1.0d0 - z)) - b))
if (t_1 <= (-1000.0d0)) then
tmp = (-t * x) * y
else if (t_1 <= 5d+53) then
tmp = x * 1.0d0
else
tmp = (-t * 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 t_1 = (y * (Math.log(z) - t)) + (a * (Math.log((1.0 - z)) - b));
double tmp;
if (t_1 <= -1000.0) {
tmp = (-t * x) * y;
} else if (t_1 <= 5e+53) {
tmp = x * 1.0;
} else {
tmp = (-t * y) * x;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (y * (math.log(z) - t)) + (a * (math.log((1.0 - z)) - b)) tmp = 0 if t_1 <= -1000.0: tmp = (-t * x) * y elif t_1 <= 5e+53: tmp = x * 1.0 else: tmp = (-t * y) * x return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(log(Float64(1.0 - z)) - b))) tmp = 0.0 if (t_1 <= -1000.0) tmp = Float64(Float64(Float64(-t) * x) * y); elseif (t_1 <= 5e+53) tmp = Float64(x * 1.0); else tmp = Float64(Float64(Float64(-t) * y) * x); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (y * (log(z) - t)) + (a * (log((1.0 - z)) - b)); tmp = 0.0; if (t_1 <= -1000.0) tmp = (-t * x) * y; elseif (t_1 <= 5e+53) tmp = x * 1.0; else tmp = (-t * y) * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision] + N[(a * N[(N[Log[N[(1.0 - z), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1000.0], N[(N[((-t) * x), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[t$95$1, 5e+53], N[(x * 1.0), $MachinePrecision], N[(N[((-t) * y), $MachinePrecision] * x), $MachinePrecision]]]]
\begin{array}{l}
t_1 := y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)\\
\mathbf{if}\;t\_1 \leq -1000:\\
\;\;\;\;\left(\left(-t\right) \cdot x\right) \cdot y\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+53}:\\
\;\;\;\;x \cdot 1\\
\mathbf{else}:\\
\;\;\;\;\left(\left(-t\right) \cdot y\right) \cdot x\\
\end{array}
if (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < -1e3Initial program 96.6%
Taylor expanded in y around 0
lower-fma.f64N/A
lower-exp.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-log.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
Applied rewrites56.6%
Taylor expanded in a around 0
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-log.f6429.7
Applied rewrites29.7%
Taylor expanded in t around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6417.4
Applied rewrites17.4%
lift-*.f64N/A
mul-1-negN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
distribute-lft-neg-inN/A
lower-*.f64N/A
distribute-lft-neg-outN/A
lower-*.f64N/A
lower-neg.f6417.7
Applied rewrites17.7%
if -1e3 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 5.0000000000000004e53Initial program 96.6%
Taylor expanded in a around 0
lower-exp.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-log.f6471.9
Applied rewrites71.9%
Taylor expanded in y around 0
Applied rewrites19.1%
if 5.0000000000000004e53 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) Initial program 96.6%
Taylor expanded in y around 0
lower-fma.f64N/A
lower-exp.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-log.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
Applied rewrites56.6%
Taylor expanded in a around 0
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-log.f6429.7
Applied rewrites29.7%
Taylor expanded in t around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6417.4
Applied rewrites17.4%
lift-*.f64N/A
mul-1-negN/A
lift-*.f64N/A
distribute-lft-neg-inN/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-neg.f6417.6
Applied rewrites17.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (* (- t) x) y))
(t_2 (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b)))))
(if (<= t_2 -1000.0) t_1 (if (<= t_2 5e+53) (* x 1.0) t_1))))double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (-t * x) * y;
double t_2 = (y * (log(z) - t)) + (a * (log((1.0 - z)) - b));
double tmp;
if (t_2 <= -1000.0) {
tmp = t_1;
} else if (t_2 <= 5e+53) {
tmp = x * 1.0;
} 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) :: t_2
real(8) :: tmp
t_1 = (-t * x) * y
t_2 = (y * (log(z) - t)) + (a * (log((1.0d0 - z)) - b))
if (t_2 <= (-1000.0d0)) then
tmp = t_1
else if (t_2 <= 5d+53) then
tmp = x * 1.0d0
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 = (-t * x) * y;
double t_2 = (y * (Math.log(z) - t)) + (a * (Math.log((1.0 - z)) - b));
double tmp;
if (t_2 <= -1000.0) {
tmp = t_1;
} else if (t_2 <= 5e+53) {
tmp = x * 1.0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (-t * x) * y t_2 = (y * (math.log(z) - t)) + (a * (math.log((1.0 - z)) - b)) tmp = 0 if t_2 <= -1000.0: tmp = t_1 elif t_2 <= 5e+53: tmp = x * 1.0 else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(-t) * x) * y) t_2 = Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(log(Float64(1.0 - z)) - b))) tmp = 0.0 if (t_2 <= -1000.0) tmp = t_1; elseif (t_2 <= 5e+53) tmp = Float64(x * 1.0); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (-t * x) * y; t_2 = (y * (log(z) - t)) + (a * (log((1.0 - z)) - b)); tmp = 0.0; if (t_2 <= -1000.0) tmp = t_1; elseif (t_2 <= 5e+53) tmp = x * 1.0; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[((-t) * x), $MachinePrecision] * y), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision] + N[(a * N[(N[Log[N[(1.0 - z), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1000.0], t$95$1, If[LessEqual[t$95$2, 5e+53], N[(x * 1.0), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
t_1 := \left(\left(-t\right) \cdot x\right) \cdot y\\
t_2 := y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)\\
\mathbf{if}\;t\_2 \leq -1000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+53}:\\
\;\;\;\;x \cdot 1\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < -1e3 or 5.0000000000000004e53 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) Initial program 96.6%
Taylor expanded in y around 0
lower-fma.f64N/A
lower-exp.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-log.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
Applied rewrites56.6%
Taylor expanded in a around 0
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-log.f6429.7
Applied rewrites29.7%
Taylor expanded in t around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6417.4
Applied rewrites17.4%
lift-*.f64N/A
mul-1-negN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
distribute-lft-neg-inN/A
lower-*.f64N/A
distribute-lft-neg-outN/A
lower-*.f64N/A
lower-neg.f6417.7
Applied rewrites17.7%
if -1e3 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 5.0000000000000004e53Initial program 96.6%
Taylor expanded in a around 0
lower-exp.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-log.f6471.9
Applied rewrites71.9%
Taylor expanded in y around 0
Applied rewrites19.1%
(FPCore (x y z t a b) :precision binary64 (* x 1.0))
double code(double x, double y, double z, double t, double a, double b) {
return x * 1.0;
}
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 * 1.0d0
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x * 1.0;
}
def code(x, y, z, t, a, b): return x * 1.0
function code(x, y, z, t, a, b) return Float64(x * 1.0) end
function tmp = code(x, y, z, t, a, b) tmp = x * 1.0; end
code[x_, y_, z_, t_, a_, b_] := N[(x * 1.0), $MachinePrecision]
x \cdot 1
Initial program 96.6%
Taylor expanded in a around 0
lower-exp.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-log.f6471.9
Applied rewrites71.9%
Taylor expanded in y around 0
Applied rewrites19.1%
herbie shell --seed 2025172
(FPCore (x y z t a b)
:name "Numeric.SpecFunctions:incompleteBetaApprox from math-functions-0.1.5.2, B"
:precision binary64
(* x (exp (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b))))))