
(FPCore (x y z t a b) :precision binary64 (+ (- (+ (+ x y) z) (* z (log t))) (* (- a 0.5) b)))
double code(double x, double y, double z, double t, double a, double b) {
return (((x + y) + z) - (z * log(t))) + ((a - 0.5) * b);
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (((x + y) + z) - (z * log(t))) + ((a - 0.5d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (((x + y) + z) - (z * Math.log(t))) + ((a - 0.5) * b);
}
def code(x, y, z, t, a, b): return (((x + y) + z) - (z * math.log(t))) + ((a - 0.5) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(Float64(x + y) + z) - Float64(z * log(t))) + Float64(Float64(a - 0.5) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = (((x + y) + z) - (z * log(t))) + ((a - 0.5) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(N[(x + y), $MachinePrecision] + z), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 13 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (+ (- (+ (+ x y) z) (* z (log t))) (* (- a 0.5) b)))
double code(double x, double y, double z, double t, double a, double b) {
return (((x + y) + z) - (z * log(t))) + ((a - 0.5) * b);
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (((x + y) + z) - (z * log(t))) + ((a - 0.5d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (((x + y) + z) - (z * Math.log(t))) + ((a - 0.5) * b);
}
def code(x, y, z, t, a, b): return (((x + y) + z) - (z * math.log(t))) + ((a - 0.5) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(Float64(x + y) + z) - Float64(z * log(t))) + Float64(Float64(a - 0.5) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = (((x + y) + z) - (z * log(t))) + ((a - 0.5) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(N[(x + y), $MachinePrecision] + z), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b
\end{array}
(FPCore (x y z t a b) :precision binary64 (+ (- (+ (+ x y) z) (* z (log t))) (* (- a 0.5) b)))
double code(double x, double y, double z, double t, double a, double b) {
return (((x + y) + z) - (z * log(t))) + ((a - 0.5) * b);
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (((x + y) + z) - (z * log(t))) + ((a - 0.5d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (((x + y) + z) - (z * Math.log(t))) + ((a - 0.5) * b);
}
def code(x, y, z, t, a, b): return (((x + y) + z) - (z * math.log(t))) + ((a - 0.5) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(Float64(x + y) + z) - Float64(z * log(t))) + Float64(Float64(a - 0.5) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = (((x + y) + z) - (z * log(t))) + ((a - 0.5) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(N[(x + y), $MachinePrecision] + z), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b
\end{array}
Initial program 99.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- a 0.5) b)))
(if (or (<= t_1 -1e+152) (not (<= t_1 5e+118)))
(fma (- a 0.5) b (+ y x))
(+ (fma -0.5 b (fma (- 1.0 (log t)) z x)) y))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a - 0.5) * b;
double tmp;
if ((t_1 <= -1e+152) || !(t_1 <= 5e+118)) {
tmp = fma((a - 0.5), b, (y + x));
} else {
tmp = fma(-0.5, b, fma((1.0 - log(t)), z, x)) + y;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(a - 0.5) * b) tmp = 0.0 if ((t_1 <= -1e+152) || !(t_1 <= 5e+118)) tmp = fma(Float64(a - 0.5), b, Float64(y + x)); else tmp = Float64(fma(-0.5, b, fma(Float64(1.0 - log(t)), z, x)) + y); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -1e+152], N[Not[LessEqual[t$95$1, 5e+118]], $MachinePrecision]], N[(N[(a - 0.5), $MachinePrecision] * b + N[(y + x), $MachinePrecision]), $MachinePrecision], N[(N[(-0.5 * b + N[(N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision] * z + x), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a - 0.5\right) \cdot b\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+152} \lor \neg \left(t\_1 \leq 5 \cdot 10^{+118}\right):\\
\;\;\;\;\mathsf{fma}\left(a - 0.5, b, y + x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-0.5, b, \mathsf{fma}\left(1 - \log t, z, x\right)\right) + y\\
\end{array}
\end{array}
if (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < -1e152 or 4.99999999999999972e118 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) Initial program 99.9%
Taylor expanded in z around 0
+-commutativeN/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6493.7
Applied rewrites93.7%
if -1e152 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 4.99999999999999972e118Initial program 99.8%
Taylor expanded in a around 0
*-commutativeN/A
fp-cancel-sub-sign-invN/A
mul-1-negN/A
*-commutativeN/A
mul-1-negN/A
log-recN/A
+-commutativeN/A
+-commutativeN/A
associate-+r+N/A
associate-+l+N/A
associate-+r+N/A
+-commutativeN/A
log-recN/A
mul-1-negN/A
*-commutativeN/A
mul-1-negN/A
fp-cancel-sub-sign-invN/A
*-commutativeN/A
Applied rewrites97.4%
Applied rewrites97.4%
Final simplification96.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- a 0.5) b)) (t_2 (- 1.0 (log t))))
(if (<= t_1 -1e+152)
(fma (- a 0.5) b (+ y x))
(if (<= t_1 5e+117)
(+ (fma -0.5 b (fma t_2 z x)) y)
(fma t_2 z (fma (+ -0.5 a) b x))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a - 0.5) * b;
double t_2 = 1.0 - log(t);
double tmp;
if (t_1 <= -1e+152) {
tmp = fma((a - 0.5), b, (y + x));
} else if (t_1 <= 5e+117) {
tmp = fma(-0.5, b, fma(t_2, z, x)) + y;
} else {
tmp = fma(t_2, z, fma((-0.5 + a), b, x));
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(a - 0.5) * b) t_2 = Float64(1.0 - log(t)) tmp = 0.0 if (t_1 <= -1e+152) tmp = fma(Float64(a - 0.5), b, Float64(y + x)); elseif (t_1 <= 5e+117) tmp = Float64(fma(-0.5, b, fma(t_2, z, x)) + y); else tmp = fma(t_2, z, fma(Float64(-0.5 + a), b, x)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]}, Block[{t$95$2 = N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+152], N[(N[(a - 0.5), $MachinePrecision] * b + N[(y + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+117], N[(N[(-0.5 * b + N[(t$95$2 * z + x), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision], N[(t$95$2 * z + N[(N[(-0.5 + a), $MachinePrecision] * b + x), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a - 0.5\right) \cdot b\\
t_2 := 1 - \log t\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+152}:\\
\;\;\;\;\mathsf{fma}\left(a - 0.5, b, y + x\right)\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+117}:\\
\;\;\;\;\mathsf{fma}\left(-0.5, b, \mathsf{fma}\left(t\_2, z, x\right)\right) + y\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t\_2, z, \mathsf{fma}\left(-0.5 + a, b, x\right)\right)\\
\end{array}
\end{array}
if (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < -1e152Initial program 100.0%
Taylor expanded in z around 0
+-commutativeN/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6495.2
Applied rewrites95.2%
if -1e152 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 4.99999999999999983e117Initial program 99.8%
Taylor expanded in a around 0
*-commutativeN/A
fp-cancel-sub-sign-invN/A
mul-1-negN/A
*-commutativeN/A
mul-1-negN/A
log-recN/A
+-commutativeN/A
+-commutativeN/A
associate-+r+N/A
associate-+l+N/A
associate-+r+N/A
+-commutativeN/A
log-recN/A
mul-1-negN/A
*-commutativeN/A
mul-1-negN/A
fp-cancel-sub-sign-invN/A
*-commutativeN/A
Applied rewrites97.4%
Applied rewrites97.4%
if 4.99999999999999983e117 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) Initial program 99.9%
Taylor expanded in y around 0
*-commutativeN/A
fp-cancel-sub-sign-invN/A
mul-1-negN/A
*-commutativeN/A
mul-1-negN/A
log-recN/A
+-commutativeN/A
associate-+r+N/A
+-commutativeN/A
associate-+l+N/A
associate-+r+N/A
Applied rewrites92.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- a 0.5) b)))
(if (or (<= t_1 -1e+152) (not (<= t_1 1e-21)))
(fma (- a 0.5) b (+ y x))
(fma (- 1.0 (log t)) z (+ y x)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a - 0.5) * b;
double tmp;
if ((t_1 <= -1e+152) || !(t_1 <= 1e-21)) {
tmp = fma((a - 0.5), b, (y + x));
} else {
tmp = fma((1.0 - log(t)), z, (y + x));
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(a - 0.5) * b) tmp = 0.0 if ((t_1 <= -1e+152) || !(t_1 <= 1e-21)) tmp = fma(Float64(a - 0.5), b, Float64(y + x)); else tmp = fma(Float64(1.0 - log(t)), z, Float64(y + x)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -1e+152], N[Not[LessEqual[t$95$1, 1e-21]], $MachinePrecision]], N[(N[(a - 0.5), $MachinePrecision] * b + N[(y + x), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision] * z + N[(y + x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a - 0.5\right) \cdot b\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+152} \lor \neg \left(t\_1 \leq 10^{-21}\right):\\
\;\;\;\;\mathsf{fma}\left(a - 0.5, b, y + x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(1 - \log t, z, y + x\right)\\
\end{array}
\end{array}
if (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < -1e152 or 9.99999999999999908e-22 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) Initial program 99.9%
Taylor expanded in z around 0
+-commutativeN/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6492.0
Applied rewrites92.0%
if -1e152 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 9.99999999999999908e-22Initial program 99.8%
Taylor expanded in a around 0
*-commutativeN/A
fp-cancel-sub-sign-invN/A
mul-1-negN/A
*-commutativeN/A
mul-1-negN/A
log-recN/A
+-commutativeN/A
+-commutativeN/A
associate-+r+N/A
associate-+l+N/A
associate-+r+N/A
+-commutativeN/A
log-recN/A
mul-1-negN/A
*-commutativeN/A
mul-1-negN/A
fp-cancel-sub-sign-invN/A
*-commutativeN/A
Applied rewrites98.5%
Taylor expanded in b around 0
*-commutativeN/A
fp-cancel-sub-sign-invN/A
associate-+r+N/A
mul-1-negN/A
*-commutativeN/A
mul-1-negN/A
log-recN/A
associate-+l+N/A
*-rgt-identityN/A
log-recN/A
mul-1-negN/A
distribute-lft-inN/A
fp-cancel-sign-sub-invN/A
metadata-evalN/A
*-lft-identityN/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-log.f64N/A
+-commutativeN/A
Applied rewrites93.4%
Final simplification92.7%
(FPCore (x y z t a b) :precision binary64 (if (<= (- (+ (+ x y) z) (* z (log t))) -4e-161) (fma b (- a 0.5) x) (fma b (- a 0.5) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((((x + y) + z) - (z * log(t))) <= -4e-161) {
tmp = fma(b, (a - 0.5), x);
} else {
tmp = fma(b, (a - 0.5), y);
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (Float64(Float64(Float64(x + y) + z) - Float64(z * log(t))) <= -4e-161) tmp = fma(b, Float64(a - 0.5), x); else tmp = fma(b, Float64(a - 0.5), y); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(N[(N[(x + y), $MachinePrecision] + z), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -4e-161], N[(b * N[(a - 0.5), $MachinePrecision] + x), $MachinePrecision], N[(b * N[(a - 0.5), $MachinePrecision] + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\left(\left(x + y\right) + z\right) - z \cdot \log t \leq -4 \cdot 10^{-161}:\\
\;\;\;\;\mathsf{fma}\left(b, a - 0.5, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(b, a - 0.5, y\right)\\
\end{array}
\end{array}
if (-.f64 (+.f64 (+.f64 x y) z) (*.f64 z (log.f64 t))) < -4.00000000000000011e-161Initial program 99.9%
Taylor expanded in z around 0
+-commutativeN/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6476.3
Applied rewrites76.3%
Taylor expanded in y around 0
Applied rewrites56.8%
if -4.00000000000000011e-161 < (-.f64 (+.f64 (+.f64 x y) z) (*.f64 z (log.f64 t))) Initial program 99.8%
Taylor expanded in z around 0
+-commutativeN/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6478.5
Applied rewrites78.5%
Taylor expanded in x around 0
Applied rewrites58.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -2.6e+92) (not (<= z 2.45e+131))) (fma (- 1.0 (log t)) z x) (fma (- a 0.5) b (+ y x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -2.6e+92) || !(z <= 2.45e+131)) {
tmp = fma((1.0 - log(t)), z, x);
} else {
tmp = fma((a - 0.5), b, (y + x));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -2.6e+92) || !(z <= 2.45e+131)) tmp = fma(Float64(1.0 - log(t)), z, x); else tmp = fma(Float64(a - 0.5), b, Float64(y + x)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -2.6e+92], N[Not[LessEqual[z, 2.45e+131]], $MachinePrecision]], N[(N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision] * z + x), $MachinePrecision], N[(N[(a - 0.5), $MachinePrecision] * b + N[(y + x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.6 \cdot 10^{+92} \lor \neg \left(z \leq 2.45 \cdot 10^{+131}\right):\\
\;\;\;\;\mathsf{fma}\left(1 - \log t, z, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(a - 0.5, b, y + x\right)\\
\end{array}
\end{array}
if z < -2.5999999999999999e92 or 2.45000000000000016e131 < z Initial program 99.7%
Taylor expanded in y around 0
*-commutativeN/A
fp-cancel-sub-sign-invN/A
mul-1-negN/A
*-commutativeN/A
mul-1-negN/A
log-recN/A
+-commutativeN/A
associate-+r+N/A
+-commutativeN/A
associate-+l+N/A
associate-+r+N/A
Applied rewrites88.4%
Taylor expanded in b around 0
Applied rewrites66.4%
if -2.5999999999999999e92 < z < 2.45000000000000016e131Initial program 99.9%
Taylor expanded in z around 0
+-commutativeN/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6492.2
Applied rewrites92.2%
Final simplification84.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.15e+152) (not (<= z 8.5e+247))) (* (- 1.0 (log t)) z) (fma (- a 0.5) b (+ y x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.15e+152) || !(z <= 8.5e+247)) {
tmp = (1.0 - log(t)) * z;
} else {
tmp = fma((a - 0.5), b, (y + x));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.15e+152) || !(z <= 8.5e+247)) tmp = Float64(Float64(1.0 - log(t)) * z); else tmp = fma(Float64(a - 0.5), b, Float64(y + x)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.15e+152], N[Not[LessEqual[z, 8.5e+247]], $MachinePrecision]], N[(N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision], N[(N[(a - 0.5), $MachinePrecision] * b + N[(y + x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.15 \cdot 10^{+152} \lor \neg \left(z \leq 8.5 \cdot 10^{+247}\right):\\
\;\;\;\;\left(1 - \log t\right) \cdot z\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(a - 0.5, b, y + x\right)\\
\end{array}
\end{array}
if z < -1.14999999999999993e152 or 8.4999999999999998e247 < z Initial program 99.6%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-log.f6465.0
Applied rewrites65.0%
if -1.14999999999999993e152 < z < 8.4999999999999998e247Initial program 99.9%
Taylor expanded in z around 0
+-commutativeN/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6485.3
Applied rewrites85.3%
Final simplification82.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- a 0.5) b)))
(if (or (<= t_1 -1e+152) (not (<= t_1 5e+118)))
(* b (- a 0.5))
(fma -0.5 b x))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a - 0.5) * b;
double tmp;
if ((t_1 <= -1e+152) || !(t_1 <= 5e+118)) {
tmp = b * (a - 0.5);
} else {
tmp = fma(-0.5, b, x);
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(a - 0.5) * b) tmp = 0.0 if ((t_1 <= -1e+152) || !(t_1 <= 5e+118)) tmp = Float64(b * Float64(a - 0.5)); else tmp = fma(-0.5, b, x); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -1e+152], N[Not[LessEqual[t$95$1, 5e+118]], $MachinePrecision]], N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision], N[(-0.5 * b + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a - 0.5\right) \cdot b\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+152} \lor \neg \left(t\_1 \leq 5 \cdot 10^{+118}\right):\\
\;\;\;\;b \cdot \left(a - 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-0.5, b, x\right)\\
\end{array}
\end{array}
if (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < -1e152 or 4.99999999999999972e118 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) Initial program 99.9%
Taylor expanded in a around 0
*-commutativeN/A
fp-cancel-sub-sign-invN/A
mul-1-negN/A
*-commutativeN/A
mul-1-negN/A
log-recN/A
+-commutativeN/A
+-commutativeN/A
associate-+r+N/A
associate-+l+N/A
associate-+r+N/A
+-commutativeN/A
log-recN/A
mul-1-negN/A
*-commutativeN/A
mul-1-negN/A
fp-cancel-sub-sign-invN/A
*-commutativeN/A
Applied rewrites32.9%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f6482.5
Applied rewrites82.5%
if -1e152 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 4.99999999999999972e118Initial program 99.8%
Taylor expanded in y around 0
*-commutativeN/A
fp-cancel-sub-sign-invN/A
mul-1-negN/A
*-commutativeN/A
mul-1-negN/A
log-recN/A
+-commutativeN/A
associate-+r+N/A
+-commutativeN/A
associate-+l+N/A
associate-+r+N/A
Applied rewrites74.7%
Taylor expanded in a around 0
Applied rewrites72.3%
Taylor expanded in z around 0
Applied rewrites39.8%
Final simplification55.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= (- a 0.5) -0.6) (not (<= (- a 0.5) 5e+14))) (* b a) (* -0.5 b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (((a - 0.5) <= -0.6) || !((a - 0.5) <= 5e+14)) {
tmp = b * a;
} else {
tmp = -0.5 * b;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (((a - 0.5d0) <= (-0.6d0)) .or. (.not. ((a - 0.5d0) <= 5d+14))) then
tmp = b * a
else
tmp = (-0.5d0) * b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (((a - 0.5) <= -0.6) || !((a - 0.5) <= 5e+14)) {
tmp = b * a;
} else {
tmp = -0.5 * b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if ((a - 0.5) <= -0.6) or not ((a - 0.5) <= 5e+14): tmp = b * a else: tmp = -0.5 * b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((Float64(a - 0.5) <= -0.6) || !(Float64(a - 0.5) <= 5e+14)) tmp = Float64(b * a); else tmp = Float64(-0.5 * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (((a - 0.5) <= -0.6) || ~(((a - 0.5) <= 5e+14))) tmp = b * a; else tmp = -0.5 * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[N[(a - 0.5), $MachinePrecision], -0.6], N[Not[LessEqual[N[(a - 0.5), $MachinePrecision], 5e+14]], $MachinePrecision]], N[(b * a), $MachinePrecision], N[(-0.5 * b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a - 0.5 \leq -0.6 \lor \neg \left(a - 0.5 \leq 5 \cdot 10^{+14}\right):\\
\;\;\;\;b \cdot a\\
\mathbf{else}:\\
\;\;\;\;-0.5 \cdot b\\
\end{array}
\end{array}
if (-.f64 a #s(literal 1/2 binary64)) < -0.599999999999999978 or 5e14 < (-.f64 a #s(literal 1/2 binary64)) Initial program 99.9%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f6449.5
Applied rewrites49.5%
if -0.599999999999999978 < (-.f64 a #s(literal 1/2 binary64)) < 5e14Initial program 99.8%
Taylor expanded in y around 0
*-commutativeN/A
fp-cancel-sub-sign-invN/A
mul-1-negN/A
*-commutativeN/A
mul-1-negN/A
log-recN/A
+-commutativeN/A
associate-+r+N/A
+-commutativeN/A
associate-+l+N/A
associate-+r+N/A
Applied rewrites76.5%
Taylor expanded in a around 0
Applied rewrites76.0%
Taylor expanded in z around 0
Applied rewrites46.0%
Taylor expanded in x around 0
Applied rewrites23.5%
Final simplification37.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -1.75e+69) (not (<= a 5.2e+22))) (* b a) (fma -0.5 b x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -1.75e+69) || !(a <= 5.2e+22)) {
tmp = b * a;
} else {
tmp = fma(-0.5, b, x);
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -1.75e+69) || !(a <= 5.2e+22)) tmp = Float64(b * a); else tmp = fma(-0.5, b, x); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -1.75e+69], N[Not[LessEqual[a, 5.2e+22]], $MachinePrecision]], N[(b * a), $MachinePrecision], N[(-0.5 * b + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.75 \cdot 10^{+69} \lor \neg \left(a \leq 5.2 \cdot 10^{+22}\right):\\
\;\;\;\;b \cdot a\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-0.5, b, x\right)\\
\end{array}
\end{array}
if a < -1.74999999999999994e69 or 5.2e22 < a Initial program 99.9%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f6455.6
Applied rewrites55.6%
if -1.74999999999999994e69 < a < 5.2e22Initial program 99.8%
Taylor expanded in y around 0
*-commutativeN/A
fp-cancel-sub-sign-invN/A
mul-1-negN/A
*-commutativeN/A
mul-1-negN/A
log-recN/A
+-commutativeN/A
associate-+r+N/A
+-commutativeN/A
associate-+l+N/A
associate-+r+N/A
Applied rewrites75.7%
Taylor expanded in a around 0
Applied rewrites73.3%
Taylor expanded in z around 0
Applied rewrites43.4%
Final simplification49.2%
(FPCore (x y z t a b) :precision binary64 (fma (- a 0.5) b (+ y x)))
double code(double x, double y, double z, double t, double a, double b) {
return fma((a - 0.5), b, (y + x));
}
function code(x, y, z, t, a, b) return fma(Float64(a - 0.5), b, Float64(y + x)) end
code[x_, y_, z_, t_, a_, b_] := N[(N[(a - 0.5), $MachinePrecision] * b + N[(y + x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(a - 0.5, b, y + x\right)
\end{array}
Initial program 99.8%
Taylor expanded in z around 0
+-commutativeN/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6477.4
Applied rewrites77.4%
(FPCore (x y z t a b) :precision binary64 (fma b (- a 0.5) x))
double code(double x, double y, double z, double t, double a, double b) {
return fma(b, (a - 0.5), x);
}
function code(x, y, z, t, a, b) return fma(b, Float64(a - 0.5), x) end
code[x_, y_, z_, t_, a_, b_] := N[(b * N[(a - 0.5), $MachinePrecision] + x), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(b, a - 0.5, x\right)
\end{array}
Initial program 99.8%
Taylor expanded in z around 0
+-commutativeN/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6477.4
Applied rewrites77.4%
Taylor expanded in y around 0
Applied rewrites59.3%
(FPCore (x y z t a b) :precision binary64 (* -0.5 b))
double code(double x, double y, double z, double t, double a, double b) {
return -0.5 * b;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (-0.5d0) * b
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return -0.5 * b;
}
def code(x, y, z, t, a, b): return -0.5 * b
function code(x, y, z, t, a, b) return Float64(-0.5 * b) end
function tmp = code(x, y, z, t, a, b) tmp = -0.5 * b; end
code[x_, y_, z_, t_, a_, b_] := N[(-0.5 * b), $MachinePrecision]
\begin{array}{l}
\\
-0.5 \cdot b
\end{array}
Initial program 99.8%
Taylor expanded in y around 0
*-commutativeN/A
fp-cancel-sub-sign-invN/A
mul-1-negN/A
*-commutativeN/A
mul-1-negN/A
log-recN/A
+-commutativeN/A
associate-+r+N/A
+-commutativeN/A
associate-+l+N/A
associate-+r+N/A
Applied rewrites81.7%
Taylor expanded in a around 0
Applied rewrites55.2%
Taylor expanded in z around 0
Applied rewrites33.1%
Taylor expanded in x around 0
Applied rewrites12.1%
(FPCore (x y z t a b) :precision binary64 (+ (+ (+ x y) (/ (* (- 1.0 (pow (log t) 2.0)) z) (+ 1.0 (log t)))) (* (- a 0.5) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((x + y) + (((1.0 - pow(log(t), 2.0)) * z) / (1.0 + log(t)))) + ((a - 0.5) * b);
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((x + y) + (((1.0d0 - (log(t) ** 2.0d0)) * z) / (1.0d0 + log(t)))) + ((a - 0.5d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x + y) + (((1.0 - Math.pow(Math.log(t), 2.0)) * z) / (1.0 + Math.log(t)))) + ((a - 0.5) * b);
}
def code(x, y, z, t, a, b): return ((x + y) + (((1.0 - math.pow(math.log(t), 2.0)) * z) / (1.0 + math.log(t)))) + ((a - 0.5) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x + y) + Float64(Float64(Float64(1.0 - (log(t) ^ 2.0)) * z) / Float64(1.0 + log(t)))) + Float64(Float64(a - 0.5) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((x + y) + (((1.0 - (log(t) ^ 2.0)) * z) / (1.0 + log(t)))) + ((a - 0.5) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x + y), $MachinePrecision] + N[(N[(N[(1.0 - N[Power[N[Log[t], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision] / N[(1.0 + N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x + y\right) + \frac{\left(1 - {\log t}^{2}\right) \cdot z}{1 + \log t}\right) + \left(a - 0.5\right) \cdot b
\end{array}
herbie shell --seed 2025015
(FPCore (x y z t a b)
:name "Numeric.SpecFunctions:logBeta from math-functions-0.1.5.2, A"
:precision binary64
:alt
(! :herbie-platform default (+ (+ (+ x y) (/ (* (- 1 (pow (log t) 2)) z) (+ 1 (log t)))) (* (- a 1/2) b)))
(+ (- (+ (+ x y) z) (* z (log t))) (* (- a 0.5) b)))