
(FPCore (x y z) :precision binary64 (- (+ (- x (* (+ y 0.5) (log y))) y) z))
double code(double x, double y, double z) {
return ((x - ((y + 0.5) * log(y))) + y) - 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)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = ((x - ((y + 0.5d0) * log(y))) + y) - z
end function
public static double code(double x, double y, double z) {
return ((x - ((y + 0.5) * Math.log(y))) + y) - z;
}
def code(x, y, z): return ((x - ((y + 0.5) * math.log(y))) + y) - z
function code(x, y, z) return Float64(Float64(Float64(x - Float64(Float64(y + 0.5) * log(y))) + y) - z) end
function tmp = code(x, y, z) tmp = ((x - ((y + 0.5) * log(y))) + y) - z; end
code[x_, y_, z_] := N[(N[(N[(x - N[(N[(y + 0.5), $MachinePrecision] * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision] - z), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z
\end{array}
Herbie found 11 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z) :precision binary64 (- (+ (- x (* (+ y 0.5) (log y))) y) z))
double code(double x, double y, double z) {
return ((x - ((y + 0.5) * log(y))) + y) - 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)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = ((x - ((y + 0.5d0) * log(y))) + y) - z
end function
public static double code(double x, double y, double z) {
return ((x - ((y + 0.5) * Math.log(y))) + y) - z;
}
def code(x, y, z): return ((x - ((y + 0.5) * math.log(y))) + y) - z
function code(x, y, z) return Float64(Float64(Float64(x - Float64(Float64(y + 0.5) * log(y))) + y) - z) end
function tmp = code(x, y, z) tmp = ((x - ((y + 0.5) * log(y))) + y) - z; end
code[x_, y_, z_] := N[(N[(N[(x - N[(N[(y + 0.5), $MachinePrecision] * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision] - z), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z
\end{array}
(FPCore (x y z) :precision binary64 (- (+ (- (fma (+ 0.5 y) (log y) (- x))) y) z))
double code(double x, double y, double z) {
return (-fma((0.5 + y), log(y), -x) + y) - z;
}
function code(x, y, z) return Float64(Float64(Float64(-fma(Float64(0.5 + y), log(y), Float64(-x))) + y) - z) end
code[x_, y_, z_] := N[(N[((-N[(N[(0.5 + y), $MachinePrecision] * N[Log[y], $MachinePrecision] + (-x)), $MachinePrecision]) + y), $MachinePrecision] - z), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(-\mathsf{fma}\left(0.5 + y, \log y, -x\right)\right) + y\right) - z
\end{array}
Initial program 99.8%
Taylor expanded in x around -inf
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
metadata-evalN/A
fp-cancel-sub-sign-invN/A
associate-/l*N/A
metadata-evalN/A
metadata-evalN/A
lower-fma.f64N/A
lift-log.f64N/A
+-commutativeN/A
lower-/.f64N/A
metadata-evalN/A
fp-cancel-sign-sub-invN/A
metadata-evalN/A
metadata-evalN/A
lower--.f6488.1
Applied rewrites88.1%
Taylor expanded in x around 0
mul-1-negN/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift-+.f64N/A
lift-log.f64N/A
lower-neg.f6499.8
Applied rewrites99.8%
(FPCore (x y z) :precision binary64 (- (+ (- x (* (+ y 0.5) (log y))) y) z))
double code(double x, double y, double z) {
return ((x - ((y + 0.5) * log(y))) + y) - 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)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = ((x - ((y + 0.5d0) * log(y))) + y) - z
end function
public static double code(double x, double y, double z) {
return ((x - ((y + 0.5) * Math.log(y))) + y) - z;
}
def code(x, y, z): return ((x - ((y + 0.5) * math.log(y))) + y) - z
function code(x, y, z) return Float64(Float64(Float64(x - Float64(Float64(y + 0.5) * log(y))) + y) - z) end
function tmp = code(x, y, z) tmp = ((x - ((y + 0.5) * log(y))) + y) - z; end
code[x_, y_, z_] := N[(N[(N[(x - N[(N[(y + 0.5), $MachinePrecision] * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision] - z), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z
\end{array}
Initial program 99.8%
(FPCore (x y z) :precision binary64 (if (<= y 0.0074) (- (- x (- (log (sqrt y)) y)) z) (- (- x (- (* (log y) y) y)) z)))
double code(double x, double y, double z) {
double tmp;
if (y <= 0.0074) {
tmp = (x - (log(sqrt(y)) - y)) - z;
} else {
tmp = (x - ((log(y) * y) - y)) - z;
}
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)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (y <= 0.0074d0) then
tmp = (x - (log(sqrt(y)) - y)) - z
else
tmp = (x - ((log(y) * y) - y)) - z
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (y <= 0.0074) {
tmp = (x - (Math.log(Math.sqrt(y)) - y)) - z;
} else {
tmp = (x - ((Math.log(y) * y) - y)) - z;
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= 0.0074: tmp = (x - (math.log(math.sqrt(y)) - y)) - z else: tmp = (x - ((math.log(y) * y) - y)) - z return tmp
function code(x, y, z) tmp = 0.0 if (y <= 0.0074) tmp = Float64(Float64(x - Float64(log(sqrt(y)) - y)) - z); else tmp = Float64(Float64(x - Float64(Float64(log(y) * y) - y)) - z); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (y <= 0.0074) tmp = (x - (log(sqrt(y)) - y)) - z; else tmp = (x - ((log(y) * y) - y)) - z; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, 0.0074], N[(N[(x - N[(N[Log[N[Sqrt[y], $MachinePrecision]], $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision], N[(N[(x - N[(N[(N[Log[y], $MachinePrecision] * y), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 0.0074:\\
\;\;\;\;\left(x - \left(\log \left(\sqrt{y}\right) - y\right)\right) - z\\
\mathbf{else}:\\
\;\;\;\;\left(x - \left(\log y \cdot y - y\right)\right) - z\\
\end{array}
\end{array}
if y < 0.0074000000000000003Initial program 99.8%
Taylor expanded in y around 0
log-pow-revN/A
lower-log.f64N/A
unpow1/2N/A
lower-sqrt.f6469.9
Applied rewrites69.9%
lift-+.f64N/A
lift--.f64N/A
associate-+l-N/A
lower--.f64N/A
lower--.f6469.9
Applied rewrites69.9%
if 0.0074000000000000003 < y Initial program 99.8%
Taylor expanded in y around inf
Applied rewrites87.0%
lift-+.f64N/A
lift--.f64N/A
associate-+l-N/A
lower--.f64N/A
lower--.f6487.0
lift-*.f64N/A
lift-log.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-log.f6487.0
Applied rewrites87.0%
(FPCore (x y z) :precision binary64 (if (<= y 1.45e+34) (- (- x (log (sqrt y))) z) (- (* (- 1.0 (log y)) y) z)))
double code(double x, double y, double z) {
double tmp;
if (y <= 1.45e+34) {
tmp = (x - log(sqrt(y))) - z;
} else {
tmp = ((1.0 - log(y)) * y) - z;
}
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)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (y <= 1.45d+34) then
tmp = (x - log(sqrt(y))) - z
else
tmp = ((1.0d0 - log(y)) * y) - z
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (y <= 1.45e+34) {
tmp = (x - Math.log(Math.sqrt(y))) - z;
} else {
tmp = ((1.0 - Math.log(y)) * y) - z;
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= 1.45e+34: tmp = (x - math.log(math.sqrt(y))) - z else: tmp = ((1.0 - math.log(y)) * y) - z return tmp
function code(x, y, z) tmp = 0.0 if (y <= 1.45e+34) tmp = Float64(Float64(x - log(sqrt(y))) - z); else tmp = Float64(Float64(Float64(1.0 - log(y)) * y) - z); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (y <= 1.45e+34) tmp = (x - log(sqrt(y))) - z; else tmp = ((1.0 - log(y)) * y) - z; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, 1.45e+34], N[(N[(x - N[Log[N[Sqrt[y], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision], N[(N[(N[(1.0 - N[Log[y], $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision] - z), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.45 \cdot 10^{+34}:\\
\;\;\;\;\left(x - \log \left(\sqrt{y}\right)\right) - z\\
\mathbf{else}:\\
\;\;\;\;\left(1 - \log y\right) \cdot y - z\\
\end{array}
\end{array}
if y < 1.4500000000000001e34Initial program 99.8%
Taylor expanded in y around 0
lower--.f64N/A
log-pow-revN/A
lower-log.f64N/A
unpow1/2N/A
lower-sqrt.f6470.9
Applied rewrites70.9%
if 1.4500000000000001e34 < y Initial program 99.8%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
mul-1-negN/A
lower-neg.f64N/A
log-recN/A
lower-neg.f64N/A
lift-log.f6457.8
Applied rewrites57.8%
lift-neg.f64N/A
lift-log.f64N/A
lift-neg.f64N/A
remove-double-negN/A
lift-log.f6457.8
Applied rewrites57.8%
(FPCore (x y z) :precision binary64 (if (<= y 1.45e+34) (- (- x (log (sqrt y))) z) (- y (fma (log y) y z))))
double code(double x, double y, double z) {
double tmp;
if (y <= 1.45e+34) {
tmp = (x - log(sqrt(y))) - z;
} else {
tmp = y - fma(log(y), y, z);
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (y <= 1.45e+34) tmp = Float64(Float64(x - log(sqrt(y))) - z); else tmp = Float64(y - fma(log(y), y, z)); end return tmp end
code[x_, y_, z_] := If[LessEqual[y, 1.45e+34], N[(N[(x - N[Log[N[Sqrt[y], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision], N[(y - N[(N[Log[y], $MachinePrecision] * y + z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.45 \cdot 10^{+34}:\\
\;\;\;\;\left(x - \log \left(\sqrt{y}\right)\right) - z\\
\mathbf{else}:\\
\;\;\;\;y - \mathsf{fma}\left(\log y, y, z\right)\\
\end{array}
\end{array}
if y < 1.4500000000000001e34Initial program 99.8%
Taylor expanded in y around 0
lower--.f64N/A
log-pow-revN/A
lower-log.f64N/A
unpow1/2N/A
lower-sqrt.f6470.9
Applied rewrites70.9%
if 1.4500000000000001e34 < y Initial program 99.8%
Taylor expanded in x around 0
lower--.f64N/A
+-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
lift-log.f64N/A
metadata-evalN/A
fp-cancel-sign-sub-invN/A
metadata-evalN/A
metadata-evalN/A
lower--.f6470.1
Applied rewrites70.1%
Taylor expanded in y around inf
Applied rewrites57.8%
(FPCore (x y z) :precision binary64 (if (<= y 4.4e+148) (- (- x (log (sqrt y))) z) (* (- 1.0 (log y)) y)))
double code(double x, double y, double z) {
double tmp;
if (y <= 4.4e+148) {
tmp = (x - log(sqrt(y))) - z;
} else {
tmp = (1.0 - log(y)) * y;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (y <= 4.4d+148) then
tmp = (x - log(sqrt(y))) - z
else
tmp = (1.0d0 - log(y)) * y
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (y <= 4.4e+148) {
tmp = (x - Math.log(Math.sqrt(y))) - z;
} else {
tmp = (1.0 - Math.log(y)) * y;
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= 4.4e+148: tmp = (x - math.log(math.sqrt(y))) - z else: tmp = (1.0 - math.log(y)) * y return tmp
function code(x, y, z) tmp = 0.0 if (y <= 4.4e+148) tmp = Float64(Float64(x - log(sqrt(y))) - z); else tmp = Float64(Float64(1.0 - log(y)) * y); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (y <= 4.4e+148) tmp = (x - log(sqrt(y))) - z; else tmp = (1.0 - log(y)) * y; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, 4.4e+148], N[(N[(x - N[Log[N[Sqrt[y], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision], N[(N[(1.0 - N[Log[y], $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 4.4 \cdot 10^{+148}:\\
\;\;\;\;\left(x - \log \left(\sqrt{y}\right)\right) - z\\
\mathbf{else}:\\
\;\;\;\;\left(1 - \log y\right) \cdot y\\
\end{array}
\end{array}
if y < 4.3999999999999998e148Initial program 99.8%
Taylor expanded in y around 0
lower--.f64N/A
log-pow-revN/A
lower-log.f64N/A
unpow1/2N/A
lower-sqrt.f6470.9
Applied rewrites70.9%
if 4.3999999999999998e148 < y Initial program 99.8%
Taylor expanded in y around inf
Applied rewrites87.0%
Taylor expanded in y around inf
neg-logN/A
mul-1-negN/A
*-commutativeN/A
lower-*.f64N/A
remove-double-negN/A
lower--.f64N/A
lift-log.f6430.4
Applied rewrites30.4%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (+ (- x (* (+ y 0.5) (log y))) y)))
(if (<= t_0 -5e+174)
(* (- 1.0 (log y)) y)
(if (<= t_0 -5e+44)
(- x z)
(if (<= t_0 340.0) (- (- (log (sqrt y))) z) (- x z))))))
double code(double x, double y, double z) {
double t_0 = (x - ((y + 0.5) * log(y))) + y;
double tmp;
if (t_0 <= -5e+174) {
tmp = (1.0 - log(y)) * y;
} else if (t_0 <= -5e+44) {
tmp = x - z;
} else if (t_0 <= 340.0) {
tmp = -log(sqrt(y)) - z;
} else {
tmp = x - z;
}
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)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = (x - ((y + 0.5d0) * log(y))) + y
if (t_0 <= (-5d+174)) then
tmp = (1.0d0 - log(y)) * y
else if (t_0 <= (-5d+44)) then
tmp = x - z
else if (t_0 <= 340.0d0) then
tmp = -log(sqrt(y)) - z
else
tmp = x - z
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = (x - ((y + 0.5) * Math.log(y))) + y;
double tmp;
if (t_0 <= -5e+174) {
tmp = (1.0 - Math.log(y)) * y;
} else if (t_0 <= -5e+44) {
tmp = x - z;
} else if (t_0 <= 340.0) {
tmp = -Math.log(Math.sqrt(y)) - z;
} else {
tmp = x - z;
}
return tmp;
}
def code(x, y, z): t_0 = (x - ((y + 0.5) * math.log(y))) + y tmp = 0 if t_0 <= -5e+174: tmp = (1.0 - math.log(y)) * y elif t_0 <= -5e+44: tmp = x - z elif t_0 <= 340.0: tmp = -math.log(math.sqrt(y)) - z else: tmp = x - z return tmp
function code(x, y, z) t_0 = Float64(Float64(x - Float64(Float64(y + 0.5) * log(y))) + y) tmp = 0.0 if (t_0 <= -5e+174) tmp = Float64(Float64(1.0 - log(y)) * y); elseif (t_0 <= -5e+44) tmp = Float64(x - z); elseif (t_0 <= 340.0) tmp = Float64(Float64(-log(sqrt(y))) - z); else tmp = Float64(x - z); end return tmp end
function tmp_2 = code(x, y, z) t_0 = (x - ((y + 0.5) * log(y))) + y; tmp = 0.0; if (t_0 <= -5e+174) tmp = (1.0 - log(y)) * y; elseif (t_0 <= -5e+44) tmp = x - z; elseif (t_0 <= 340.0) tmp = -log(sqrt(y)) - z; else tmp = x - z; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(x - N[(N[(y + 0.5), $MachinePrecision] * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision]}, If[LessEqual[t$95$0, -5e+174], N[(N[(1.0 - N[Log[y], $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[t$95$0, -5e+44], N[(x - z), $MachinePrecision], If[LessEqual[t$95$0, 340.0], N[((-N[Log[N[Sqrt[y], $MachinePrecision]], $MachinePrecision]) - z), $MachinePrecision], N[(x - z), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(x - \left(y + 0.5\right) \cdot \log y\right) + y\\
\mathbf{if}\;t\_0 \leq -5 \cdot 10^{+174}:\\
\;\;\;\;\left(1 - \log y\right) \cdot y\\
\mathbf{elif}\;t\_0 \leq -5 \cdot 10^{+44}:\\
\;\;\;\;x - z\\
\mathbf{elif}\;t\_0 \leq 340:\\
\;\;\;\;\left(-\log \left(\sqrt{y}\right)\right) - z\\
\mathbf{else}:\\
\;\;\;\;x - z\\
\end{array}
\end{array}
if (+.f64 (-.f64 x (*.f64 (+.f64 y #s(literal 1/2 binary64)) (log.f64 y))) y) < -4.9999999999999997e174Initial program 99.8%
Taylor expanded in y around inf
Applied rewrites87.0%
Taylor expanded in y around inf
neg-logN/A
mul-1-negN/A
*-commutativeN/A
lower-*.f64N/A
remove-double-negN/A
lower--.f64N/A
lift-log.f6430.4
Applied rewrites30.4%
if -4.9999999999999997e174 < (+.f64 (-.f64 x (*.f64 (+.f64 y #s(literal 1/2 binary64)) (log.f64 y))) y) < -4.9999999999999996e44 or 340 < (+.f64 (-.f64 x (*.f64 (+.f64 y #s(literal 1/2 binary64)) (log.f64 y))) y) Initial program 99.8%
Taylor expanded in x around inf
Applied rewrites58.1%
if -4.9999999999999996e44 < (+.f64 (-.f64 x (*.f64 (+.f64 y #s(literal 1/2 binary64)) (log.f64 y))) y) < 340Initial program 99.8%
Taylor expanded in y around 0
lower--.f64N/A
log-pow-revN/A
lower-log.f64N/A
unpow1/2N/A
lower-sqrt.f6470.9
Applied rewrites70.9%
Taylor expanded in x around 0
mul-1-negN/A
pow1/2N/A
log-pow-revN/A
lower-neg.f64N/A
log-pow-revN/A
pow1/2N/A
lift-sqrt.f64N/A
lift-log.f6442.0
Applied rewrites42.0%
(FPCore (x y z) :precision binary64 (if (<= x -205.0) (- x z) (if (<= x 1150000.0) (- (- (log (sqrt y))) z) (- x z))))
double code(double x, double y, double z) {
double tmp;
if (x <= -205.0) {
tmp = x - z;
} else if (x <= 1150000.0) {
tmp = -log(sqrt(y)) - z;
} else {
tmp = x - z;
}
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)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-205.0d0)) then
tmp = x - z
else if (x <= 1150000.0d0) then
tmp = -log(sqrt(y)) - z
else
tmp = x - z
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -205.0) {
tmp = x - z;
} else if (x <= 1150000.0) {
tmp = -Math.log(Math.sqrt(y)) - z;
} else {
tmp = x - z;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -205.0: tmp = x - z elif x <= 1150000.0: tmp = -math.log(math.sqrt(y)) - z else: tmp = x - z return tmp
function code(x, y, z) tmp = 0.0 if (x <= -205.0) tmp = Float64(x - z); elseif (x <= 1150000.0) tmp = Float64(Float64(-log(sqrt(y))) - z); else tmp = Float64(x - z); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -205.0) tmp = x - z; elseif (x <= 1150000.0) tmp = -log(sqrt(y)) - z; else tmp = x - z; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -205.0], N[(x - z), $MachinePrecision], If[LessEqual[x, 1150000.0], N[((-N[Log[N[Sqrt[y], $MachinePrecision]], $MachinePrecision]) - z), $MachinePrecision], N[(x - z), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -205:\\
\;\;\;\;x - z\\
\mathbf{elif}\;x \leq 1150000:\\
\;\;\;\;\left(-\log \left(\sqrt{y}\right)\right) - z\\
\mathbf{else}:\\
\;\;\;\;x - z\\
\end{array}
\end{array}
if x < -205 or 1.15e6 < x Initial program 99.8%
Taylor expanded in x around inf
Applied rewrites58.1%
if -205 < x < 1.15e6Initial program 99.8%
Taylor expanded in y around 0
lower--.f64N/A
log-pow-revN/A
lower-log.f64N/A
unpow1/2N/A
lower-sqrt.f6470.9
Applied rewrites70.9%
Taylor expanded in x around 0
mul-1-negN/A
pow1/2N/A
log-pow-revN/A
lower-neg.f64N/A
log-pow-revN/A
pow1/2N/A
lift-sqrt.f64N/A
lift-log.f6442.0
Applied rewrites42.0%
(FPCore (x y z) :precision binary64 (- x z))
double code(double x, double y, double z) {
return x - 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)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x - z
end function
public static double code(double x, double y, double z) {
return x - z;
}
def code(x, y, z): return x - z
function code(x, y, z) return Float64(x - z) end
function tmp = code(x, y, z) tmp = x - z; end
code[x_, y_, z_] := N[(x - z), $MachinePrecision]
\begin{array}{l}
\\
x - z
\end{array}
Initial program 99.8%
Taylor expanded in x around inf
Applied rewrites58.1%
(FPCore (x y z) :precision binary64 (if (<= x -1e+120) x (if (<= x 8.8e+15) (- z) x)))
double code(double x, double y, double z) {
double tmp;
if (x <= -1e+120) {
tmp = x;
} else if (x <= 8.8e+15) {
tmp = -z;
} else {
tmp = x;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-1d+120)) then
tmp = x
else if (x <= 8.8d+15) then
tmp = -z
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -1e+120) {
tmp = x;
} else if (x <= 8.8e+15) {
tmp = -z;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -1e+120: tmp = x elif x <= 8.8e+15: tmp = -z else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if (x <= -1e+120) tmp = x; elseif (x <= 8.8e+15) tmp = Float64(-z); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -1e+120) tmp = x; elseif (x <= 8.8e+15) tmp = -z; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -1e+120], x, If[LessEqual[x, 8.8e+15], (-z), x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1 \cdot 10^{+120}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 8.8 \cdot 10^{+15}:\\
\;\;\;\;-z\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -9.9999999999999998e119 or 8.8e15 < x Initial program 99.8%
Taylor expanded in x around inf
Applied rewrites30.7%
if -9.9999999999999998e119 < x < 8.8e15Initial program 99.8%
Taylor expanded in z around inf
mul-1-negN/A
lower-neg.f6429.4
Applied rewrites29.4%
(FPCore (x y z) :precision binary64 x)
double code(double x, double y, double z) {
return x;
}
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)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x
end function
public static double code(double x, double y, double z) {
return x;
}
def code(x, y, z): return x
function code(x, y, z) return x end
function tmp = code(x, y, z) tmp = x; end
code[x_, y_, z_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 99.8%
Taylor expanded in x around inf
Applied rewrites30.7%
herbie shell --seed 2025123
(FPCore (x y z)
:name "Numeric.SpecFunctions:stirlingError from math-functions-0.1.5.2"
:precision binary64
(- (+ (- x (* (+ y 0.5) (log y))) y) z))