
(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}
Herbie found 11 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 (- (+ (* (- x 1.0) (log y)) (* (- z 1.0) (- (fma (* y y) 0.5 y)))) t))
double code(double x, double y, double z, double t) {
return (((x - 1.0) * log(y)) + ((z - 1.0) * -fma((y * y), 0.5, y))) - t;
}
function code(x, y, z, t) return Float64(Float64(Float64(Float64(x - 1.0) * log(y)) + Float64(Float64(z - 1.0) * Float64(-fma(Float64(y * y), 0.5, 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[(N[(y * y), $MachinePrecision] * 0.5 + y), $MachinePrecision])), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \left(-\mathsf{fma}\left(y \cdot y, 0.5, y\right)\right)\right) - t
\end{array}
Initial program 89.7%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f6499.5
Applied rewrites99.5%
Taylor expanded in y around inf
mul-1-negN/A
lower-neg.f64N/A
distribute-lft-inN/A
inv-powN/A
pow-prod-upN/A
metadata-evalN/A
unpow1N/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6499.5
Applied rewrites99.5%
(FPCore (x y z t) :precision binary64 (- (+ (* (- x 1.0) (log y)) (* z (- (fma (* y y) 0.5 y)))) t))
double code(double x, double y, double z, double t) {
return (((x - 1.0) * log(y)) + (z * -fma((y * y), 0.5, y))) - t;
}
function code(x, y, z, t) return Float64(Float64(Float64(Float64(x - 1.0) * log(y)) + Float64(z * Float64(-fma(Float64(y * y), 0.5, y)))) - t) end
code[x_, y_, z_, t_] := N[(N[(N[(N[(x - 1.0), $MachinePrecision] * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(z * (-N[(N[(y * y), $MachinePrecision] * 0.5 + y), $MachinePrecision])), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x - 1\right) \cdot \log y + z \cdot \left(-\mathsf{fma}\left(y \cdot y, 0.5, y\right)\right)\right) - t
\end{array}
Initial program 89.7%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f6499.5
Applied rewrites99.5%
Taylor expanded in y around inf
mul-1-negN/A
lower-neg.f64N/A
distribute-lft-inN/A
inv-powN/A
pow-prod-upN/A
metadata-evalN/A
unpow1N/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6499.5
Applied rewrites99.5%
Taylor expanded in z around inf
Applied rewrites99.4%
(FPCore (x y z t) :precision binary64 (- (fma (- y) (- z 1.0) (* (log y) (- x 1.0))) t))
double code(double x, double y, double z, double t) {
return fma(-y, (z - 1.0), (log(y) * (x - 1.0))) - t;
}
function code(x, y, z, t) return Float64(fma(Float64(-y), Float64(z - 1.0), Float64(log(y) * Float64(x - 1.0))) - t) end
code[x_, y_, z_, t_] := N[(N[((-y) * N[(z - 1.0), $MachinePrecision] + N[(N[Log[y], $MachinePrecision] * N[(x - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(-y, z - 1, \log y \cdot \left(x - 1\right)\right) - t
\end{array}
Initial program 89.7%
Taylor expanded in y around 0
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
lift--.f64N/A
lower-*.f64N/A
lift-log.f64N/A
lift--.f6499.2
Applied rewrites99.2%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (* (log y) (- x 1.0)) t)))
(if (<= x -4.4e-8)
t_1
(if (<= x 21000000.0) (- (- (* (- y) (- z 1.0)) (log y)) t) t_1))))
double code(double x, double y, double z, double t) {
double t_1 = (log(y) * (x - 1.0)) - t;
double tmp;
if (x <= -4.4e-8) {
tmp = t_1;
} else if (x <= 21000000.0) {
tmp = ((-y * (z - 1.0)) - log(y)) - t;
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t)
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) :: t_1
real(8) :: tmp
t_1 = (log(y) * (x - 1.0d0)) - t
if (x <= (-4.4d-8)) then
tmp = t_1
else if (x <= 21000000.0d0) then
tmp = ((-y * (z - 1.0d0)) - log(y)) - t
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (Math.log(y) * (x - 1.0)) - t;
double tmp;
if (x <= -4.4e-8) {
tmp = t_1;
} else if (x <= 21000000.0) {
tmp = ((-y * (z - 1.0)) - Math.log(y)) - t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = (math.log(y) * (x - 1.0)) - t tmp = 0 if x <= -4.4e-8: tmp = t_1 elif x <= 21000000.0: tmp = ((-y * (z - 1.0)) - math.log(y)) - t else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(log(y) * Float64(x - 1.0)) - t) tmp = 0.0 if (x <= -4.4e-8) tmp = t_1; elseif (x <= 21000000.0) tmp = Float64(Float64(Float64(Float64(-y) * Float64(z - 1.0)) - log(y)) - t); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (log(y) * (x - 1.0)) - t; tmp = 0.0; if (x <= -4.4e-8) tmp = t_1; elseif (x <= 21000000.0) tmp = ((-y * (z - 1.0)) - log(y)) - t; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(N[Log[y], $MachinePrecision] * N[(x - 1.0), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]}, If[LessEqual[x, -4.4e-8], t$95$1, If[LessEqual[x, 21000000.0], N[(N[(N[((-y) * N[(z - 1.0), $MachinePrecision]), $MachinePrecision] - N[Log[y], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log y \cdot \left(x - 1\right) - t\\
\mathbf{if}\;x \leq -4.4 \cdot 10^{-8}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 21000000:\\
\;\;\;\;\left(\left(-y\right) \cdot \left(z - 1\right) - \log y\right) - t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -4.3999999999999997e-8 or 2.1e7 < x Initial program 93.9%
Taylor expanded in y around 0
lower-*.f64N/A
lift-log.f64N/A
lift--.f6493.3
Applied rewrites93.3%
if -4.3999999999999997e-8 < x < 2.1e7Initial program 85.4%
Taylor expanded in x around 0
+-commutativeN/A
lower-fma.f64N/A
lift-log.f64N/A
lift--.f64N/A
lift--.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lift-log.f6484.6
Applied rewrites84.6%
Taylor expanded in y around 0
lower--.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
lift--.f64N/A
lift-log.f6498.3
Applied rewrites98.3%
(FPCore (x y z t)
:precision binary64
(if (<= t -7.5e+18)
(- (* (log y) x) t)
(if (<= t 4.3e-50)
(fma (- x 1.0) (log y) (* (- y) z))
(- (* (log y) (- x 1.0)) t))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -7.5e+18) {
tmp = (log(y) * x) - t;
} else if (t <= 4.3e-50) {
tmp = fma((x - 1.0), log(y), (-y * z));
} else {
tmp = (log(y) * (x - 1.0)) - t;
}
return tmp;
}
function code(x, y, z, t) tmp = 0.0 if (t <= -7.5e+18) tmp = Float64(Float64(log(y) * x) - t); elseif (t <= 4.3e-50) tmp = fma(Float64(x - 1.0), log(y), Float64(Float64(-y) * z)); else tmp = Float64(Float64(log(y) * Float64(x - 1.0)) - t); end return tmp end
code[x_, y_, z_, t_] := If[LessEqual[t, -7.5e+18], N[(N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision] - t), $MachinePrecision], If[LessEqual[t, 4.3e-50], N[(N[(x - 1.0), $MachinePrecision] * N[Log[y], $MachinePrecision] + N[((-y) * z), $MachinePrecision]), $MachinePrecision], N[(N[(N[Log[y], $MachinePrecision] * N[(x - 1.0), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -7.5 \cdot 10^{+18}:\\
\;\;\;\;\log y \cdot x - t\\
\mathbf{elif}\;t \leq 4.3 \cdot 10^{-50}:\\
\;\;\;\;\mathsf{fma}\left(x - 1, \log y, \left(-y\right) \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;\log y \cdot \left(x - 1\right) - t\\
\end{array}
\end{array}
if t < -7.5e18Initial program 94.9%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
lift-log.f6494.4
Applied rewrites94.4%
if -7.5e18 < t < 4.29999999999999997e-50Initial program 85.1%
lift--.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-log.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift--.f64N/A
lift-log.f64N/A
associate--l+N/A
lower-fma.f64N/A
lift--.f64N/A
lift-log.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-log.f64N/A
lift--.f64N/A
lift--.f6485.1
Applied rewrites85.1%
Taylor expanded in y around 0
lower--.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
lift--.f6499.0
Applied rewrites99.0%
Taylor expanded in z around inf
associate-*r*N/A
mul-1-negN/A
lift-neg.f64N/A
lower-*.f6497.1
Applied rewrites97.1%
if 4.29999999999999997e-50 < t Initial program 93.0%
Taylor expanded in y around 0
lower-*.f64N/A
lift-log.f64N/A
lift--.f6492.3
Applied rewrites92.3%
(FPCore (x y z t) :precision binary64 (- (* (log y) (- x 1.0)) t))
double code(double x, double y, double z, double t) {
return (log(y) * (x - 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)
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 = (log(y) * (x - 1.0d0)) - t
end function
public static double code(double x, double y, double z, double t) {
return (Math.log(y) * (x - 1.0)) - t;
}
def code(x, y, z, t): return (math.log(y) * (x - 1.0)) - t
function code(x, y, z, t) return Float64(Float64(log(y) * Float64(x - 1.0)) - t) end
function tmp = code(x, y, z, t) tmp = (log(y) * (x - 1.0)) - t; end
code[x_, y_, z_, t_] := N[(N[(N[Log[y], $MachinePrecision] * N[(x - 1.0), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
\log y \cdot \left(x - 1\right) - t
\end{array}
Initial program 89.7%
Taylor expanded in y around 0
lower-*.f64N/A
lift-log.f64N/A
lift--.f6488.7
Applied rewrites88.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (* (log y) x) t)))
(if (<= (- x 1.0) -4000.0)
t_1
(if (<= (- x 1.0) -1.0) (- (- y (log y)) t) t_1))))
double code(double x, double y, double z, double t) {
double t_1 = (log(y) * x) - t;
double tmp;
if ((x - 1.0) <= -4000.0) {
tmp = t_1;
} else if ((x - 1.0) <= -1.0) {
tmp = (y - log(y)) - t;
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t)
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) :: t_1
real(8) :: tmp
t_1 = (log(y) * x) - t
if ((x - 1.0d0) <= (-4000.0d0)) then
tmp = t_1
else if ((x - 1.0d0) <= (-1.0d0)) then
tmp = (y - log(y)) - t
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (Math.log(y) * x) - t;
double tmp;
if ((x - 1.0) <= -4000.0) {
tmp = t_1;
} else if ((x - 1.0) <= -1.0) {
tmp = (y - Math.log(y)) - t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = (math.log(y) * x) - t tmp = 0 if (x - 1.0) <= -4000.0: tmp = t_1 elif (x - 1.0) <= -1.0: tmp = (y - math.log(y)) - t else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(log(y) * x) - t) tmp = 0.0 if (Float64(x - 1.0) <= -4000.0) tmp = t_1; elseif (Float64(x - 1.0) <= -1.0) tmp = Float64(Float64(y - log(y)) - t); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (log(y) * x) - t; tmp = 0.0; if ((x - 1.0) <= -4000.0) tmp = t_1; elseif ((x - 1.0) <= -1.0) tmp = (y - log(y)) - t; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision] - t), $MachinePrecision]}, If[LessEqual[N[(x - 1.0), $MachinePrecision], -4000.0], t$95$1, If[LessEqual[N[(x - 1.0), $MachinePrecision], -1.0], N[(N[(y - N[Log[y], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log y \cdot x - t\\
\mathbf{if}\;x - 1 \leq -4000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x - 1 \leq -1:\\
\;\;\;\;\left(y - \log y\right) - t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (-.f64 x #s(literal 1 binary64)) < -4e3 or -1 < (-.f64 x #s(literal 1 binary64)) Initial program 93.5%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
lift-log.f6491.4
Applied rewrites91.4%
if -4e3 < (-.f64 x #s(literal 1 binary64)) < -1Initial program 85.7%
Taylor expanded in x around 0
+-commutativeN/A
lower-fma.f64N/A
lift-log.f64N/A
lift--.f64N/A
lift--.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lift-log.f6485.0
Applied rewrites85.0%
Taylor expanded in z around 0
log-pow-revN/A
diff-logN/A
lower-log.f64N/A
lower-/.f64N/A
unpow-1N/A
lower-/.f64N/A
lift--.f6484.1
Applied rewrites84.1%
Taylor expanded in y around 0
fp-cancel-sign-sub-invN/A
metadata-evalN/A
log-pow-revN/A
unpow1N/A
lower--.f64N/A
lift-log.f6483.9
Applied rewrites83.9%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* (log y) x)))
(if (<= (- x 1.0) -2e+41)
t_1
(if (<= (- x 1.0) -0.5) (- (- y (log y)) t) t_1))))
double code(double x, double y, double z, double t) {
double t_1 = log(y) * x;
double tmp;
if ((x - 1.0) <= -2e+41) {
tmp = t_1;
} else if ((x - 1.0) <= -0.5) {
tmp = (y - log(y)) - t;
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t)
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) :: t_1
real(8) :: tmp
t_1 = log(y) * x
if ((x - 1.0d0) <= (-2d+41)) then
tmp = t_1
else if ((x - 1.0d0) <= (-0.5d0)) then
tmp = (y - log(y)) - t
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = Math.log(y) * x;
double tmp;
if ((x - 1.0) <= -2e+41) {
tmp = t_1;
} else if ((x - 1.0) <= -0.5) {
tmp = (y - Math.log(y)) - t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = math.log(y) * x tmp = 0 if (x - 1.0) <= -2e+41: tmp = t_1 elif (x - 1.0) <= -0.5: tmp = (y - math.log(y)) - t else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(log(y) * x) tmp = 0.0 if (Float64(x - 1.0) <= -2e+41) tmp = t_1; elseif (Float64(x - 1.0) <= -0.5) tmp = Float64(Float64(y - log(y)) - t); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = log(y) * x; tmp = 0.0; if ((x - 1.0) <= -2e+41) tmp = t_1; elseif ((x - 1.0) <= -0.5) tmp = (y - log(y)) - t; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[N[(x - 1.0), $MachinePrecision], -2e+41], t$95$1, If[LessEqual[N[(x - 1.0), $MachinePrecision], -0.5], N[(N[(y - N[Log[y], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log y \cdot x\\
\mathbf{if}\;x - 1 \leq -2 \cdot 10^{+41}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x - 1 \leq -0.5:\\
\;\;\;\;\left(y - \log y\right) - t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (-.f64 x #s(literal 1 binary64)) < -2.00000000000000001e41 or -0.5 < (-.f64 x #s(literal 1 binary64)) Initial program 94.4%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
lift-log.f6472.0
Applied rewrites72.0%
if -2.00000000000000001e41 < (-.f64 x #s(literal 1 binary64)) < -0.5Initial program 85.5%
Taylor expanded in x around 0
+-commutativeN/A
lower-fma.f64N/A
lift-log.f64N/A
lift--.f64N/A
lift--.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lift-log.f6482.7
Applied rewrites82.7%
Taylor expanded in z around 0
log-pow-revN/A
diff-logN/A
lower-log.f64N/A
lower-/.f64N/A
unpow-1N/A
lower-/.f64N/A
lift--.f6481.8
Applied rewrites81.8%
Taylor expanded in y around 0
fp-cancel-sign-sub-invN/A
metadata-evalN/A
log-pow-revN/A
unpow1N/A
lower--.f64N/A
lift-log.f6481.6
Applied rewrites81.6%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (* (log y) x))) (if (<= x -1.45e+41) t_1 (if (<= x 20500000.0) (- (- (log y)) t) t_1))))
double code(double x, double y, double z, double t) {
double t_1 = log(y) * x;
double tmp;
if (x <= -1.45e+41) {
tmp = t_1;
} else if (x <= 20500000.0) {
tmp = -log(y) - t;
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t)
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) :: t_1
real(8) :: tmp
t_1 = log(y) * x
if (x <= (-1.45d+41)) then
tmp = t_1
else if (x <= 20500000.0d0) then
tmp = -log(y) - t
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = Math.log(y) * x;
double tmp;
if (x <= -1.45e+41) {
tmp = t_1;
} else if (x <= 20500000.0) {
tmp = -Math.log(y) - t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = math.log(y) * x tmp = 0 if x <= -1.45e+41: tmp = t_1 elif x <= 20500000.0: tmp = -math.log(y) - t else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(log(y) * x) tmp = 0.0 if (x <= -1.45e+41) tmp = t_1; elseif (x <= 20500000.0) tmp = Float64(Float64(-log(y)) - t); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = log(y) * x; tmp = 0.0; if (x <= -1.45e+41) tmp = t_1; elseif (x <= 20500000.0) tmp = -log(y) - t; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[x, -1.45e+41], t$95$1, If[LessEqual[x, 20500000.0], N[((-N[Log[y], $MachinePrecision]) - t), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log y \cdot x\\
\mathbf{if}\;x \leq -1.45 \cdot 10^{+41}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 20500000:\\
\;\;\;\;\left(-\log y\right) - t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -1.44999999999999994e41 or 2.05e7 < x Initial program 94.6%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
lift-log.f6472.8
Applied rewrites72.8%
if -1.44999999999999994e41 < x < 2.05e7Initial program 85.5%
Taylor expanded in x around 0
+-commutativeN/A
lower-fma.f64N/A
lift-log.f64N/A
lift--.f64N/A
lift--.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lift-log.f6482.4
Applied rewrites82.4%
Taylor expanded in y around 0
mul-1-negN/A
lift-neg.f64N/A
lift-log.f6481.0
Applied rewrites81.0%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (* (log y) x))) (if (<= (- x 1.0) -2e+41) t_1 (if (<= (- x 1.0) -0.5) (- t) t_1))))
double code(double x, double y, double z, double t) {
double t_1 = log(y) * x;
double tmp;
if ((x - 1.0) <= -2e+41) {
tmp = t_1;
} else if ((x - 1.0) <= -0.5) {
tmp = -t;
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t)
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) :: t_1
real(8) :: tmp
t_1 = log(y) * x
if ((x - 1.0d0) <= (-2d+41)) then
tmp = t_1
else if ((x - 1.0d0) <= (-0.5d0)) then
tmp = -t
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = Math.log(y) * x;
double tmp;
if ((x - 1.0) <= -2e+41) {
tmp = t_1;
} else if ((x - 1.0) <= -0.5) {
tmp = -t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = math.log(y) * x tmp = 0 if (x - 1.0) <= -2e+41: tmp = t_1 elif (x - 1.0) <= -0.5: tmp = -t else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(log(y) * x) tmp = 0.0 if (Float64(x - 1.0) <= -2e+41) tmp = t_1; elseif (Float64(x - 1.0) <= -0.5) tmp = Float64(-t); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = log(y) * x; tmp = 0.0; if ((x - 1.0) <= -2e+41) tmp = t_1; elseif ((x - 1.0) <= -0.5) tmp = -t; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[N[(x - 1.0), $MachinePrecision], -2e+41], t$95$1, If[LessEqual[N[(x - 1.0), $MachinePrecision], -0.5], (-t), t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log y \cdot x\\
\mathbf{if}\;x - 1 \leq -2 \cdot 10^{+41}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x - 1 \leq -0.5:\\
\;\;\;\;-t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (-.f64 x #s(literal 1 binary64)) < -2.00000000000000001e41 or -0.5 < (-.f64 x #s(literal 1 binary64)) Initial program 94.4%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
lift-log.f6472.0
Applied rewrites72.0%
if -2.00000000000000001e41 < (-.f64 x #s(literal 1 binary64)) < -0.5Initial program 85.5%
Taylor expanded in t around inf
mul-1-negN/A
lower-neg.f6446.4
Applied rewrites46.4%
(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 89.7%
Taylor expanded in t around inf
mul-1-negN/A
lower-neg.f6435.2
Applied rewrites35.2%
herbie shell --seed 2025112
(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))