
(FPCore (x y z t a b c i) :precision binary64 (+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))) (* y i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
}
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, i)
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), intent (in) :: i
code = (((((x * log(y)) + z) + t) + a) + ((b - 0.5d0) * log(c))) + (y * i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * Math.log(y)) + z) + t) + a) + ((b - 0.5) * Math.log(c))) + (y * i);
}
def code(x, y, z, t, a, b, c, i): return (((((x * math.log(y)) + z) + t) + a) + ((b - 0.5) * math.log(c))) + (y * i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i
\end{array}
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i) :precision binary64 (+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))) (* y i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
}
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, i)
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), intent (in) :: i
code = (((((x * log(y)) + z) + t) + a) + ((b - 0.5d0) * log(c))) + (y * i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * Math.log(y)) + z) + t) + a) + ((b - 0.5) * Math.log(c))) + (y * i);
}
def code(x, y, z, t, a, b, c, i): return (((((x * math.log(y)) + z) + t) + a) + ((b - 0.5) * math.log(c))) + (y * i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i
\end{array}
(FPCore (x y z t a b c i) :precision binary64 (+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))) (* y i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
}
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, i)
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), intent (in) :: i
code = (((((x * log(y)) + z) + t) + a) + ((b - 0.5d0) * log(c))) + (y * i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * Math.log(y)) + z) + t) + a) + ((b - 0.5) * Math.log(c))) + (y * i);
}
def code(x, y, z, t, a, b, c, i): return (((((x * math.log(y)) + z) + t) + a) + ((b - 0.5) * math.log(c))) + (y * i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i
\end{array}
Initial program 99.8%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* (log c) (- b 0.5))))
(if (<=
(+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))) (* y i))
-5e+18)
(+ t (+ z (fma i y (fma x (log y) t_1))))
(+ a (+ t (+ z (fma i y t_1)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = log(c) * (b - 0.5);
double tmp;
if (((((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i)) <= -5e+18) {
tmp = t + (z + fma(i, y, fma(x, log(y), t_1)));
} else {
tmp = a + (t + (z + fma(i, y, t_1)));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(log(c) * Float64(b - 0.5)) tmp = 0.0 if (Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i)) <= -5e+18) tmp = Float64(t + Float64(z + fma(i, y, fma(x, log(y), t_1)))); else tmp = Float64(a + Float64(t + Float64(z + fma(i, y, t_1)))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], -5e+18], N[(t + N[(z + N[(i * y + N[(x * N[Log[y], $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a + N[(t + N[(z + N[(i * y + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log c \cdot \left(b - 0.5\right)\\
\mathbf{if}\;\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \leq -5 \cdot 10^{+18}:\\
\;\;\;\;t + \left(z + \mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, t\_1\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;a + \left(t + \left(z + \mathsf{fma}\left(i, y, t\_1\right)\right)\right)\\
\end{array}
\end{array}
if (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < -5e18Initial program 99.8%
Taylor expanded in a around 0
Applied rewrites85.1%
if -5e18 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) Initial program 99.8%
Taylor expanded in x around 0
Applied rewrites83.8%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= x -9.5e+206)
(+ t (fma i y (fma x (log y) (* (log c) -0.5))))
(if (<= x 3.2e+241)
(+ a (+ t (+ z (fma i y (* (log c) (- b 0.5))))))
(+ t (fma (log y) x (fma (- b 0.5) (log c) z))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (x <= -9.5e+206) {
tmp = t + fma(i, y, fma(x, log(y), (log(c) * -0.5)));
} else if (x <= 3.2e+241) {
tmp = a + (t + (z + fma(i, y, (log(c) * (b - 0.5)))));
} else {
tmp = t + fma(log(y), x, fma((b - 0.5), log(c), z));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (x <= -9.5e+206) tmp = Float64(t + fma(i, y, fma(x, log(y), Float64(log(c) * -0.5)))); elseif (x <= 3.2e+241) tmp = Float64(a + Float64(t + Float64(z + fma(i, y, Float64(log(c) * Float64(b - 0.5)))))); else tmp = Float64(t + fma(log(y), x, fma(Float64(b - 0.5), log(c), z))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[x, -9.5e+206], N[(t + N[(i * y + N[(x * N[Log[y], $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.2e+241], N[(a + N[(t + N[(z + N[(i * y + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(N[Log[y], $MachinePrecision] * x + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -9.5 \cdot 10^{+206}:\\
\;\;\;\;t + \mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \log c \cdot -0.5\right)\right)\\
\mathbf{elif}\;x \leq 3.2 \cdot 10^{+241}:\\
\;\;\;\;a + \left(t + \left(z + \mathsf{fma}\left(i, y, \log c \cdot \left(b - 0.5\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t + \mathsf{fma}\left(\log y, x, \mathsf{fma}\left(b - 0.5, \log c, z\right)\right)\\
\end{array}
\end{array}
if x < -9.49999999999999966e206Initial program 99.8%
Taylor expanded in a around 0
Applied rewrites85.1%
Taylor expanded in y around 0
Applied rewrites62.1%
Taylor expanded in z around 0
Applied rewrites70.6%
Taylor expanded in b around 0
Applied rewrites55.2%
if -9.49999999999999966e206 < x < 3.20000000000000004e241Initial program 99.8%
Taylor expanded in x around 0
Applied rewrites83.8%
if 3.20000000000000004e241 < x Initial program 99.8%
Taylor expanded in a around 0
Applied rewrites85.1%
Taylor expanded in y around 0
Applied rewrites62.1%
Applied rewrites62.1%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= x -1.8e+207)
(+ t (+ z (fma x (log y) (* (log c) -0.5))))
(if (<= x 3.2e+241)
(+ a (+ t (+ z (fma i y (* (log c) (- b 0.5))))))
(+ t (fma (log y) x (fma (- b 0.5) (log c) z))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (x <= -1.8e+207) {
tmp = t + (z + fma(x, log(y), (log(c) * -0.5)));
} else if (x <= 3.2e+241) {
tmp = a + (t + (z + fma(i, y, (log(c) * (b - 0.5)))));
} else {
tmp = t + fma(log(y), x, fma((b - 0.5), log(c), z));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (x <= -1.8e+207) tmp = Float64(t + Float64(z + fma(x, log(y), Float64(log(c) * -0.5)))); elseif (x <= 3.2e+241) tmp = Float64(a + Float64(t + Float64(z + fma(i, y, Float64(log(c) * Float64(b - 0.5)))))); else tmp = Float64(t + fma(log(y), x, fma(Float64(b - 0.5), log(c), z))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[x, -1.8e+207], N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.2e+241], N[(a + N[(t + N[(z + N[(i * y + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(N[Log[y], $MachinePrecision] * x + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.8 \cdot 10^{+207}:\\
\;\;\;\;t + \left(z + \mathsf{fma}\left(x, \log y, \log c \cdot -0.5\right)\right)\\
\mathbf{elif}\;x \leq 3.2 \cdot 10^{+241}:\\
\;\;\;\;a + \left(t + \left(z + \mathsf{fma}\left(i, y, \log c \cdot \left(b - 0.5\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t + \mathsf{fma}\left(\log y, x, \mathsf{fma}\left(b - 0.5, \log c, z\right)\right)\\
\end{array}
\end{array}
if x < -1.80000000000000007e207Initial program 99.8%
Taylor expanded in a around 0
Applied rewrites85.1%
Taylor expanded in y around 0
Applied rewrites62.1%
Taylor expanded in b around 0
Applied rewrites46.6%
if -1.80000000000000007e207 < x < 3.20000000000000004e241Initial program 99.8%
Taylor expanded in x around 0
Applied rewrites83.8%
if 3.20000000000000004e241 < x Initial program 99.8%
Taylor expanded in a around 0
Applied rewrites85.1%
Taylor expanded in y around 0
Applied rewrites62.1%
Applied rewrites62.1%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ t (+ z (fma x (log y) (* (log c) -0.5))))))
(if (<= x -1.8e+207)
t_1
(if (<= x 1.9e+244)
(+ a (+ t (+ z (fma i y (* (log c) (- b 0.5))))))
t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = t + (z + fma(x, log(y), (log(c) * -0.5)));
double tmp;
if (x <= -1.8e+207) {
tmp = t_1;
} else if (x <= 1.9e+244) {
tmp = a + (t + (z + fma(i, y, (log(c) * (b - 0.5)))));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(t + Float64(z + fma(x, log(y), Float64(log(c) * -0.5)))) tmp = 0.0 if (x <= -1.8e+207) tmp = t_1; elseif (x <= 1.9e+244) tmp = Float64(a + Float64(t + Float64(z + fma(i, y, Float64(log(c) * Float64(b - 0.5)))))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.8e+207], t$95$1, If[LessEqual[x, 1.9e+244], N[(a + N[(t + N[(z + N[(i * y + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t + \left(z + \mathsf{fma}\left(x, \log y, \log c \cdot -0.5\right)\right)\\
\mathbf{if}\;x \leq -1.8 \cdot 10^{+207}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 1.9 \cdot 10^{+244}:\\
\;\;\;\;a + \left(t + \left(z + \mathsf{fma}\left(i, y, \log c \cdot \left(b - 0.5\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -1.80000000000000007e207 or 1.89999999999999991e244 < x Initial program 99.8%
Taylor expanded in a around 0
Applied rewrites85.1%
Taylor expanded in y around 0
Applied rewrites62.1%
Taylor expanded in b around 0
Applied rewrites46.6%
if -1.80000000000000007e207 < x < 1.89999999999999991e244Initial program 99.8%
Taylor expanded in x around 0
Applied rewrites83.8%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* x (log y))))
(if (<= x -1.8e+207)
t_1
(if (<= x 1.1e+248)
(+ a (+ t (+ z (fma i y (* (log c) (- b 0.5))))))
t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x * log(y);
double tmp;
if (x <= -1.8e+207) {
tmp = t_1;
} else if (x <= 1.1e+248) {
tmp = a + (t + (z + fma(i, y, (log(c) * (b - 0.5)))));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x * log(y)) tmp = 0.0 if (x <= -1.8e+207) tmp = t_1; elseif (x <= 1.1e+248) tmp = Float64(a + Float64(t + Float64(z + fma(i, y, Float64(log(c) * Float64(b - 0.5)))))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.8e+207], t$95$1, If[LessEqual[x, 1.1e+248], N[(a + N[(t + N[(z + N[(i * y + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y\\
\mathbf{if}\;x \leq -1.8 \cdot 10^{+207}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 1.1 \cdot 10^{+248}:\\
\;\;\;\;a + \left(t + \left(z + \mathsf{fma}\left(i, y, \log c \cdot \left(b - 0.5\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -1.80000000000000007e207 or 1.1e248 < x Initial program 99.8%
Taylor expanded in a around -inf
Applied rewrites73.2%
Applied rewrites73.1%
Taylor expanded in x around inf
Applied rewrites17.1%
if -1.80000000000000007e207 < x < 1.1e248Initial program 99.8%
Taylor expanded in x around 0
Applied rewrites83.8%
(FPCore (x y z t a b c i) :precision binary64 (if (<= a 1.3e+178) (+ t (+ z (fma i y (* (log c) (- b 0.5))))) (* -1.0 (* a (- (* -1.0 (/ z a)) 1.0)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 1.3e+178) {
tmp = t + (z + fma(i, y, (log(c) * (b - 0.5))));
} else {
tmp = -1.0 * (a * ((-1.0 * (z / a)) - 1.0));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 1.3e+178) tmp = Float64(t + Float64(z + fma(i, y, Float64(log(c) * Float64(b - 0.5))))); else tmp = Float64(-1.0 * Float64(a * Float64(Float64(-1.0 * Float64(z / a)) - 1.0))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 1.3e+178], N[(t + N[(z + N[(i * y + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-1.0 * N[(a * N[(N[(-1.0 * N[(z / a), $MachinePrecision]), $MachinePrecision] - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 1.3 \cdot 10^{+178}:\\
\;\;\;\;t + \left(z + \mathsf{fma}\left(i, y, \log c \cdot \left(b - 0.5\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;-1 \cdot \left(a \cdot \left(-1 \cdot \frac{z}{a} - 1\right)\right)\\
\end{array}
\end{array}
if a < 1.3e178Initial program 99.8%
Taylor expanded in a around 0
Applied rewrites85.1%
Taylor expanded in x around 0
Applied rewrites69.4%
if 1.3e178 < a Initial program 99.8%
Taylor expanded in a around -inf
Applied rewrites73.2%
Taylor expanded in z around inf
Applied rewrites25.5%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (fma i y (* (log c) (- b 0.5))))
(t_2
(+
(+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c)))
(* y i))))
(if (<= t_2 200000000.0)
(+ t (+ z t_1))
(if (<= t_2 INFINITY)
(* -1.0 (* a (- (* -1.0 (/ (* b (log c)) a)) 1.0)))
(+ t t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = fma(i, y, (log(c) * (b - 0.5)));
double t_2 = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
double tmp;
if (t_2 <= 200000000.0) {
tmp = t + (z + t_1);
} else if (t_2 <= ((double) INFINITY)) {
tmp = -1.0 * (a * ((-1.0 * ((b * log(c)) / a)) - 1.0));
} else {
tmp = t + t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = fma(i, y, Float64(log(c) * Float64(b - 0.5))) t_2 = Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i)) tmp = 0.0 if (t_2 <= 200000000.0) tmp = Float64(t + Float64(z + t_1)); elseif (t_2 <= Inf) tmp = Float64(-1.0 * Float64(a * Float64(Float64(-1.0 * Float64(Float64(b * log(c)) / a)) - 1.0))); else tmp = Float64(t + t_1); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(i * y + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, 200000000.0], N[(t + N[(z + t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[(-1.0 * N[(a * N[(N[(-1.0 * N[(N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + t$95$1), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(i, y, \log c \cdot \left(b - 0.5\right)\right)\\
t_2 := \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i\\
\mathbf{if}\;t\_2 \leq 200000000:\\
\;\;\;\;t + \left(z + t\_1\right)\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;-1 \cdot \left(a \cdot \left(-1 \cdot \frac{b \cdot \log c}{a} - 1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t + t\_1\\
\end{array}
\end{array}
if (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < 2e8Initial program 99.8%
Taylor expanded in a around 0
Applied rewrites85.1%
Taylor expanded in x around 0
Applied rewrites69.4%
if 2e8 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < +inf.0Initial program 99.8%
Taylor expanded in a around -inf
Applied rewrites73.2%
Taylor expanded in b around inf
Applied rewrites25.8%
if +inf.0 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) Initial program 99.8%
Taylor expanded in a around 0
Applied rewrites85.1%
Taylor expanded in y around 0
Applied rewrites62.1%
Taylor expanded in z around 0
Applied rewrites70.6%
Taylor expanded in x around 0
Applied rewrites55.2%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* t 1.0) (* y i)))
(t_2
(+
(+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c)))
(* y i))))
(if (<= t_2 (- INFINITY))
t_1
(if (<= t_2 200000000.0)
(+ t (+ z (* (log c) (- b 0.5))))
(if (<= t_2 INFINITY) (* -1.0 (* a (- (* -1.0 (/ z a)) 1.0))) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (t * 1.0) + (y * i);
double t_2 = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = t_1;
} else if (t_2 <= 200000000.0) {
tmp = t + (z + (log(c) * (b - 0.5)));
} else if (t_2 <= ((double) INFINITY)) {
tmp = -1.0 * (a * ((-1.0 * (z / a)) - 1.0));
} else {
tmp = t_1;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (t * 1.0) + (y * i);
double t_2 = (((((x * Math.log(y)) + z) + t) + a) + ((b - 0.5) * Math.log(c))) + (y * i);
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = t_1;
} else if (t_2 <= 200000000.0) {
tmp = t + (z + (Math.log(c) * (b - 0.5)));
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = -1.0 * (a * ((-1.0 * (z / a)) - 1.0));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (t * 1.0) + (y * i) t_2 = (((((x * math.log(y)) + z) + t) + a) + ((b - 0.5) * math.log(c))) + (y * i) tmp = 0 if t_2 <= -math.inf: tmp = t_1 elif t_2 <= 200000000.0: tmp = t + (z + (math.log(c) * (b - 0.5))) elif t_2 <= math.inf: tmp = -1.0 * (a * ((-1.0 * (z / a)) - 1.0)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(t * 1.0) + Float64(y * i)) t_2 = Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i)) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = t_1; elseif (t_2 <= 200000000.0) tmp = Float64(t + Float64(z + Float64(log(c) * Float64(b - 0.5)))); elseif (t_2 <= Inf) tmp = Float64(-1.0 * Float64(a * Float64(Float64(-1.0 * Float64(z / a)) - 1.0))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (t * 1.0) + (y * i); t_2 = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i); tmp = 0.0; if (t_2 <= -Inf) tmp = t_1; elseif (t_2 <= 200000000.0) tmp = t + (z + (log(c) * (b - 0.5))); elseif (t_2 <= Inf) tmp = -1.0 * (a * ((-1.0 * (z / a)) - 1.0)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(t * 1.0), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$1, If[LessEqual[t$95$2, 200000000.0], N[(t + N[(z + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[(-1.0 * N[(a * N[(N[(-1.0 * N[(z / a), $MachinePrecision]), $MachinePrecision] - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot 1 + y \cdot i\\
t_2 := \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 200000000:\\
\;\;\;\;t + \left(z + \log c \cdot \left(b - 0.5\right)\right)\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;-1 \cdot \left(a \cdot \left(-1 \cdot \frac{z}{a} - 1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < -inf.0 or +inf.0 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) Initial program 99.8%
Taylor expanded in t around inf
Applied rewrites71.3%
Taylor expanded in b around inf
Applied rewrites32.3%
Taylor expanded in t around inf
Applied rewrites38.5%
if -inf.0 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < 2e8Initial program 99.8%
Taylor expanded in a around 0
Applied rewrites85.1%
Taylor expanded in y around 0
Applied rewrites62.1%
Taylor expanded in x around 0
Applied rewrites46.5%
if 2e8 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < +inf.0Initial program 99.8%
Taylor expanded in a around -inf
Applied rewrites73.2%
Taylor expanded in z around inf
Applied rewrites25.5%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* (log c) (- b 0.5)))
(t_2
(+
(+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c)))
(* y i))))
(if (<= t_2 (- INFINITY))
(+ (* t 1.0) (* y i))
(if (<= t_2 200000000.0)
(+ t (+ z t_1))
(if (<= t_2 INFINITY)
(* -1.0 (* a (- (* -1.0 (/ z a)) 1.0)))
(+ t (fma i y t_1)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = log(c) * (b - 0.5);
double t_2 = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = (t * 1.0) + (y * i);
} else if (t_2 <= 200000000.0) {
tmp = t + (z + t_1);
} else if (t_2 <= ((double) INFINITY)) {
tmp = -1.0 * (a * ((-1.0 * (z / a)) - 1.0));
} else {
tmp = t + fma(i, y, t_1);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(log(c) * Float64(b - 0.5)) t_2 = Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i)) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = Float64(Float64(t * 1.0) + Float64(y * i)); elseif (t_2 <= 200000000.0) tmp = Float64(t + Float64(z + t_1)); elseif (t_2 <= Inf) tmp = Float64(-1.0 * Float64(a * Float64(Float64(-1.0 * Float64(z / a)) - 1.0))); else tmp = Float64(t + fma(i, y, t_1)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(N[(t * 1.0), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 200000000.0], N[(t + N[(z + t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[(-1.0 * N[(a * N[(N[(-1.0 * N[(z / a), $MachinePrecision]), $MachinePrecision] - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(i * y + t$95$1), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log c \cdot \left(b - 0.5\right)\\
t_2 := \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;t \cdot 1 + y \cdot i\\
\mathbf{elif}\;t\_2 \leq 200000000:\\
\;\;\;\;t + \left(z + t\_1\right)\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;-1 \cdot \left(a \cdot \left(-1 \cdot \frac{z}{a} - 1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t + \mathsf{fma}\left(i, y, t\_1\right)\\
\end{array}
\end{array}
if (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < -inf.0Initial program 99.8%
Taylor expanded in t around inf
Applied rewrites71.3%
Taylor expanded in b around inf
Applied rewrites32.3%
Taylor expanded in t around inf
Applied rewrites38.5%
if -inf.0 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < 2e8Initial program 99.8%
Taylor expanded in a around 0
Applied rewrites85.1%
Taylor expanded in y around 0
Applied rewrites62.1%
Taylor expanded in x around 0
Applied rewrites46.5%
if 2e8 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < +inf.0Initial program 99.8%
Taylor expanded in a around -inf
Applied rewrites73.2%
Taylor expanded in z around inf
Applied rewrites25.5%
if +inf.0 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) Initial program 99.8%
Taylor expanded in a around 0
Applied rewrites85.1%
Taylor expanded in y around 0
Applied rewrites62.1%
Taylor expanded in z around 0
Applied rewrites70.6%
Taylor expanded in x around 0
Applied rewrites55.2%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* t 1.0) (* y i)))
(t_2
(+
(+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c)))
(* y i))))
(if (<= t_2 (- INFINITY))
t_1
(if (<= t_2 -40.0)
(* -1.0 (* -1.0 z))
(if (<= t_2 INFINITY) (* -1.0 (* a -1.0)) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (t * 1.0) + (y * i);
double t_2 = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = t_1;
} else if (t_2 <= -40.0) {
tmp = -1.0 * (-1.0 * z);
} else if (t_2 <= ((double) INFINITY)) {
tmp = -1.0 * (a * -1.0);
} else {
tmp = t_1;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (t * 1.0) + (y * i);
double t_2 = (((((x * Math.log(y)) + z) + t) + a) + ((b - 0.5) * Math.log(c))) + (y * i);
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = t_1;
} else if (t_2 <= -40.0) {
tmp = -1.0 * (-1.0 * z);
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = -1.0 * (a * -1.0);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (t * 1.0) + (y * i) t_2 = (((((x * math.log(y)) + z) + t) + a) + ((b - 0.5) * math.log(c))) + (y * i) tmp = 0 if t_2 <= -math.inf: tmp = t_1 elif t_2 <= -40.0: tmp = -1.0 * (-1.0 * z) elif t_2 <= math.inf: tmp = -1.0 * (a * -1.0) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(t * 1.0) + Float64(y * i)) t_2 = Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i)) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = t_1; elseif (t_2 <= -40.0) tmp = Float64(-1.0 * Float64(-1.0 * z)); elseif (t_2 <= Inf) tmp = Float64(-1.0 * Float64(a * -1.0)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (t * 1.0) + (y * i); t_2 = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i); tmp = 0.0; if (t_2 <= -Inf) tmp = t_1; elseif (t_2 <= -40.0) tmp = -1.0 * (-1.0 * z); elseif (t_2 <= Inf) tmp = -1.0 * (a * -1.0); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(t * 1.0), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$1, If[LessEqual[t$95$2, -40.0], N[(-1.0 * N[(-1.0 * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[(-1.0 * N[(a * -1.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot 1 + y \cdot i\\
t_2 := \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq -40:\\
\;\;\;\;-1 \cdot \left(-1 \cdot z\right)\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;-1 \cdot \left(a \cdot -1\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < -inf.0 or +inf.0 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) Initial program 99.8%
Taylor expanded in t around inf
Applied rewrites71.3%
Taylor expanded in b around inf
Applied rewrites32.3%
Taylor expanded in t around inf
Applied rewrites38.5%
if -inf.0 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < -40Initial program 99.8%
Taylor expanded in a around -inf
Applied rewrites73.2%
Taylor expanded in z around inf
Applied rewrites15.8%
if -40 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < +inf.0Initial program 99.8%
Taylor expanded in a around -inf
Applied rewrites73.2%
Taylor expanded in a around inf
Applied rewrites15.7%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* t 1.0) (* y i)))
(t_2
(+
(+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c)))
(* y i))))
(if (<= t_2 (- INFINITY))
t_1
(if (<= t_2 -40.0)
(* -1.0 (* -1.0 z))
(if (<= t_2 INFINITY) (* -1.0 (* a (- (* -1.0 (/ z a)) 1.0))) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (t * 1.0) + (y * i);
double t_2 = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = t_1;
} else if (t_2 <= -40.0) {
tmp = -1.0 * (-1.0 * z);
} else if (t_2 <= ((double) INFINITY)) {
tmp = -1.0 * (a * ((-1.0 * (z / a)) - 1.0));
} else {
tmp = t_1;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (t * 1.0) + (y * i);
double t_2 = (((((x * Math.log(y)) + z) + t) + a) + ((b - 0.5) * Math.log(c))) + (y * i);
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = t_1;
} else if (t_2 <= -40.0) {
tmp = -1.0 * (-1.0 * z);
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = -1.0 * (a * ((-1.0 * (z / a)) - 1.0));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (t * 1.0) + (y * i) t_2 = (((((x * math.log(y)) + z) + t) + a) + ((b - 0.5) * math.log(c))) + (y * i) tmp = 0 if t_2 <= -math.inf: tmp = t_1 elif t_2 <= -40.0: tmp = -1.0 * (-1.0 * z) elif t_2 <= math.inf: tmp = -1.0 * (a * ((-1.0 * (z / a)) - 1.0)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(t * 1.0) + Float64(y * i)) t_2 = Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i)) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = t_1; elseif (t_2 <= -40.0) tmp = Float64(-1.0 * Float64(-1.0 * z)); elseif (t_2 <= Inf) tmp = Float64(-1.0 * Float64(a * Float64(Float64(-1.0 * Float64(z / a)) - 1.0))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (t * 1.0) + (y * i); t_2 = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i); tmp = 0.0; if (t_2 <= -Inf) tmp = t_1; elseif (t_2 <= -40.0) tmp = -1.0 * (-1.0 * z); elseif (t_2 <= Inf) tmp = -1.0 * (a * ((-1.0 * (z / a)) - 1.0)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(t * 1.0), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$1, If[LessEqual[t$95$2, -40.0], N[(-1.0 * N[(-1.0 * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[(-1.0 * N[(a * N[(N[(-1.0 * N[(z / a), $MachinePrecision]), $MachinePrecision] - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot 1 + y \cdot i\\
t_2 := \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq -40:\\
\;\;\;\;-1 \cdot \left(-1 \cdot z\right)\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;-1 \cdot \left(a \cdot \left(-1 \cdot \frac{z}{a} - 1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < -inf.0 or +inf.0 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) Initial program 99.8%
Taylor expanded in t around inf
Applied rewrites71.3%
Taylor expanded in b around inf
Applied rewrites32.3%
Taylor expanded in t around inf
Applied rewrites38.5%
if -inf.0 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < -40Initial program 99.8%
Taylor expanded in a around -inf
Applied rewrites73.2%
Taylor expanded in z around inf
Applied rewrites15.8%
if -40 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < +inf.0Initial program 99.8%
Taylor expanded in a around -inf
Applied rewrites73.2%
Taylor expanded in z around inf
Applied rewrites25.5%
(FPCore (x y z t a b c i)
:precision binary64
(if (<=
(+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))) (* y i))
-40.0)
(* -1.0 (* -1.0 z))
(* -1.0 (* a -1.0))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (((((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i)) <= -40.0) {
tmp = -1.0 * (-1.0 * z);
} else {
tmp = -1.0 * (a * -1.0);
}
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, i)
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), intent (in) :: i
real(8) :: tmp
if (((((((x * log(y)) + z) + t) + a) + ((b - 0.5d0) * log(c))) + (y * i)) <= (-40.0d0)) then
tmp = (-1.0d0) * ((-1.0d0) * z)
else
tmp = (-1.0d0) * (a * (-1.0d0))
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 i) {
double tmp;
if (((((((x * Math.log(y)) + z) + t) + a) + ((b - 0.5) * Math.log(c))) + (y * i)) <= -40.0) {
tmp = -1.0 * (-1.0 * z);
} else {
tmp = -1.0 * (a * -1.0);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if ((((((x * math.log(y)) + z) + t) + a) + ((b - 0.5) * math.log(c))) + (y * i)) <= -40.0: tmp = -1.0 * (-1.0 * z) else: tmp = -1.0 * (a * -1.0) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i)) <= -40.0) tmp = Float64(-1.0 * Float64(-1.0 * z)); else tmp = Float64(-1.0 * Float64(a * -1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (((((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i)) <= -40.0) tmp = -1.0 * (-1.0 * z); else tmp = -1.0 * (a * -1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], -40.0], N[(-1.0 * N[(-1.0 * z), $MachinePrecision]), $MachinePrecision], N[(-1.0 * N[(a * -1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \leq -40:\\
\;\;\;\;-1 \cdot \left(-1 \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;-1 \cdot \left(a \cdot -1\right)\\
\end{array}
\end{array}
if (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < -40Initial program 99.8%
Taylor expanded in a around -inf
Applied rewrites73.2%
Taylor expanded in z around inf
Applied rewrites15.8%
if -40 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) Initial program 99.8%
Taylor expanded in a around -inf
Applied rewrites73.2%
Taylor expanded in a around inf
Applied rewrites15.7%
(FPCore (x y z t a b c i) :precision binary64 (* -1.0 (* -1.0 z)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return -1.0 * (-1.0 * z);
}
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, i)
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), intent (in) :: i
code = (-1.0d0) * ((-1.0d0) * z)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return -1.0 * (-1.0 * z);
}
def code(x, y, z, t, a, b, c, i): return -1.0 * (-1.0 * z)
function code(x, y, z, t, a, b, c, i) return Float64(-1.0 * Float64(-1.0 * z)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = -1.0 * (-1.0 * z); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(-1.0 * N[(-1.0 * z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
-1 \cdot \left(-1 \cdot z\right)
\end{array}
Initial program 99.8%
Taylor expanded in a around -inf
Applied rewrites73.2%
Taylor expanded in z around inf
Applied rewrites15.8%
(FPCore (x y z t a b c i) :precision binary64 (* -1.0 (- t)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return -1.0 * -t;
}
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, i)
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), intent (in) :: i
code = (-1.0d0) * -t
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return -1.0 * -t;
}
def code(x, y, z, t, a, b, c, i): return -1.0 * -t
function code(x, y, z, t, a, b, c, i) return Float64(-1.0 * Float64(-t)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = -1.0 * -t; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(-1.0 * (-t)), $MachinePrecision]
\begin{array}{l}
\\
-1 \cdot \left(-t\right)
\end{array}
Initial program 99.8%
Taylor expanded in a around -inf
Applied rewrites73.2%
Taylor expanded in t around inf
Applied rewrites15.9%
Applied rewrites15.9%
herbie shell --seed 2025153
(FPCore (x y z t a b c i)
:name "Numeric.SpecFunctions:logBeta from math-functions-0.1.5.2, B"
:precision binary64
(+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))) (* y i)))