
(FPCore (x y z t a b c)
:precision binary64
(/
x
(+
x
(*
y
(exp
(*
2.0
(-
(/ (* z (sqrt (+ t a))) t)
(* (- b c) (- (+ a (/ 5.0 6.0)) (/ 2.0 (* t 3.0)))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
return x / (x + (y * exp((2.0 * (((z * sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.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, c)
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), intent (in) :: c
code = x / (x + (y * exp((2.0d0 * (((z * sqrt((t + a))) / t) - ((b - c) * ((a + (5.0d0 / 6.0d0)) - (2.0d0 / (t * 3.0d0)))))))))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return x / (x + (y * Math.exp((2.0 * (((z * Math.sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0)))))))));
}
def code(x, y, z, t, a, b, c): return x / (x + (y * math.exp((2.0 * (((z * math.sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0)))))))))
function code(x, y, z, t, a, b, c) return Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(Float64(z * sqrt(Float64(t + a))) / t) - Float64(Float64(b - c) * Float64(Float64(a + Float64(5.0 / 6.0)) - Float64(2.0 / Float64(t * 3.0)))))))))) end
function tmp = code(x, y, z, t, a, b, c) tmp = x / (x + (y * exp((2.0 * (((z * sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0))))))))); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(N[(z * N[Sqrt[N[(t + a), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision] - N[(N[(b - c), $MachinePrecision] * N[(N[(a + N[(5.0 / 6.0), $MachinePrecision]), $MachinePrecision] - N[(2.0 / N[(t * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{x + y \cdot e^{2 \cdot \left(\frac{z \cdot \sqrt{t + a}}{t} - \left(b - c\right) \cdot \left(\left(a + \frac{5}{6}\right) - \frac{2}{t \cdot 3}\right)\right)}}
\end{array}
Herbie found 10 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c)
:precision binary64
(/
x
(+
x
(*
y
(exp
(*
2.0
(-
(/ (* z (sqrt (+ t a))) t)
(* (- b c) (- (+ a (/ 5.0 6.0)) (/ 2.0 (* t 3.0)))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
return x / (x + (y * exp((2.0 * (((z * sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.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, c)
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), intent (in) :: c
code = x / (x + (y * exp((2.0d0 * (((z * sqrt((t + a))) / t) - ((b - c) * ((a + (5.0d0 / 6.0d0)) - (2.0d0 / (t * 3.0d0)))))))))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return x / (x + (y * Math.exp((2.0 * (((z * Math.sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0)))))))));
}
def code(x, y, z, t, a, b, c): return x / (x + (y * math.exp((2.0 * (((z * math.sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0)))))))))
function code(x, y, z, t, a, b, c) return Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(Float64(z * sqrt(Float64(t + a))) / t) - Float64(Float64(b - c) * Float64(Float64(a + Float64(5.0 / 6.0)) - Float64(2.0 / Float64(t * 3.0)))))))))) end
function tmp = code(x, y, z, t, a, b, c) tmp = x / (x + (y * exp((2.0 * (((z * sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0))))))))); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(N[(z * N[Sqrt[N[(t + a), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision] - N[(N[(b - c), $MachinePrecision] * N[(N[(a + N[(5.0 / 6.0), $MachinePrecision]), $MachinePrecision] - N[(2.0 / N[(t * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{x + y \cdot e^{2 \cdot \left(\frac{z \cdot \sqrt{t + a}}{t} - \left(b - c\right) \cdot \left(\left(a + \frac{5}{6}\right) - \frac{2}{t \cdot 3}\right)\right)}}
\end{array}
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1
(/
x
(+
x
(*
y
(exp
(*
2.0
(-
(/ (* z (sqrt (+ t a))) t)
(* (- b c) (- (+ a (/ 5.0 6.0)) (/ 2.0 (* t 3.0))))))))))))
(if (<= t_1 2.0)
t_1
(/ x (+ x (* y (exp (* (+ c c) (+ 0.8333333333333334 a)))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = x / (x + (y * exp((2.0 * (((z * sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0)))))))));
double tmp;
if (t_1 <= 2.0) {
tmp = t_1;
} else {
tmp = x / (x + (y * exp(((c + c) * (0.8333333333333334 + 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, c)
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), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = x / (x + (y * exp((2.0d0 * (((z * sqrt((t + a))) / t) - ((b - c) * ((a + (5.0d0 / 6.0d0)) - (2.0d0 / (t * 3.0d0)))))))))
if (t_1 <= 2.0d0) then
tmp = t_1
else
tmp = x / (x + (y * exp(((c + c) * (0.8333333333333334d0 + a)))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = x / (x + (y * Math.exp((2.0 * (((z * Math.sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0)))))))));
double tmp;
if (t_1 <= 2.0) {
tmp = t_1;
} else {
tmp = x / (x + (y * Math.exp(((c + c) * (0.8333333333333334 + a)))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = x / (x + (y * math.exp((2.0 * (((z * math.sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0))))))))) tmp = 0 if t_1 <= 2.0: tmp = t_1 else: tmp = x / (x + (y * math.exp(((c + c) * (0.8333333333333334 + a))))) return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(Float64(z * sqrt(Float64(t + a))) / t) - Float64(Float64(b - c) * Float64(Float64(a + Float64(5.0 / 6.0)) - Float64(2.0 / Float64(t * 3.0)))))))))) tmp = 0.0 if (t_1 <= 2.0) tmp = t_1; else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(Float64(c + c) * Float64(0.8333333333333334 + a)))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = x / (x + (y * exp((2.0 * (((z * sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0))))))))); tmp = 0.0; if (t_1 <= 2.0) tmp = t_1; else tmp = x / (x + (y * exp(((c + c) * (0.8333333333333334 + a))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(N[(z * N[Sqrt[N[(t + a), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision] - N[(N[(b - c), $MachinePrecision] * N[(N[(a + N[(5.0 / 6.0), $MachinePrecision]), $MachinePrecision] - N[(2.0 / N[(t * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 2.0], t$95$1, N[(x / N[(x + N[(y * N[Exp[N[(N[(c + c), $MachinePrecision] * N[(0.8333333333333334 + a), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{x + y \cdot e^{2 \cdot \left(\frac{z \cdot \sqrt{t + a}}{t} - \left(b - c\right) \cdot \left(\left(a + \frac{5}{6}\right) - \frac{2}{t \cdot 3}\right)\right)}}\\
\mathbf{if}\;t\_1 \leq 2:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{\left(c + c\right) \cdot \left(0.8333333333333334 + a\right)}}\\
\end{array}
\end{array}
if (/.f64 x (+.f64 x (*.f64 y (exp.f64 (*.f64 #s(literal 2 binary64) (-.f64 (/.f64 (*.f64 z (sqrt.f64 (+.f64 t a))) t) (*.f64 (-.f64 b c) (-.f64 (+.f64 a (/.f64 #s(literal 5 binary64) #s(literal 6 binary64))) (/.f64 #s(literal 2 binary64) (*.f64 t #s(literal 3 binary64))))))))))) < 2Initial program 98.7%
if 2 < (/.f64 x (+.f64 x (*.f64 y (exp.f64 (*.f64 #s(literal 2 binary64) (-.f64 (/.f64 (*.f64 z (sqrt.f64 (+.f64 t a))) t) (*.f64 (-.f64 b c) (-.f64 (+.f64 a (/.f64 #s(literal 5 binary64) #s(literal 6 binary64))) (/.f64 #s(literal 2 binary64) (*.f64 t #s(literal 3 binary64))))))))))) Initial program 0.0%
Taylor expanded in c around inf
metadata-evalN/A
associate-*r*N/A
lower-*.f64N/A
count-2-revN/A
lower-+.f64N/A
lower--.f64N/A
lower-+.f64N/A
metadata-evalN/A
associate-*r/N/A
metadata-evalN/A
lower-/.f6459.3
Applied rewrites59.3%
Taylor expanded in t around inf
metadata-evalN/A
lift-+.f64N/A
metadata-eval52.6
Applied rewrites52.6%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1
(/
x
(+
x
(*
y
(exp
(*
(+ b b)
(- (- (/ 0.6666666666666666 t) a) 0.8333333333333334))))))))
(if (<= b -1.36e+73)
t_1
(if (<= b 9.8e-82)
(/
x
(+
x
(*
y
(exp
(*
(+ c c)
(- (+ 0.8333333333333334 a) (/ 0.6666666666666666 t)))))))
t_1))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = x / (x + (y * exp(((b + b) * (((0.6666666666666666 / t) - a) - 0.8333333333333334)))));
double tmp;
if (b <= -1.36e+73) {
tmp = t_1;
} else if (b <= 9.8e-82) {
tmp = x / (x + (y * exp(((c + c) * ((0.8333333333333334 + a) - (0.6666666666666666 / t))))));
} 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, c)
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), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = x / (x + (y * exp(((b + b) * (((0.6666666666666666d0 / t) - a) - 0.8333333333333334d0)))))
if (b <= (-1.36d+73)) then
tmp = t_1
else if (b <= 9.8d-82) then
tmp = x / (x + (y * exp(((c + c) * ((0.8333333333333334d0 + a) - (0.6666666666666666d0 / t))))))
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 c) {
double t_1 = x / (x + (y * Math.exp(((b + b) * (((0.6666666666666666 / t) - a) - 0.8333333333333334)))));
double tmp;
if (b <= -1.36e+73) {
tmp = t_1;
} else if (b <= 9.8e-82) {
tmp = x / (x + (y * Math.exp(((c + c) * ((0.8333333333333334 + a) - (0.6666666666666666 / t))))));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = x / (x + (y * math.exp(((b + b) * (((0.6666666666666666 / t) - a) - 0.8333333333333334))))) tmp = 0 if b <= -1.36e+73: tmp = t_1 elif b <= 9.8e-82: tmp = x / (x + (y * math.exp(((c + c) * ((0.8333333333333334 + a) - (0.6666666666666666 / t)))))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(x / Float64(x + Float64(y * exp(Float64(Float64(b + b) * Float64(Float64(Float64(0.6666666666666666 / t) - a) - 0.8333333333333334)))))) tmp = 0.0 if (b <= -1.36e+73) tmp = t_1; elseif (b <= 9.8e-82) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(Float64(c + c) * Float64(Float64(0.8333333333333334 + a) - Float64(0.6666666666666666 / t))))))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = x / (x + (y * exp(((b + b) * (((0.6666666666666666 / t) - a) - 0.8333333333333334))))); tmp = 0.0; if (b <= -1.36e+73) tmp = t_1; elseif (b <= 9.8e-82) tmp = x / (x + (y * exp(((c + c) * ((0.8333333333333334 + a) - (0.6666666666666666 / t)))))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(x / N[(x + N[(y * N[Exp[N[(N[(b + b), $MachinePrecision] * N[(N[(N[(0.6666666666666666 / t), $MachinePrecision] - a), $MachinePrecision] - 0.8333333333333334), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.36e+73], t$95$1, If[LessEqual[b, 9.8e-82], N[(x / N[(x + N[(y * N[Exp[N[(N[(c + c), $MachinePrecision] * N[(N[(0.8333333333333334 + a), $MachinePrecision] - N[(0.6666666666666666 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{x + y \cdot e^{\left(b + b\right) \cdot \left(\left(\frac{0.6666666666666666}{t} - a\right) - 0.8333333333333334\right)}}\\
\mathbf{if}\;b \leq -1.36 \cdot 10^{+73}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 9.8 \cdot 10^{-82}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{\left(c + c\right) \cdot \left(\left(0.8333333333333334 + a\right) - \frac{0.6666666666666666}{t}\right)}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -1.3599999999999999e73 or 9.8000000000000006e-82 < b Initial program 91.8%
Taylor expanded in b around inf
metadata-evalN/A
associate-*r*N/A
lower-*.f64N/A
count-2-revN/A
lower-+.f64N/A
+-commutativeN/A
associate--r+N/A
lower--.f64N/A
lower--.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f64N/A
metadata-eval80.5
Applied rewrites80.5%
if -1.3599999999999999e73 < b < 9.8000000000000006e-82Initial program 95.8%
Taylor expanded in c around inf
metadata-evalN/A
associate-*r*N/A
lower-*.f64N/A
count-2-revN/A
lower-+.f64N/A
lower--.f64N/A
lower-+.f64N/A
metadata-evalN/A
associate-*r/N/A
metadata-evalN/A
lower-/.f6475.8
Applied rewrites75.8%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1
(*
2.0
(-
(/ (* z (sqrt (+ t a))) t)
(* (- b c) (- (+ a (/ 5.0 6.0)) (/ 2.0 (* t 3.0))))))))
(if (<= t_1 -40000000.0)
1.0
(if (<= t_1 2e+243)
(/ x (+ x (* y (exp (* (/ (sqrt (+ a t)) t) (+ z z))))))
(/
x
(+
x
(*
y
(exp
(*
(+ b b)
(- (- (/ 0.6666666666666666 t) a) 0.8333333333333334))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 2.0 * (((z * sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0)))));
double tmp;
if (t_1 <= -40000000.0) {
tmp = 1.0;
} else if (t_1 <= 2e+243) {
tmp = x / (x + (y * exp(((sqrt((a + t)) / t) * (z + z)))));
} else {
tmp = x / (x + (y * exp(((b + b) * (((0.6666666666666666 / t) - a) - 0.8333333333333334)))));
}
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, c)
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), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = 2.0d0 * (((z * sqrt((t + a))) / t) - ((b - c) * ((a + (5.0d0 / 6.0d0)) - (2.0d0 / (t * 3.0d0)))))
if (t_1 <= (-40000000.0d0)) then
tmp = 1.0d0
else if (t_1 <= 2d+243) then
tmp = x / (x + (y * exp(((sqrt((a + t)) / t) * (z + z)))))
else
tmp = x / (x + (y * exp(((b + b) * (((0.6666666666666666d0 / t) - a) - 0.8333333333333334d0)))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 2.0 * (((z * Math.sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0)))));
double tmp;
if (t_1 <= -40000000.0) {
tmp = 1.0;
} else if (t_1 <= 2e+243) {
tmp = x / (x + (y * Math.exp(((Math.sqrt((a + t)) / t) * (z + z)))));
} else {
tmp = x / (x + (y * Math.exp(((b + b) * (((0.6666666666666666 / t) - a) - 0.8333333333333334)))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = 2.0 * (((z * math.sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0))))) tmp = 0 if t_1 <= -40000000.0: tmp = 1.0 elif t_1 <= 2e+243: tmp = x / (x + (y * math.exp(((math.sqrt((a + t)) / t) * (z + z))))) else: tmp = x / (x + (y * math.exp(((b + b) * (((0.6666666666666666 / t) - a) - 0.8333333333333334))))) return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(2.0 * Float64(Float64(Float64(z * sqrt(Float64(t + a))) / t) - Float64(Float64(b - c) * Float64(Float64(a + Float64(5.0 / 6.0)) - Float64(2.0 / Float64(t * 3.0)))))) tmp = 0.0 if (t_1 <= -40000000.0) tmp = 1.0; elseif (t_1 <= 2e+243) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(Float64(sqrt(Float64(a + t)) / t) * Float64(z + z)))))); else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(Float64(b + b) * Float64(Float64(Float64(0.6666666666666666 / t) - a) - 0.8333333333333334)))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = 2.0 * (((z * sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0))))); tmp = 0.0; if (t_1 <= -40000000.0) tmp = 1.0; elseif (t_1 <= 2e+243) tmp = x / (x + (y * exp(((sqrt((a + t)) / t) * (z + z))))); else tmp = x / (x + (y * exp(((b + b) * (((0.6666666666666666 / t) - a) - 0.8333333333333334))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(2.0 * N[(N[(N[(z * N[Sqrt[N[(t + a), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision] - N[(N[(b - c), $MachinePrecision] * N[(N[(a + N[(5.0 / 6.0), $MachinePrecision]), $MachinePrecision] - N[(2.0 / N[(t * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -40000000.0], 1.0, If[LessEqual[t$95$1, 2e+243], N[(x / N[(x + N[(y * N[Exp[N[(N[(N[Sqrt[N[(a + t), $MachinePrecision]], $MachinePrecision] / t), $MachinePrecision] * N[(z + z), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + N[(y * N[Exp[N[(N[(b + b), $MachinePrecision] * N[(N[(N[(0.6666666666666666 / t), $MachinePrecision] - a), $MachinePrecision] - 0.8333333333333334), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \left(\frac{z \cdot \sqrt{t + a}}{t} - \left(b - c\right) \cdot \left(\left(a + \frac{5}{6}\right) - \frac{2}{t \cdot 3}\right)\right)\\
\mathbf{if}\;t\_1 \leq -40000000:\\
\;\;\;\;1\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+243}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{\frac{\sqrt{a + t}}{t} \cdot \left(z + z\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{\left(b + b\right) \cdot \left(\left(\frac{0.6666666666666666}{t} - a\right) - 0.8333333333333334\right)}}\\
\end{array}
\end{array}
if (*.f64 #s(literal 2 binary64) (-.f64 (/.f64 (*.f64 z (sqrt.f64 (+.f64 t a))) t) (*.f64 (-.f64 b c) (-.f64 (+.f64 a (/.f64 #s(literal 5 binary64) #s(literal 6 binary64))) (/.f64 #s(literal 2 binary64) (*.f64 t #s(literal 3 binary64))))))) < -4e7Initial program 98.7%
Taylor expanded in x around inf
Applied rewrites98.7%
if -4e7 < (*.f64 #s(literal 2 binary64) (-.f64 (/.f64 (*.f64 z (sqrt.f64 (+.f64 t a))) t) (*.f64 (-.f64 b c) (-.f64 (+.f64 a (/.f64 #s(literal 5 binary64) #s(literal 6 binary64))) (/.f64 #s(literal 2 binary64) (*.f64 t #s(literal 3 binary64))))))) < 2.0000000000000001e243Initial program 99.9%
Taylor expanded in z around inf
associate-*l/N/A
+-commutativeN/A
count-2-revN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-outN/A
lower-*.f64N/A
+-commutativeN/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-+.f64N/A
lower-+.f6458.1
Applied rewrites58.1%
if 2.0000000000000001e243 < (*.f64 #s(literal 2 binary64) (-.f64 (/.f64 (*.f64 z (sqrt.f64 (+.f64 t a))) t) (*.f64 (-.f64 b c) (-.f64 (+.f64 a (/.f64 #s(literal 5 binary64) #s(literal 6 binary64))) (/.f64 #s(literal 2 binary64) (*.f64 t #s(literal 3 binary64))))))) Initial program 83.1%
Taylor expanded in b around inf
metadata-evalN/A
associate-*r*N/A
lower-*.f64N/A
count-2-revN/A
lower-+.f64N/A
+-commutativeN/A
associate--r+N/A
lower--.f64N/A
lower--.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f64N/A
metadata-eval62.9
Applied rewrites62.9%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1
(*
y
(exp
(*
2.0
(-
(/ (* z (sqrt (+ t a))) t)
(* (- b c) (- (+ a (/ 5.0 6.0)) (/ 2.0 (* t 3.0))))))))))
(if (<= t_1 -2e-111)
(/ x (+ x (* y (exp (* (/ (sqrt (+ a t)) t) (+ z z))))))
(if (<= t_1 0.0)
1.0
(/ x (+ x (* y (exp (* (+ c c) (+ 0.8333333333333334 a))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = y * exp((2.0 * (((z * sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0)))))));
double tmp;
if (t_1 <= -2e-111) {
tmp = x / (x + (y * exp(((sqrt((a + t)) / t) * (z + z)))));
} else if (t_1 <= 0.0) {
tmp = 1.0;
} else {
tmp = x / (x + (y * exp(((c + c) * (0.8333333333333334 + 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, c)
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), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = y * exp((2.0d0 * (((z * sqrt((t + a))) / t) - ((b - c) * ((a + (5.0d0 / 6.0d0)) - (2.0d0 / (t * 3.0d0)))))))
if (t_1 <= (-2d-111)) then
tmp = x / (x + (y * exp(((sqrt((a + t)) / t) * (z + z)))))
else if (t_1 <= 0.0d0) then
tmp = 1.0d0
else
tmp = x / (x + (y * exp(((c + c) * (0.8333333333333334d0 + a)))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = y * Math.exp((2.0 * (((z * Math.sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0)))))));
double tmp;
if (t_1 <= -2e-111) {
tmp = x / (x + (y * Math.exp(((Math.sqrt((a + t)) / t) * (z + z)))));
} else if (t_1 <= 0.0) {
tmp = 1.0;
} else {
tmp = x / (x + (y * Math.exp(((c + c) * (0.8333333333333334 + a)))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = y * math.exp((2.0 * (((z * math.sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0))))))) tmp = 0 if t_1 <= -2e-111: tmp = x / (x + (y * math.exp(((math.sqrt((a + t)) / t) * (z + z))))) elif t_1 <= 0.0: tmp = 1.0 else: tmp = x / (x + (y * math.exp(((c + c) * (0.8333333333333334 + a))))) return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(y * exp(Float64(2.0 * Float64(Float64(Float64(z * sqrt(Float64(t + a))) / t) - Float64(Float64(b - c) * Float64(Float64(a + Float64(5.0 / 6.0)) - Float64(2.0 / Float64(t * 3.0)))))))) tmp = 0.0 if (t_1 <= -2e-111) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(Float64(sqrt(Float64(a + t)) / t) * Float64(z + z)))))); elseif (t_1 <= 0.0) tmp = 1.0; else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(Float64(c + c) * Float64(0.8333333333333334 + a)))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = y * exp((2.0 * (((z * sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0))))))); tmp = 0.0; if (t_1 <= -2e-111) tmp = x / (x + (y * exp(((sqrt((a + t)) / t) * (z + z))))); elseif (t_1 <= 0.0) tmp = 1.0; else tmp = x / (x + (y * exp(((c + c) * (0.8333333333333334 + a))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(y * N[Exp[N[(2.0 * N[(N[(N[(z * N[Sqrt[N[(t + a), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision] - N[(N[(b - c), $MachinePrecision] * N[(N[(a + N[(5.0 / 6.0), $MachinePrecision]), $MachinePrecision] - N[(2.0 / N[(t * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e-111], N[(x / N[(x + N[(y * N[Exp[N[(N[(N[Sqrt[N[(a + t), $MachinePrecision]], $MachinePrecision] / t), $MachinePrecision] * N[(z + z), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 0.0], 1.0, N[(x / N[(x + N[(y * N[Exp[N[(N[(c + c), $MachinePrecision] * N[(0.8333333333333334 + a), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot e^{2 \cdot \left(\frac{z \cdot \sqrt{t + a}}{t} - \left(b - c\right) \cdot \left(\left(a + \frac{5}{6}\right) - \frac{2}{t \cdot 3}\right)\right)}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{-111}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{\frac{\sqrt{a + t}}{t} \cdot \left(z + z\right)}}\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{\left(c + c\right) \cdot \left(0.8333333333333334 + a\right)}}\\
\end{array}
\end{array}
if (*.f64 y (exp.f64 (*.f64 #s(literal 2 binary64) (-.f64 (/.f64 (*.f64 z (sqrt.f64 (+.f64 t a))) t) (*.f64 (-.f64 b c) (-.f64 (+.f64 a (/.f64 #s(literal 5 binary64) #s(literal 6 binary64))) (/.f64 #s(literal 2 binary64) (*.f64 t #s(literal 3 binary64))))))))) < -2.00000000000000018e-111Initial program 98.4%
Taylor expanded in z around inf
associate-*l/N/A
+-commutativeN/A
count-2-revN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-outN/A
lower-*.f64N/A
+-commutativeN/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-+.f64N/A
lower-+.f6454.8
Applied rewrites54.8%
if -2.00000000000000018e-111 < (*.f64 y (exp.f64 (*.f64 #s(literal 2 binary64) (-.f64 (/.f64 (*.f64 z (sqrt.f64 (+.f64 t a))) t) (*.f64 (-.f64 b c) (-.f64 (+.f64 a (/.f64 #s(literal 5 binary64) #s(literal 6 binary64))) (/.f64 #s(literal 2 binary64) (*.f64 t #s(literal 3 binary64))))))))) < 0.0Initial program 98.7%
Taylor expanded in x around inf
Applied rewrites98.5%
if 0.0 < (*.f64 y (exp.f64 (*.f64 #s(literal 2 binary64) (-.f64 (/.f64 (*.f64 z (sqrt.f64 (+.f64 t a))) t) (*.f64 (-.f64 b c) (-.f64 (+.f64 a (/.f64 #s(literal 5 binary64) #s(literal 6 binary64))) (/.f64 #s(literal 2 binary64) (*.f64 t #s(literal 3 binary64))))))))) Initial program 82.5%
Taylor expanded in c around inf
metadata-evalN/A
associate-*r*N/A
lower-*.f64N/A
count-2-revN/A
lower-+.f64N/A
lower--.f64N/A
lower-+.f64N/A
metadata-evalN/A
associate-*r/N/A
metadata-evalN/A
lower-/.f6465.0
Applied rewrites65.0%
Taylor expanded in t around inf
metadata-evalN/A
lift-+.f64N/A
metadata-eval54.6
Applied rewrites54.6%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1
(*
y
(exp
(*
2.0
(-
(/ (* z (sqrt (+ t a))) t)
(* (- b c) (- (+ a (/ 5.0 6.0)) (/ 2.0 (* t 3.0))))))))))
(if (<= t_1 -2e-111)
(/ x (fma (exp (* (/ c t) -1.3333333333333333)) y x))
(if (<= t_1 0.0)
1.0
(/ x (+ x (* y (exp (* (+ c c) (+ 0.8333333333333334 a))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = y * exp((2.0 * (((z * sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0)))))));
double tmp;
if (t_1 <= -2e-111) {
tmp = x / fma(exp(((c / t) * -1.3333333333333333)), y, x);
} else if (t_1 <= 0.0) {
tmp = 1.0;
} else {
tmp = x / (x + (y * exp(((c + c) * (0.8333333333333334 + a)))));
}
return tmp;
}
function code(x, y, z, t, a, b, c) t_1 = Float64(y * exp(Float64(2.0 * Float64(Float64(Float64(z * sqrt(Float64(t + a))) / t) - Float64(Float64(b - c) * Float64(Float64(a + Float64(5.0 / 6.0)) - Float64(2.0 / Float64(t * 3.0)))))))) tmp = 0.0 if (t_1 <= -2e-111) tmp = Float64(x / fma(exp(Float64(Float64(c / t) * -1.3333333333333333)), y, x)); elseif (t_1 <= 0.0) tmp = 1.0; else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(Float64(c + c) * Float64(0.8333333333333334 + a)))))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(y * N[Exp[N[(2.0 * N[(N[(N[(z * N[Sqrt[N[(t + a), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision] - N[(N[(b - c), $MachinePrecision] * N[(N[(a + N[(5.0 / 6.0), $MachinePrecision]), $MachinePrecision] - N[(2.0 / N[(t * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e-111], N[(x / N[(N[Exp[N[(N[(c / t), $MachinePrecision] * -1.3333333333333333), $MachinePrecision]], $MachinePrecision] * y + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 0.0], 1.0, N[(x / N[(x + N[(y * N[Exp[N[(N[(c + c), $MachinePrecision] * N[(0.8333333333333334 + a), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot e^{2 \cdot \left(\frac{z \cdot \sqrt{t + a}}{t} - \left(b - c\right) \cdot \left(\left(a + \frac{5}{6}\right) - \frac{2}{t \cdot 3}\right)\right)}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{-111}:\\
\;\;\;\;\frac{x}{\mathsf{fma}\left(e^{\frac{c}{t} \cdot -1.3333333333333333}, y, x\right)}\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{\left(c + c\right) \cdot \left(0.8333333333333334 + a\right)}}\\
\end{array}
\end{array}
if (*.f64 y (exp.f64 (*.f64 #s(literal 2 binary64) (-.f64 (/.f64 (*.f64 z (sqrt.f64 (+.f64 t a))) t) (*.f64 (-.f64 b c) (-.f64 (+.f64 a (/.f64 #s(literal 5 binary64) #s(literal 6 binary64))) (/.f64 #s(literal 2 binary64) (*.f64 t #s(literal 3 binary64))))))))) < -2.00000000000000018e-111Initial program 98.4%
Taylor expanded in c around inf
metadata-evalN/A
associate-*r*N/A
lower-*.f64N/A
count-2-revN/A
lower-+.f64N/A
lower--.f64N/A
lower-+.f64N/A
metadata-evalN/A
associate-*r/N/A
metadata-evalN/A
lower-/.f6463.9
Applied rewrites63.9%
Taylor expanded in t around 0
*-commutativeN/A
lower-*.f64N/A
lower-/.f6444.6
Applied rewrites44.6%
metadata-eval44.6
Applied rewrites44.6%
if -2.00000000000000018e-111 < (*.f64 y (exp.f64 (*.f64 #s(literal 2 binary64) (-.f64 (/.f64 (*.f64 z (sqrt.f64 (+.f64 t a))) t) (*.f64 (-.f64 b c) (-.f64 (+.f64 a (/.f64 #s(literal 5 binary64) #s(literal 6 binary64))) (/.f64 #s(literal 2 binary64) (*.f64 t #s(literal 3 binary64))))))))) < 0.0Initial program 98.7%
Taylor expanded in x around inf
Applied rewrites98.5%
if 0.0 < (*.f64 y (exp.f64 (*.f64 #s(literal 2 binary64) (-.f64 (/.f64 (*.f64 z (sqrt.f64 (+.f64 t a))) t) (*.f64 (-.f64 b c) (-.f64 (+.f64 a (/.f64 #s(literal 5 binary64) #s(literal 6 binary64))) (/.f64 #s(literal 2 binary64) (*.f64 t #s(literal 3 binary64))))))))) Initial program 82.5%
Taylor expanded in c around inf
metadata-evalN/A
associate-*r*N/A
lower-*.f64N/A
count-2-revN/A
lower-+.f64N/A
lower--.f64N/A
lower-+.f64N/A
metadata-evalN/A
associate-*r/N/A
metadata-evalN/A
lower-/.f6465.0
Applied rewrites65.0%
Taylor expanded in t around inf
metadata-evalN/A
lift-+.f64N/A
metadata-eval54.6
Applied rewrites54.6%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1
(*
2.0
(-
(/ (* z (sqrt (+ t a))) t)
(* (- b c) (- (+ a (/ 5.0 6.0)) (/ 2.0 (* t 3.0))))))))
(if (<= t_1 -40000000.0)
1.0
(if (<= t_1 2e+287)
(/ x (+ x (* y (exp (* (+ c c) 0.8333333333333334)))))
(/ x (fma (exp (* (/ c t) -1.3333333333333333)) y x))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 2.0 * (((z * sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0)))));
double tmp;
if (t_1 <= -40000000.0) {
tmp = 1.0;
} else if (t_1 <= 2e+287) {
tmp = x / (x + (y * exp(((c + c) * 0.8333333333333334))));
} else {
tmp = x / fma(exp(((c / t) * -1.3333333333333333)), y, x);
}
return tmp;
}
function code(x, y, z, t, a, b, c) t_1 = Float64(2.0 * Float64(Float64(Float64(z * sqrt(Float64(t + a))) / t) - Float64(Float64(b - c) * Float64(Float64(a + Float64(5.0 / 6.0)) - Float64(2.0 / Float64(t * 3.0)))))) tmp = 0.0 if (t_1 <= -40000000.0) tmp = 1.0; elseif (t_1 <= 2e+287) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(Float64(c + c) * 0.8333333333333334))))); else tmp = Float64(x / fma(exp(Float64(Float64(c / t) * -1.3333333333333333)), y, x)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(2.0 * N[(N[(N[(z * N[Sqrt[N[(t + a), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision] - N[(N[(b - c), $MachinePrecision] * N[(N[(a + N[(5.0 / 6.0), $MachinePrecision]), $MachinePrecision] - N[(2.0 / N[(t * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -40000000.0], 1.0, If[LessEqual[t$95$1, 2e+287], N[(x / N[(x + N[(y * N[Exp[N[(N[(c + c), $MachinePrecision] * 0.8333333333333334), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[Exp[N[(N[(c / t), $MachinePrecision] * -1.3333333333333333), $MachinePrecision]], $MachinePrecision] * y + x), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \left(\frac{z \cdot \sqrt{t + a}}{t} - \left(b - c\right) \cdot \left(\left(a + \frac{5}{6}\right) - \frac{2}{t \cdot 3}\right)\right)\\
\mathbf{if}\;t\_1 \leq -40000000:\\
\;\;\;\;1\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+287}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{\left(c + c\right) \cdot 0.8333333333333334}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\mathsf{fma}\left(e^{\frac{c}{t} \cdot -1.3333333333333333}, y, x\right)}\\
\end{array}
\end{array}
if (*.f64 #s(literal 2 binary64) (-.f64 (/.f64 (*.f64 z (sqrt.f64 (+.f64 t a))) t) (*.f64 (-.f64 b c) (-.f64 (+.f64 a (/.f64 #s(literal 5 binary64) #s(literal 6 binary64))) (/.f64 #s(literal 2 binary64) (*.f64 t #s(literal 3 binary64))))))) < -4e7Initial program 98.7%
Taylor expanded in x around inf
Applied rewrites98.7%
if -4e7 < (*.f64 #s(literal 2 binary64) (-.f64 (/.f64 (*.f64 z (sqrt.f64 (+.f64 t a))) t) (*.f64 (-.f64 b c) (-.f64 (+.f64 a (/.f64 #s(literal 5 binary64) #s(literal 6 binary64))) (/.f64 #s(literal 2 binary64) (*.f64 t #s(literal 3 binary64))))))) < 2.0000000000000002e287Initial program 99.9%
Taylor expanded in c around inf
metadata-evalN/A
associate-*r*N/A
lower-*.f64N/A
count-2-revN/A
lower-+.f64N/A
lower--.f64N/A
lower-+.f64N/A
metadata-evalN/A
associate-*r/N/A
metadata-evalN/A
lower-/.f6466.0
Applied rewrites66.0%
Taylor expanded in t around inf
metadata-evalN/A
lift-+.f64N/A
metadata-eval58.4
Applied rewrites58.4%
Taylor expanded in a around 0
Applied rewrites51.1%
if 2.0000000000000002e287 < (*.f64 #s(literal 2 binary64) (-.f64 (/.f64 (*.f64 z (sqrt.f64 (+.f64 t a))) t) (*.f64 (-.f64 b c) (-.f64 (+.f64 a (/.f64 #s(literal 5 binary64) #s(literal 6 binary64))) (/.f64 #s(literal 2 binary64) (*.f64 t #s(literal 3 binary64))))))) Initial program 80.1%
Taylor expanded in c around inf
metadata-evalN/A
associate-*r*N/A
lower-*.f64N/A
count-2-revN/A
lower-+.f64N/A
lower--.f64N/A
lower-+.f64N/A
metadata-evalN/A
associate-*r/N/A
metadata-evalN/A
lower-/.f6464.2
Applied rewrites64.2%
Taylor expanded in t around 0
*-commutativeN/A
lower-*.f64N/A
lower-/.f6449.6
Applied rewrites49.6%
metadata-eval49.6
Applied rewrites49.6%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1
(*
2.0
(-
(/ (* z (sqrt (+ t a))) t)
(* (- b c) (- (+ a (/ 5.0 6.0)) (/ 2.0 (* t 3.0))))))))
(if (<= t_1 -40000000.0)
1.0
(if (<= t_1 2e+298)
(/ x (fma (exp (* -1.6666666666666667 b)) y x))
(/ x (fma (exp (* (/ b t) 1.3333333333333333)) y x))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 2.0 * (((z * sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0)))));
double tmp;
if (t_1 <= -40000000.0) {
tmp = 1.0;
} else if (t_1 <= 2e+298) {
tmp = x / fma(exp((-1.6666666666666667 * b)), y, x);
} else {
tmp = x / fma(exp(((b / t) * 1.3333333333333333)), y, x);
}
return tmp;
}
function code(x, y, z, t, a, b, c) t_1 = Float64(2.0 * Float64(Float64(Float64(z * sqrt(Float64(t + a))) / t) - Float64(Float64(b - c) * Float64(Float64(a + Float64(5.0 / 6.0)) - Float64(2.0 / Float64(t * 3.0)))))) tmp = 0.0 if (t_1 <= -40000000.0) tmp = 1.0; elseif (t_1 <= 2e+298) tmp = Float64(x / fma(exp(Float64(-1.6666666666666667 * b)), y, x)); else tmp = Float64(x / fma(exp(Float64(Float64(b / t) * 1.3333333333333333)), y, x)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(2.0 * N[(N[(N[(z * N[Sqrt[N[(t + a), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision] - N[(N[(b - c), $MachinePrecision] * N[(N[(a + N[(5.0 / 6.0), $MachinePrecision]), $MachinePrecision] - N[(2.0 / N[(t * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -40000000.0], 1.0, If[LessEqual[t$95$1, 2e+298], N[(x / N[(N[Exp[N[(-1.6666666666666667 * b), $MachinePrecision]], $MachinePrecision] * y + x), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[Exp[N[(N[(b / t), $MachinePrecision] * 1.3333333333333333), $MachinePrecision]], $MachinePrecision] * y + x), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \left(\frac{z \cdot \sqrt{t + a}}{t} - \left(b - c\right) \cdot \left(\left(a + \frac{5}{6}\right) - \frac{2}{t \cdot 3}\right)\right)\\
\mathbf{if}\;t\_1 \leq -40000000:\\
\;\;\;\;1\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+298}:\\
\;\;\;\;\frac{x}{\mathsf{fma}\left(e^{-1.6666666666666667 \cdot b}, y, x\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\mathsf{fma}\left(e^{\frac{b}{t} \cdot 1.3333333333333333}, y, x\right)}\\
\end{array}
\end{array}
if (*.f64 #s(literal 2 binary64) (-.f64 (/.f64 (*.f64 z (sqrt.f64 (+.f64 t a))) t) (*.f64 (-.f64 b c) (-.f64 (+.f64 a (/.f64 #s(literal 5 binary64) #s(literal 6 binary64))) (/.f64 #s(literal 2 binary64) (*.f64 t #s(literal 3 binary64))))))) < -4e7Initial program 98.7%
Taylor expanded in x around inf
Applied rewrites98.7%
if -4e7 < (*.f64 #s(literal 2 binary64) (-.f64 (/.f64 (*.f64 z (sqrt.f64 (+.f64 t a))) t) (*.f64 (-.f64 b c) (-.f64 (+.f64 a (/.f64 #s(literal 5 binary64) #s(literal 6 binary64))) (/.f64 #s(literal 2 binary64) (*.f64 t #s(literal 3 binary64))))))) < 1.9999999999999999e298Initial program 99.9%
Taylor expanded in b around inf
metadata-evalN/A
associate-*r*N/A
lower-*.f64N/A
count-2-revN/A
lower-+.f64N/A
+-commutativeN/A
associate--r+N/A
lower--.f64N/A
lower--.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f64N/A
metadata-eval67.0
Applied rewrites67.0%
Taylor expanded in t around inf
metadata-evalN/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-+.f64N/A
metadata-eval58.5
Applied rewrites58.5%
Taylor expanded in a around 0
lower-*.f6450.9
Applied rewrites50.9%
Applied rewrites50.9%
if 1.9999999999999999e298 < (*.f64 #s(literal 2 binary64) (-.f64 (/.f64 (*.f64 z (sqrt.f64 (+.f64 t a))) t) (*.f64 (-.f64 b c) (-.f64 (+.f64 a (/.f64 #s(literal 5 binary64) #s(literal 6 binary64))) (/.f64 #s(literal 2 binary64) (*.f64 t #s(literal 3 binary64))))))) Initial program 79.2%
Taylor expanded in b around inf
metadata-evalN/A
associate-*r*N/A
lower-*.f64N/A
count-2-revN/A
lower-+.f64N/A
+-commutativeN/A
associate--r+N/A
lower--.f64N/A
lower--.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f64N/A
metadata-eval62.9
Applied rewrites62.9%
Taylor expanded in t around 0
*-commutativeN/A
lower-*.f64N/A
lower-/.f6448.9
Applied rewrites48.9%
metadata-eval48.9
Applied rewrites48.9%
(FPCore (x y z t a b c)
:precision binary64
(if (<=
(*
2.0
(-
(/ (* z (sqrt (+ t a))) t)
(* (- b c) (- (+ a (/ 5.0 6.0)) (/ 2.0 (* t 3.0))))))
-40000000.0)
1.0
(/ x (fma (exp (* (/ c t) -1.3333333333333333)) y x))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((2.0 * (((z * sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0)))))) <= -40000000.0) {
tmp = 1.0;
} else {
tmp = x / fma(exp(((c / t) * -1.3333333333333333)), y, x);
}
return tmp;
}
function code(x, y, z, t, a, b, c) tmp = 0.0 if (Float64(2.0 * Float64(Float64(Float64(z * sqrt(Float64(t + a))) / t) - Float64(Float64(b - c) * Float64(Float64(a + Float64(5.0 / 6.0)) - Float64(2.0 / Float64(t * 3.0)))))) <= -40000000.0) tmp = 1.0; else tmp = Float64(x / fma(exp(Float64(Float64(c / t) * -1.3333333333333333)), y, x)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[N[(2.0 * N[(N[(N[(z * N[Sqrt[N[(t + a), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision] - N[(N[(b - c), $MachinePrecision] * N[(N[(a + N[(5.0 / 6.0), $MachinePrecision]), $MachinePrecision] - N[(2.0 / N[(t * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -40000000.0], 1.0, N[(x / N[(N[Exp[N[(N[(c / t), $MachinePrecision] * -1.3333333333333333), $MachinePrecision]], $MachinePrecision] * y + x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;2 \cdot \left(\frac{z \cdot \sqrt{t + a}}{t} - \left(b - c\right) \cdot \left(\left(a + \frac{5}{6}\right) - \frac{2}{t \cdot 3}\right)\right) \leq -40000000:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\mathsf{fma}\left(e^{\frac{c}{t} \cdot -1.3333333333333333}, y, x\right)}\\
\end{array}
\end{array}
if (*.f64 #s(literal 2 binary64) (-.f64 (/.f64 (*.f64 z (sqrt.f64 (+.f64 t a))) t) (*.f64 (-.f64 b c) (-.f64 (+.f64 a (/.f64 #s(literal 5 binary64) #s(literal 6 binary64))) (/.f64 #s(literal 2 binary64) (*.f64 t #s(literal 3 binary64))))))) < -4e7Initial program 98.7%
Taylor expanded in x around inf
Applied rewrites98.7%
if -4e7 < (*.f64 #s(literal 2 binary64) (-.f64 (/.f64 (*.f64 z (sqrt.f64 (+.f64 t a))) t) (*.f64 (-.f64 b c) (-.f64 (+.f64 a (/.f64 #s(literal 5 binary64) #s(literal 6 binary64))) (/.f64 #s(literal 2 binary64) (*.f64 t #s(literal 3 binary64))))))) Initial program 89.9%
Taylor expanded in c around inf
metadata-evalN/A
associate-*r*N/A
lower-*.f64N/A
count-2-revN/A
lower-+.f64N/A
lower--.f64N/A
lower-+.f64N/A
metadata-evalN/A
associate-*r/N/A
metadata-evalN/A
lower-/.f6465.1
Applied rewrites65.1%
Taylor expanded in t around 0
*-commutativeN/A
lower-*.f64N/A
lower-/.f6447.5
Applied rewrites47.5%
metadata-eval47.5
Applied rewrites47.5%
(FPCore (x y z t a b c)
:precision binary64
(if (<=
(*
2.0
(-
(/ (* z (sqrt (+ t a))) t)
(* (- b c) (- (+ a (/ 5.0 6.0)) (/ 2.0 (* t 3.0))))))
-40000000.0)
1.0
(/ x (fma (exp (* -1.6666666666666667 b)) y x))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((2.0 * (((z * sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0)))))) <= -40000000.0) {
tmp = 1.0;
} else {
tmp = x / fma(exp((-1.6666666666666667 * b)), y, x);
}
return tmp;
}
function code(x, y, z, t, a, b, c) tmp = 0.0 if (Float64(2.0 * Float64(Float64(Float64(z * sqrt(Float64(t + a))) / t) - Float64(Float64(b - c) * Float64(Float64(a + Float64(5.0 / 6.0)) - Float64(2.0 / Float64(t * 3.0)))))) <= -40000000.0) tmp = 1.0; else tmp = Float64(x / fma(exp(Float64(-1.6666666666666667 * b)), y, x)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[N[(2.0 * N[(N[(N[(z * N[Sqrt[N[(t + a), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision] - N[(N[(b - c), $MachinePrecision] * N[(N[(a + N[(5.0 / 6.0), $MachinePrecision]), $MachinePrecision] - N[(2.0 / N[(t * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -40000000.0], 1.0, N[(x / N[(N[Exp[N[(-1.6666666666666667 * b), $MachinePrecision]], $MachinePrecision] * y + x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;2 \cdot \left(\frac{z \cdot \sqrt{t + a}}{t} - \left(b - c\right) \cdot \left(\left(a + \frac{5}{6}\right) - \frac{2}{t \cdot 3}\right)\right) \leq -40000000:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\mathsf{fma}\left(e^{-1.6666666666666667 \cdot b}, y, x\right)}\\
\end{array}
\end{array}
if (*.f64 #s(literal 2 binary64) (-.f64 (/.f64 (*.f64 z (sqrt.f64 (+.f64 t a))) t) (*.f64 (-.f64 b c) (-.f64 (+.f64 a (/.f64 #s(literal 5 binary64) #s(literal 6 binary64))) (/.f64 #s(literal 2 binary64) (*.f64 t #s(literal 3 binary64))))))) < -4e7Initial program 98.7%
Taylor expanded in x around inf
Applied rewrites98.7%
if -4e7 < (*.f64 #s(literal 2 binary64) (-.f64 (/.f64 (*.f64 z (sqrt.f64 (+.f64 t a))) t) (*.f64 (-.f64 b c) (-.f64 (+.f64 a (/.f64 #s(literal 5 binary64) #s(literal 6 binary64))) (/.f64 #s(literal 2 binary64) (*.f64 t #s(literal 3 binary64))))))) Initial program 89.9%
Taylor expanded in b around inf
metadata-evalN/A
associate-*r*N/A
lower-*.f64N/A
count-2-revN/A
lower-+.f64N/A
+-commutativeN/A
associate--r+N/A
lower--.f64N/A
lower--.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f64N/A
metadata-eval65.0
Applied rewrites65.0%
Taylor expanded in t around inf
metadata-evalN/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-+.f64N/A
metadata-eval54.4
Applied rewrites54.4%
Taylor expanded in a around 0
lower-*.f6447.6
Applied rewrites47.6%
Applied rewrites47.6%
(FPCore (x y z t a b c) :precision binary64 1.0)
double code(double x, double y, double z, double t, double a, double b, double c) {
return 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, c)
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), intent (in) :: c
code = 1.0d0
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return 1.0;
}
def code(x, y, z, t, a, b, c): return 1.0
function code(x, y, z, t, a, b, c) return 1.0 end
function tmp = code(x, y, z, t, a, b, c) tmp = 1.0; end
code[x_, y_, z_, t_, a_, b_, c_] := 1.0
\begin{array}{l}
\\
1
\end{array}
Initial program 93.7%
Taylor expanded in x around inf
Applied rewrites50.8%
herbie shell --seed 2025130
(FPCore (x y z t a b c)
:name "Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, I"
:precision binary64
(/ x (+ x (* y (exp (* 2.0 (- (/ (* z (sqrt (+ t a))) t) (* (- b c) (- (+ a (/ 5.0 6.0)) (/ 2.0 (* t 3.0)))))))))))