
(FPCore (x y z t) :precision binary64 (- (+ (* (- x 1.0) (log y)) (* (- z 1.0) (log (- 1.0 y)))) t))
double code(double x, double y, double z, double t) {
return (((x - 1.0) * log(y)) + ((z - 1.0) * log((1.0 - y)))) - 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)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (((x - 1.0d0) * log(y)) + ((z - 1.0d0) * log((1.0d0 - y)))) - t
end function
public static double code(double x, double y, double z, double t) {
return (((x - 1.0) * Math.log(y)) + ((z - 1.0) * Math.log((1.0 - y)))) - t;
}
def code(x, y, z, t): return (((x - 1.0) * math.log(y)) + ((z - 1.0) * math.log((1.0 - y)))) - t
function code(x, y, z, t) return Float64(Float64(Float64(Float64(x - 1.0) * log(y)) + Float64(Float64(z - 1.0) * log(Float64(1.0 - y)))) - t) end
function tmp = code(x, y, z, t) tmp = (((x - 1.0) * log(y)) + ((z - 1.0) * log((1.0 - y)))) - t; end
code[x_, y_, z_, t_] := N[(N[(N[(N[(x - 1.0), $MachinePrecision] * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(N[(z - 1.0), $MachinePrecision] * N[Log[N[(1.0 - y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (- (+ (* (- x 1.0) (log y)) (* (- z 1.0) (log (- 1.0 y)))) t))
double code(double x, double y, double z, double t) {
return (((x - 1.0) * log(y)) + ((z - 1.0) * log((1.0 - y)))) - 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)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (((x - 1.0d0) * log(y)) + ((z - 1.0d0) * log((1.0d0 - y)))) - t
end function
public static double code(double x, double y, double z, double t) {
return (((x - 1.0) * Math.log(y)) + ((z - 1.0) * Math.log((1.0 - y)))) - t;
}
def code(x, y, z, t): return (((x - 1.0) * math.log(y)) + ((z - 1.0) * math.log((1.0 - y)))) - t
function code(x, y, z, t) return Float64(Float64(Float64(Float64(x - 1.0) * log(y)) + Float64(Float64(z - 1.0) * log(Float64(1.0 - y)))) - t) end
function tmp = code(x, y, z, t) tmp = (((x - 1.0) * log(y)) + ((z - 1.0) * log((1.0 - y)))) - t; end
code[x_, y_, z_, t_] := N[(N[(N[(N[(x - 1.0), $MachinePrecision] * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(N[(z - 1.0), $MachinePrecision] * N[Log[N[(1.0 - y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t
\end{array}
(FPCore (x y z t) :precision binary64 (fma (- z 1.0) (log1p (- y)) (- (* (log y) (- x 1.0)) t)))
double code(double x, double y, double z, double t) {
return fma((z - 1.0), log1p(-y), ((log(y) * (x - 1.0)) - t));
}
function code(x, y, z, t) return fma(Float64(z - 1.0), log1p(Float64(-y)), Float64(Float64(log(y) * Float64(x - 1.0)) - t)) end
code[x_, y_, z_, t_] := N[(N[(z - 1.0), $MachinePrecision] * N[Log[1 + (-y)], $MachinePrecision] + N[(N[(N[Log[y], $MachinePrecision] * N[(x - 1.0), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(z - 1, \mathsf{log1p}\left(-y\right), \log y \cdot \left(x - 1\right) - t\right)
\end{array}
Initial program 91.7%
lift--.f64N/A
lift-+.f64N/A
+-commutativeN/A
associate--l+N/A
lift-*.f64N/A
lower-fma.f64N/A
lift-log.f64N/A
unpow1N/A
unpow1N/A
lift--.f64N/A
*-lft-identityN/A
fp-cancel-sub-sign-invN/A
distribute-lft-neg-inN/A
*-lft-identityN/A
lower-log1p.f64N/A
lower-neg.f64N/A
lower--.f6499.9
lift-*.f64N/A
*-commutativeN/A
lower-*.f6499.9
Applied rewrites99.9%
(FPCore (x y z t) :precision binary64 (- (fma (+ -1.0 x) (log y) (* (fma (* (- z 1.0) (fma -0.3333333333333333 y -0.5)) y (- (- z 1.0))) y)) t))
double code(double x, double y, double z, double t) {
return fma((-1.0 + x), log(y), (fma(((z - 1.0) * fma(-0.3333333333333333, y, -0.5)), y, -(z - 1.0)) * y)) - t;
}
function code(x, y, z, t) return Float64(fma(Float64(-1.0 + x), log(y), Float64(fma(Float64(Float64(z - 1.0) * fma(-0.3333333333333333, y, -0.5)), y, Float64(-Float64(z - 1.0))) * y)) - t) end
code[x_, y_, z_, t_] := N[(N[(N[(-1.0 + x), $MachinePrecision] * N[Log[y], $MachinePrecision] + N[(N[(N[(N[(z - 1.0), $MachinePrecision] * N[(-0.3333333333333333 * y + -0.5), $MachinePrecision]), $MachinePrecision] * y + (-N[(z - 1.0), $MachinePrecision])), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(-1 + x, \log y, \mathsf{fma}\left(\left(z - 1\right) \cdot \mathsf{fma}\left(-0.3333333333333333, y, -0.5\right), y, -\left(z - 1\right)\right) \cdot y\right) - t
\end{array}
Initial program 91.7%
Taylor expanded in y around 0
+-commutativeN/A
Applied rewrites99.6%
(FPCore (x y z t) :precision binary64 (- (fma (+ -1.0 x) (log y) (* (* (- z 1.0) y) (fma -0.5 y -1.0))) t))
double code(double x, double y, double z, double t) {
return fma((-1.0 + x), log(y), (((z - 1.0) * y) * fma(-0.5, y, -1.0))) - t;
}
function code(x, y, z, t) return Float64(fma(Float64(-1.0 + x), log(y), Float64(Float64(Float64(z - 1.0) * y) * fma(-0.5, y, -1.0))) - t) end
code[x_, y_, z_, t_] := N[(N[(N[(-1.0 + x), $MachinePrecision] * N[Log[y], $MachinePrecision] + N[(N[(N[(z - 1.0), $MachinePrecision] * y), $MachinePrecision] * N[(-0.5 * y + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(-1 + x, \log y, \left(\left(z - 1\right) \cdot y\right) \cdot \mathsf{fma}\left(-0.5, y, -1\right)\right) - t
\end{array}
Initial program 91.7%
Taylor expanded in y around 0
+-commutativeN/A
remove-double-negN/A
distribute-lft-neg-outN/A
log-recN/A
mul-1-negN/A
Applied rewrites99.4%
(FPCore (x y z t) :precision binary64 (if (or (<= x -6.4e-16) (not (<= x 1.85))) (fma (+ -1.0 x) (log y) (- t)) (- (- (fma (- z 1.0) y (log y))) t)))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -6.4e-16) || !(x <= 1.85)) {
tmp = fma((-1.0 + x), log(y), -t);
} else {
tmp = -fma((z - 1.0), y, log(y)) - t;
}
return tmp;
}
function code(x, y, z, t) tmp = 0.0 if ((x <= -6.4e-16) || !(x <= 1.85)) tmp = fma(Float64(-1.0 + x), log(y), Float64(-t)); else tmp = Float64(Float64(-fma(Float64(z - 1.0), y, log(y))) - t); end return tmp end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -6.4e-16], N[Not[LessEqual[x, 1.85]], $MachinePrecision]], N[(N[(-1.0 + x), $MachinePrecision] * N[Log[y], $MachinePrecision] + (-t)), $MachinePrecision], N[((-N[(N[(z - 1.0), $MachinePrecision] * y + N[Log[y], $MachinePrecision]), $MachinePrecision]) - t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.4 \cdot 10^{-16} \lor \neg \left(x \leq 1.85\right):\\
\;\;\;\;\mathsf{fma}\left(-1 + x, \log y, -t\right)\\
\mathbf{else}:\\
\;\;\;\;\left(-\mathsf{fma}\left(z - 1, y, \log y\right)\right) - t\\
\end{array}
\end{array}
if x < -6.40000000000000046e-16 or 1.8500000000000001 < x Initial program 97.6%
Taylor expanded in y around 0
remove-double-negN/A
distribute-lft-neg-outN/A
log-recN/A
mul-1-negN/A
mul-1-negN/A
log-recN/A
distribute-lft-neg-outN/A
remove-double-negN/A
*-rgt-identityN/A
fp-cancel-sub-sign-invN/A
Applied rewrites96.3%
if -6.40000000000000046e-16 < x < 1.8500000000000001Initial program 86.3%
Taylor expanded in y around 0
+-commutativeN/A
remove-double-negN/A
log-recN/A
mul-1-negN/A
Applied rewrites99.3%
Taylor expanded in x around 0
Applied rewrites99.2%
Final simplification97.8%
(FPCore (x y z t) :precision binary64 (if (or (<= (- x 1.0) -2e+118) (not (<= (- x 1.0) 1e+50))) (* (log y) x) (- (* (fma (- (* -0.3333333333333333 y) 0.5) y -1.0) (* y z)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (((x - 1.0) <= -2e+118) || !((x - 1.0) <= 1e+50)) {
tmp = log(y) * x;
} else {
tmp = (fma(((-0.3333333333333333 * y) - 0.5), y, -1.0) * (y * z)) - t;
}
return tmp;
}
function code(x, y, z, t) tmp = 0.0 if ((Float64(x - 1.0) <= -2e+118) || !(Float64(x - 1.0) <= 1e+50)) tmp = Float64(log(y) * x); else tmp = Float64(Float64(fma(Float64(Float64(-0.3333333333333333 * y) - 0.5), y, -1.0) * Float64(y * z)) - t); end return tmp end
code[x_, y_, z_, t_] := If[Or[LessEqual[N[(x - 1.0), $MachinePrecision], -2e+118], N[Not[LessEqual[N[(x - 1.0), $MachinePrecision], 1e+50]], $MachinePrecision]], N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision], N[(N[(N[(N[(N[(-0.3333333333333333 * y), $MachinePrecision] - 0.5), $MachinePrecision] * y + -1.0), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x - 1 \leq -2 \cdot 10^{+118} \lor \neg \left(x - 1 \leq 10^{+50}\right):\\
\;\;\;\;\log y \cdot x\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-0.3333333333333333 \cdot y - 0.5, y, -1\right) \cdot \left(y \cdot z\right) - t\\
\end{array}
\end{array}
if (-.f64 x #s(literal 1 binary64)) < -1.99999999999999993e118 or 1.0000000000000001e50 < (-.f64 x #s(literal 1 binary64)) Initial program 98.2%
lift--.f64N/A
lift-+.f64N/A
+-commutativeN/A
associate--l+N/A
lift-*.f64N/A
lower-fma.f64N/A
lift-log.f64N/A
unpow1N/A
unpow1N/A
lift--.f64N/A
*-lft-identityN/A
fp-cancel-sub-sign-invN/A
distribute-lft-neg-inN/A
*-lft-identityN/A
lower-log1p.f64N/A
lower-neg.f64N/A
lower--.f6499.7
lift-*.f64N/A
*-commutativeN/A
lower-*.f6499.7
Applied rewrites99.7%
Taylor expanded in x around inf
*-commutativeN/A
remove-double-negN/A
mul-1-negN/A
distribute-rgt-neg-inN/A
log-recN/A
lower-*.f64N/A
log-recN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
remove-double-negN/A
lower-log.f6484.9
Applied rewrites84.9%
if -1.99999999999999993e118 < (-.f64 x #s(literal 1 binary64)) < 1.0000000000000001e50Initial program 88.1%
Taylor expanded in y around 0
+-commutativeN/A
Applied rewrites99.6%
Taylor expanded in z around -inf
Applied rewrites63.4%
Final simplification71.0%
(FPCore (x y z t) :precision binary64 (if (or (<= x -1.0) (not (<= x 0.0036))) (- (* (log y) x) t) (- (- y (log y)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -1.0) || !(x <= 0.0036)) {
tmp = (log(y) * x) - t;
} else {
tmp = (y - log(y)) - t;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t)
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) :: tmp
if ((x <= (-1.0d0)) .or. (.not. (x <= 0.0036d0))) then
tmp = (log(y) * x) - t
else
tmp = (y - log(y)) - t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -1.0) || !(x <= 0.0036)) {
tmp = (Math.log(y) * x) - t;
} else {
tmp = (y - Math.log(y)) - t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -1.0) or not (x <= 0.0036): tmp = (math.log(y) * x) - t else: tmp = (y - math.log(y)) - t return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -1.0) || !(x <= 0.0036)) tmp = Float64(Float64(log(y) * x) - t); else tmp = Float64(Float64(y - log(y)) - t); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((x <= -1.0) || ~((x <= 0.0036))) tmp = (log(y) * x) - t; else tmp = (y - log(y)) - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -1.0], N[Not[LessEqual[x, 0.0036]], $MachinePrecision]], N[(N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision] - t), $MachinePrecision], N[(N[(y - N[Log[y], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1 \lor \neg \left(x \leq 0.0036\right):\\
\;\;\;\;\log y \cdot x - t\\
\mathbf{else}:\\
\;\;\;\;\left(y - \log y\right) - t\\
\end{array}
\end{array}
if x < -1 or 0.0035999999999999999 < x Initial program 96.0%
Taylor expanded in x around inf
*-commutativeN/A
remove-double-negN/A
log-recN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
log-recN/A
remove-double-negN/A
lower-log.f6493.9
Applied rewrites93.9%
if -1 < x < 0.0035999999999999999Initial program 87.8%
Taylor expanded in y around 0
+-commutativeN/A
remove-double-negN/A
log-recN/A
mul-1-negN/A
Applied rewrites99.3%
Taylor expanded in z around 0
Applied rewrites86.8%
Taylor expanded in x around 0
Applied rewrites86.6%
Final simplification90.1%
(FPCore (x y z t) :precision binary64 (- (fma (+ -1.0 x) (log y) (* (- 1.0 z) y)) t))
double code(double x, double y, double z, double t) {
return fma((-1.0 + x), log(y), ((1.0 - z) * y)) - t;
}
function code(x, y, z, t) return Float64(fma(Float64(-1.0 + x), log(y), Float64(Float64(1.0 - z) * y)) - t) end
code[x_, y_, z_, t_] := N[(N[(N[(-1.0 + x), $MachinePrecision] * N[Log[y], $MachinePrecision] + N[(N[(1.0 - z), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(-1 + x, \log y, \left(1 - z\right) \cdot y\right) - t
\end{array}
Initial program 91.7%
Taylor expanded in y around 0
+-commutativeN/A
Applied rewrites99.6%
Taylor expanded in y around 0
Applied rewrites99.0%
(FPCore (x y z t) :precision binary64 (if (or (<= x -1.8e+78) (not (<= x 1.55e+50))) (* (log y) x) (- (- y (log y)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -1.8e+78) || !(x <= 1.55e+50)) {
tmp = log(y) * x;
} else {
tmp = (y - log(y)) - t;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t)
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) :: tmp
if ((x <= (-1.8d+78)) .or. (.not. (x <= 1.55d+50))) then
tmp = log(y) * x
else
tmp = (y - log(y)) - t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -1.8e+78) || !(x <= 1.55e+50)) {
tmp = Math.log(y) * x;
} else {
tmp = (y - Math.log(y)) - t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -1.8e+78) or not (x <= 1.55e+50): tmp = math.log(y) * x else: tmp = (y - math.log(y)) - t return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -1.8e+78) || !(x <= 1.55e+50)) tmp = Float64(log(y) * x); else tmp = Float64(Float64(y - log(y)) - t); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((x <= -1.8e+78) || ~((x <= 1.55e+50))) tmp = log(y) * x; else tmp = (y - log(y)) - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -1.8e+78], N[Not[LessEqual[x, 1.55e+50]], $MachinePrecision]], N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision], N[(N[(y - N[Log[y], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.8 \cdot 10^{+78} \lor \neg \left(x \leq 1.55 \cdot 10^{+50}\right):\\
\;\;\;\;\log y \cdot x\\
\mathbf{else}:\\
\;\;\;\;\left(y - \log y\right) - t\\
\end{array}
\end{array}
if x < -1.8000000000000001e78 or 1.55000000000000001e50 < x Initial program 97.2%
lift--.f64N/A
lift-+.f64N/A
+-commutativeN/A
associate--l+N/A
lift-*.f64N/A
lower-fma.f64N/A
lift-log.f64N/A
unpow1N/A
unpow1N/A
lift--.f64N/A
*-lft-identityN/A
fp-cancel-sub-sign-invN/A
distribute-lft-neg-inN/A
*-lft-identityN/A
lower-log1p.f64N/A
lower-neg.f64N/A
lower--.f6499.7
lift-*.f64N/A
*-commutativeN/A
lower-*.f6499.7
Applied rewrites99.7%
Taylor expanded in x around inf
*-commutativeN/A
remove-double-negN/A
mul-1-negN/A
distribute-rgt-neg-inN/A
log-recN/A
lower-*.f64N/A
log-recN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
remove-double-negN/A
lower-log.f6483.5
Applied rewrites83.5%
if -1.8000000000000001e78 < x < 1.55000000000000001e50Initial program 88.4%
Taylor expanded in y around 0
+-commutativeN/A
remove-double-negN/A
log-recN/A
mul-1-negN/A
Applied rewrites98.6%
Taylor expanded in z around 0
Applied rewrites86.5%
Taylor expanded in x around 0
Applied rewrites83.4%
Final simplification83.4%
(FPCore (x y z t) :precision binary64 (if (<= z 8.5e+179) (- (fma (log y) (- x 1.0) y) t) (- (* (fma (- (* -0.3333333333333333 y) 0.5) y -1.0) (* y z)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= 8.5e+179) {
tmp = fma(log(y), (x - 1.0), y) - t;
} else {
tmp = (fma(((-0.3333333333333333 * y) - 0.5), y, -1.0) * (y * z)) - t;
}
return tmp;
}
function code(x, y, z, t) tmp = 0.0 if (z <= 8.5e+179) tmp = Float64(fma(log(y), Float64(x - 1.0), y) - t); else tmp = Float64(Float64(fma(Float64(Float64(-0.3333333333333333 * y) - 0.5), y, -1.0) * Float64(y * z)) - t); end return tmp end
code[x_, y_, z_, t_] := If[LessEqual[z, 8.5e+179], N[(N[(N[Log[y], $MachinePrecision] * N[(x - 1.0), $MachinePrecision] + y), $MachinePrecision] - t), $MachinePrecision], N[(N[(N[(N[(N[(-0.3333333333333333 * y), $MachinePrecision] - 0.5), $MachinePrecision] * y + -1.0), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq 8.5 \cdot 10^{+179}:\\
\;\;\;\;\mathsf{fma}\left(\log y, x - 1, y\right) - t\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-0.3333333333333333 \cdot y - 0.5, y, -1\right) \cdot \left(y \cdot z\right) - t\\
\end{array}
\end{array}
if z < 8.49999999999999962e179Initial program 95.9%
Taylor expanded in y around 0
+-commutativeN/A
remove-double-negN/A
log-recN/A
mul-1-negN/A
Applied rewrites99.7%
Taylor expanded in z around 0
Applied rewrites95.6%
if 8.49999999999999962e179 < z Initial program 48.5%
Taylor expanded in y around 0
+-commutativeN/A
Applied rewrites97.0%
Taylor expanded in z around -inf
Applied rewrites71.4%
(FPCore (x y z t) :precision binary64 (if (or (<= x -1.8e+78) (not (<= x 1.55e+50))) (* (log y) x) (- (+ (log y) t))))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -1.8e+78) || !(x <= 1.55e+50)) {
tmp = log(y) * x;
} else {
tmp = -(log(y) + t);
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t)
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) :: tmp
if ((x <= (-1.8d+78)) .or. (.not. (x <= 1.55d+50))) then
tmp = log(y) * x
else
tmp = -(log(y) + t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -1.8e+78) || !(x <= 1.55e+50)) {
tmp = Math.log(y) * x;
} else {
tmp = -(Math.log(y) + t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -1.8e+78) or not (x <= 1.55e+50): tmp = math.log(y) * x else: tmp = -(math.log(y) + t) return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -1.8e+78) || !(x <= 1.55e+50)) tmp = Float64(log(y) * x); else tmp = Float64(-Float64(log(y) + t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((x <= -1.8e+78) || ~((x <= 1.55e+50))) tmp = log(y) * x; else tmp = -(log(y) + t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -1.8e+78], N[Not[LessEqual[x, 1.55e+50]], $MachinePrecision]], N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision], (-N[(N[Log[y], $MachinePrecision] + t), $MachinePrecision])]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.8 \cdot 10^{+78} \lor \neg \left(x \leq 1.55 \cdot 10^{+50}\right):\\
\;\;\;\;\log y \cdot x\\
\mathbf{else}:\\
\;\;\;\;-\left(\log y + t\right)\\
\end{array}
\end{array}
if x < -1.8000000000000001e78 or 1.55000000000000001e50 < x Initial program 97.2%
lift--.f64N/A
lift-+.f64N/A
+-commutativeN/A
associate--l+N/A
lift-*.f64N/A
lower-fma.f64N/A
lift-log.f64N/A
unpow1N/A
unpow1N/A
lift--.f64N/A
*-lft-identityN/A
fp-cancel-sub-sign-invN/A
distribute-lft-neg-inN/A
*-lft-identityN/A
lower-log1p.f64N/A
lower-neg.f64N/A
lower--.f6499.7
lift-*.f64N/A
*-commutativeN/A
lower-*.f6499.7
Applied rewrites99.7%
Taylor expanded in x around inf
*-commutativeN/A
remove-double-negN/A
mul-1-negN/A
distribute-rgt-neg-inN/A
log-recN/A
lower-*.f64N/A
log-recN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
remove-double-negN/A
lower-log.f6483.5
Applied rewrites83.5%
if -1.8000000000000001e78 < x < 1.55000000000000001e50Initial program 88.4%
Taylor expanded in y around 0
remove-double-negN/A
distribute-lft-neg-outN/A
log-recN/A
mul-1-negN/A
mul-1-negN/A
log-recN/A
distribute-lft-neg-outN/A
remove-double-negN/A
*-rgt-identityN/A
fp-cancel-sub-sign-invN/A
Applied rewrites86.4%
Taylor expanded in x around 0
Applied rewrites83.3%
Final simplification83.3%
(FPCore (x y z t) :precision binary64 (if (<= z 8.5e+179) (fma (+ -1.0 x) (log y) (- t)) (- (* (fma (- (* -0.3333333333333333 y) 0.5) y -1.0) (* y z)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= 8.5e+179) {
tmp = fma((-1.0 + x), log(y), -t);
} else {
tmp = (fma(((-0.3333333333333333 * y) - 0.5), y, -1.0) * (y * z)) - t;
}
return tmp;
}
function code(x, y, z, t) tmp = 0.0 if (z <= 8.5e+179) tmp = fma(Float64(-1.0 + x), log(y), Float64(-t)); else tmp = Float64(Float64(fma(Float64(Float64(-0.3333333333333333 * y) - 0.5), y, -1.0) * Float64(y * z)) - t); end return tmp end
code[x_, y_, z_, t_] := If[LessEqual[z, 8.5e+179], N[(N[(-1.0 + x), $MachinePrecision] * N[Log[y], $MachinePrecision] + (-t)), $MachinePrecision], N[(N[(N[(N[(N[(-0.3333333333333333 * y), $MachinePrecision] - 0.5), $MachinePrecision] * y + -1.0), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq 8.5 \cdot 10^{+179}:\\
\;\;\;\;\mathsf{fma}\left(-1 + x, \log y, -t\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-0.3333333333333333 \cdot y - 0.5, y, -1\right) \cdot \left(y \cdot z\right) - t\\
\end{array}
\end{array}
if z < 8.49999999999999962e179Initial program 95.9%
Taylor expanded in y around 0
remove-double-negN/A
distribute-lft-neg-outN/A
log-recN/A
mul-1-negN/A
mul-1-negN/A
log-recN/A
distribute-lft-neg-outN/A
remove-double-negN/A
*-rgt-identityN/A
fp-cancel-sub-sign-invN/A
Applied rewrites95.5%
if 8.49999999999999962e179 < z Initial program 48.5%
Taylor expanded in y around 0
+-commutativeN/A
Applied rewrites97.0%
Taylor expanded in z around -inf
Applied rewrites71.4%
(FPCore (x y z t) :precision binary64 (- (* (fma (- (* -0.3333333333333333 y) 0.5) y -1.0) (* y z)) t))
double code(double x, double y, double z, double t) {
return (fma(((-0.3333333333333333 * y) - 0.5), y, -1.0) * (y * z)) - t;
}
function code(x, y, z, t) return Float64(Float64(fma(Float64(Float64(-0.3333333333333333 * y) - 0.5), y, -1.0) * Float64(y * z)) - t) end
code[x_, y_, z_, t_] := N[(N[(N[(N[(N[(-0.3333333333333333 * y), $MachinePrecision] - 0.5), $MachinePrecision] * y + -1.0), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(-0.3333333333333333 \cdot y - 0.5, y, -1\right) \cdot \left(y \cdot z\right) - t
\end{array}
Initial program 91.7%
Taylor expanded in y around 0
+-commutativeN/A
Applied rewrites99.6%
Taylor expanded in z around -inf
Applied rewrites46.8%
(FPCore (x y z t) :precision binary64 (- (* (- 1.0 z) y) t))
double code(double x, double y, double z, double t) {
return ((1.0 - z) * y) - 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)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = ((1.0d0 - z) * y) - t
end function
public static double code(double x, double y, double z, double t) {
return ((1.0 - z) * y) - t;
}
def code(x, y, z, t): return ((1.0 - z) * y) - t
function code(x, y, z, t) return Float64(Float64(Float64(1.0 - z) * y) - t) end
function tmp = code(x, y, z, t) tmp = ((1.0 - z) * y) - t; end
code[x_, y_, z_, t_] := N[(N[(N[(1.0 - z), $MachinePrecision] * y), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
\left(1 - z\right) \cdot y - t
\end{array}
Initial program 91.7%
Taylor expanded in y around 0
+-commutativeN/A
remove-double-negN/A
log-recN/A
mul-1-negN/A
Applied rewrites99.0%
Taylor expanded in y around inf
Applied rewrites77.7%
Applied rewrites50.9%
Taylor expanded in y around inf
Applied rewrites46.4%
(FPCore (x y z t) :precision binary64 (- (* (- y) z) t))
double code(double x, double y, double z, double t) {
return (-y * z) - 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)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (-y * z) - t
end function
public static double code(double x, double y, double z, double t) {
return (-y * z) - t;
}
def code(x, y, z, t): return (-y * z) - t
function code(x, y, z, t) return Float64(Float64(Float64(-y) * z) - t) end
function tmp = code(x, y, z, t) tmp = (-y * z) - t; end
code[x_, y_, z_, t_] := N[(N[((-y) * z), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
\left(-y\right) \cdot z - t
\end{array}
Initial program 91.7%
Taylor expanded in y around 0
+-commutativeN/A
remove-double-negN/A
log-recN/A
mul-1-negN/A
Applied rewrites99.0%
Taylor expanded in z around inf
Applied rewrites46.3%
(FPCore (x y z t) :precision binary64 (- t))
double code(double x, double y, double z, double t) {
return -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)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = -t
end function
public static double code(double x, double y, double z, double t) {
return -t;
}
def code(x, y, z, t): return -t
function code(x, y, z, t) return Float64(-t) end
function tmp = code(x, y, z, t) tmp = -t; end
code[x_, y_, z_, t_] := (-t)
\begin{array}{l}
\\
-t
\end{array}
Initial program 91.7%
Taylor expanded in t around inf
mul-1-negN/A
lower-neg.f6438.8
Applied rewrites38.8%
herbie shell --seed 2024359
(FPCore (x y z t)
:name "Statistics.Distribution.Beta:$cdensity from math-functions-0.1.5.2"
:precision binary64
(- (+ (* (- x 1.0) (log y)) (* (- z 1.0) (log (- 1.0 y)))) t))