
(FPCore (x y z t a) :precision binary64 (+ (- (+ (log (+ x y)) (log z)) t) (* (- a 0.5) (log t))))
double code(double x, double y, double z, double t, double a) {
return ((log((x + y)) + log(z)) - t) + ((a - 0.5) * log(t));
}
real(8) function code(x, y, z, t, a)
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
code = ((log((x + y)) + log(z)) - t) + ((a - 0.5d0) * log(t))
end function
public static double code(double x, double y, double z, double t, double a) {
return ((Math.log((x + y)) + Math.log(z)) - t) + ((a - 0.5) * Math.log(t));
}
def code(x, y, z, t, a): return ((math.log((x + y)) + math.log(z)) - t) + ((a - 0.5) * math.log(t))
function code(x, y, z, t, a) return Float64(Float64(Float64(log(Float64(x + y)) + log(z)) - t) + Float64(Float64(a - 0.5) * log(t))) end
function tmp = code(x, y, z, t, a) tmp = ((log((x + y)) + log(z)) - t) + ((a - 0.5) * log(t)); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision] + N[Log[z], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision] + N[(N[(a - 0.5), $MachinePrecision] * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\log \left(x + y\right) + \log z\right) - t\right) + \left(a - 0.5\right) \cdot \log t
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ (- (+ (log (+ x y)) (log z)) t) (* (- a 0.5) (log t))))
double code(double x, double y, double z, double t, double a) {
return ((log((x + y)) + log(z)) - t) + ((a - 0.5) * log(t));
}
real(8) function code(x, y, z, t, a)
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
code = ((log((x + y)) + log(z)) - t) + ((a - 0.5d0) * log(t))
end function
public static double code(double x, double y, double z, double t, double a) {
return ((Math.log((x + y)) + Math.log(z)) - t) + ((a - 0.5) * Math.log(t));
}
def code(x, y, z, t, a): return ((math.log((x + y)) + math.log(z)) - t) + ((a - 0.5) * math.log(t))
function code(x, y, z, t, a) return Float64(Float64(Float64(log(Float64(x + y)) + log(z)) - t) + Float64(Float64(a - 0.5) * log(t))) end
function tmp = code(x, y, z, t, a) tmp = ((log((x + y)) + log(z)) - t) + ((a - 0.5) * log(t)); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision] + N[Log[z], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision] + N[(N[(a - 0.5), $MachinePrecision] * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\log \left(x + y\right) + \log z\right) - t\right) + \left(a - 0.5\right) \cdot \log t
\end{array}
(FPCore (x y z t a) :precision binary64 (+ (- (+ (log (+ x y)) (log z)) t) (* (log t) (- a 0.5))))
double code(double x, double y, double z, double t, double a) {
return ((log((x + y)) + log(z)) - t) + (log(t) * (a - 0.5));
}
real(8) function code(x, y, z, t, a)
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
code = ((log((x + y)) + log(z)) - t) + (log(t) * (a - 0.5d0))
end function
public static double code(double x, double y, double z, double t, double a) {
return ((Math.log((x + y)) + Math.log(z)) - t) + (Math.log(t) * (a - 0.5));
}
def code(x, y, z, t, a): return ((math.log((x + y)) + math.log(z)) - t) + (math.log(t) * (a - 0.5))
function code(x, y, z, t, a) return Float64(Float64(Float64(log(Float64(x + y)) + log(z)) - t) + Float64(log(t) * Float64(a - 0.5))) end
function tmp = code(x, y, z, t, a) tmp = ((log((x + y)) + log(z)) - t) + (log(t) * (a - 0.5)); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision] + N[Log[z], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision] + N[(N[Log[t], $MachinePrecision] * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\log \left(x + y\right) + \log z\right) - t\right) + \log t \cdot \left(a - 0.5\right)
\end{array}
Initial program 99.7%
Final simplification99.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ (log (+ x y)) (log z))) (t_2 (* (log t) (- a 0.5))))
(if (<= t_1 -750.0)
(- (* a (log t)) t)
(if (<= t_1 700.0) (- (+ (log (* (+ x y) z)) t_2) t) (- t_2 t)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = log((x + y)) + log(z);
double t_2 = log(t) * (a - 0.5);
double tmp;
if (t_1 <= -750.0) {
tmp = (a * log(t)) - t;
} else if (t_1 <= 700.0) {
tmp = (log(((x + y) * z)) + t_2) - t;
} else {
tmp = t_2 - t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = log((x + y)) + log(z)
t_2 = log(t) * (a - 0.5d0)
if (t_1 <= (-750.0d0)) then
tmp = (a * log(t)) - t
else if (t_1 <= 700.0d0) then
tmp = (log(((x + y) * z)) + t_2) - t
else
tmp = t_2 - t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = Math.log((x + y)) + Math.log(z);
double t_2 = Math.log(t) * (a - 0.5);
double tmp;
if (t_1 <= -750.0) {
tmp = (a * Math.log(t)) - t;
} else if (t_1 <= 700.0) {
tmp = (Math.log(((x + y) * z)) + t_2) - t;
} else {
tmp = t_2 - t;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = math.log((x + y)) + math.log(z) t_2 = math.log(t) * (a - 0.5) tmp = 0 if t_1 <= -750.0: tmp = (a * math.log(t)) - t elif t_1 <= 700.0: tmp = (math.log(((x + y) * z)) + t_2) - t else: tmp = t_2 - t return tmp
function code(x, y, z, t, a) t_1 = Float64(log(Float64(x + y)) + log(z)) t_2 = Float64(log(t) * Float64(a - 0.5)) tmp = 0.0 if (t_1 <= -750.0) tmp = Float64(Float64(a * log(t)) - t); elseif (t_1 <= 700.0) tmp = Float64(Float64(log(Float64(Float64(x + y) * z)) + t_2) - t); else tmp = Float64(t_2 - t); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = log((x + y)) + log(z); t_2 = log(t) * (a - 0.5); tmp = 0.0; if (t_1 <= -750.0) tmp = (a * log(t)) - t; elseif (t_1 <= 700.0) tmp = (log(((x + y) * z)) + t_2) - t; else tmp = t_2 - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision] + N[Log[z], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[Log[t], $MachinePrecision] * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -750.0], N[(N[(a * N[Log[t], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], If[LessEqual[t$95$1, 700.0], N[(N[(N[Log[N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision]], $MachinePrecision] + t$95$2), $MachinePrecision] - t), $MachinePrecision], N[(t$95$2 - t), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log \left(x + y\right) + \log z\\
t_2 := \log t \cdot \left(a - 0.5\right)\\
\mathbf{if}\;t\_1 \leq -750:\\
\;\;\;\;a \cdot \log t - t\\
\mathbf{elif}\;t\_1 \leq 700:\\
\;\;\;\;\left(\log \left(\left(x + y\right) \cdot z\right) + t\_2\right) - t\\
\mathbf{else}:\\
\;\;\;\;t\_2 - t\\
\end{array}
\end{array}
if (+.f64 (log.f64 (+.f64 x y)) (log.f64 z)) < -750Initial program 99.5%
Taylor expanded in x around 0
+-commutativeN/A
remove-double-negN/A
log-recN/A
mul-1-negN/A
+-lowering-+.f64N/A
log-lowering-log.f64N/A
mul-1-negN/A
log-recN/A
remove-double-negN/A
log-lowering-log.f6449.7%
Simplified49.7%
+-commutativeN/A
associate-+r-N/A
--lowering--.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
log-lowering-log.f64N/A
sum-logN/A
log-lowering-log.f64N/A
*-lowering-*.f644.0%
Applied egg-rr4.0%
Taylor expanded in a around inf
*-commutativeN/A
*-lowering-*.f64N/A
log-lowering-log.f6499.5%
Simplified99.5%
if -750 < (+.f64 (log.f64 (+.f64 x y)) (log.f64 z)) < 700Initial program 99.6%
associate--l+N/A
associate-+l+N/A
+-lowering-+.f64N/A
log-lowering-log.f64N/A
+-lowering-+.f64N/A
associate-+l-N/A
--lowering--.f64N/A
log-lowering-log.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
neg-sub0N/A
associate--r-N/A
neg-sub0N/A
+-commutativeN/A
unsub-negN/A
--lowering--.f6499.6%
Simplified99.6%
associate-+r-N/A
+-commutativeN/A
associate--r+N/A
flip3-+N/A
div-invN/A
fmm-defN/A
*-commutativeN/A
Applied egg-rr99.7%
if 700 < (+.f64 (log.f64 (+.f64 x y)) (log.f64 z)) Initial program 99.9%
Taylor expanded in t around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6475.5%
Simplified75.5%
Final simplification94.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ (log (+ x y)) (log z))))
(if (<= t_1 -750.0)
(- (* a (log t)) t)
(if (<= t_1 700.0)
(- (+ (* (log t) (+ a -0.5)) (log (* y z))) t)
(- (* (log t) (- a 0.5)) t)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = log((x + y)) + log(z);
double tmp;
if (t_1 <= -750.0) {
tmp = (a * log(t)) - t;
} else if (t_1 <= 700.0) {
tmp = ((log(t) * (a + -0.5)) + log((y * z))) - t;
} else {
tmp = (log(t) * (a - 0.5)) - t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
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) :: t_1
real(8) :: tmp
t_1 = log((x + y)) + log(z)
if (t_1 <= (-750.0d0)) then
tmp = (a * log(t)) - t
else if (t_1 <= 700.0d0) then
tmp = ((log(t) * (a + (-0.5d0))) + log((y * z))) - t
else
tmp = (log(t) * (a - 0.5d0)) - t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = Math.log((x + y)) + Math.log(z);
double tmp;
if (t_1 <= -750.0) {
tmp = (a * Math.log(t)) - t;
} else if (t_1 <= 700.0) {
tmp = ((Math.log(t) * (a + -0.5)) + Math.log((y * z))) - t;
} else {
tmp = (Math.log(t) * (a - 0.5)) - t;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = math.log((x + y)) + math.log(z) tmp = 0 if t_1 <= -750.0: tmp = (a * math.log(t)) - t elif t_1 <= 700.0: tmp = ((math.log(t) * (a + -0.5)) + math.log((y * z))) - t else: tmp = (math.log(t) * (a - 0.5)) - t return tmp
function code(x, y, z, t, a) t_1 = Float64(log(Float64(x + y)) + log(z)) tmp = 0.0 if (t_1 <= -750.0) tmp = Float64(Float64(a * log(t)) - t); elseif (t_1 <= 700.0) tmp = Float64(Float64(Float64(log(t) * Float64(a + -0.5)) + log(Float64(y * z))) - t); else tmp = Float64(Float64(log(t) * Float64(a - 0.5)) - t); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = log((x + y)) + log(z); tmp = 0.0; if (t_1 <= -750.0) tmp = (a * log(t)) - t; elseif (t_1 <= 700.0) tmp = ((log(t) * (a + -0.5)) + log((y * z))) - t; else tmp = (log(t) * (a - 0.5)) - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision] + N[Log[z], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -750.0], N[(N[(a * N[Log[t], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], If[LessEqual[t$95$1, 700.0], N[(N[(N[(N[Log[t], $MachinePrecision] * N[(a + -0.5), $MachinePrecision]), $MachinePrecision] + N[Log[N[(y * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], N[(N[(N[Log[t], $MachinePrecision] * N[(a - 0.5), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log \left(x + y\right) + \log z\\
\mathbf{if}\;t\_1 \leq -750:\\
\;\;\;\;a \cdot \log t - t\\
\mathbf{elif}\;t\_1 \leq 700:\\
\;\;\;\;\left(\log t \cdot \left(a + -0.5\right) + \log \left(y \cdot z\right)\right) - t\\
\mathbf{else}:\\
\;\;\;\;\log t \cdot \left(a - 0.5\right) - t\\
\end{array}
\end{array}
if (+.f64 (log.f64 (+.f64 x y)) (log.f64 z)) < -750Initial program 99.5%
Taylor expanded in x around 0
+-commutativeN/A
remove-double-negN/A
log-recN/A
mul-1-negN/A
+-lowering-+.f64N/A
log-lowering-log.f64N/A
mul-1-negN/A
log-recN/A
remove-double-negN/A
log-lowering-log.f6449.7%
Simplified49.7%
+-commutativeN/A
associate-+r-N/A
--lowering--.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
log-lowering-log.f64N/A
sum-logN/A
log-lowering-log.f64N/A
*-lowering-*.f644.0%
Applied egg-rr4.0%
Taylor expanded in a around inf
*-commutativeN/A
*-lowering-*.f64N/A
log-lowering-log.f6499.5%
Simplified99.5%
if -750 < (+.f64 (log.f64 (+.f64 x y)) (log.f64 z)) < 700Initial program 99.6%
Taylor expanded in x around 0
+-commutativeN/A
remove-double-negN/A
log-recN/A
mul-1-negN/A
+-lowering-+.f64N/A
log-lowering-log.f64N/A
mul-1-negN/A
log-recN/A
remove-double-negN/A
log-lowering-log.f6467.1%
Simplified67.1%
+-commutativeN/A
associate-+r-N/A
--lowering--.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
log-lowering-log.f64N/A
sum-logN/A
log-lowering-log.f64N/A
*-lowering-*.f6465.9%
Applied egg-rr65.9%
if 700 < (+.f64 (log.f64 (+.f64 x y)) (log.f64 z)) Initial program 99.9%
Taylor expanded in t around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6475.5%
Simplified75.5%
Final simplification68.7%
(FPCore (x y z t a) :precision binary64 (if (<= t 2.3e-16) (+ (log y) (+ (log z) (* (log t) (+ a -0.5)))) (- (* a (log t)) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 2.3e-16) {
tmp = log(y) + (log(z) + (log(t) * (a + -0.5)));
} else {
tmp = (a * log(t)) - t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
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) :: tmp
if (t <= 2.3d-16) then
tmp = log(y) + (log(z) + (log(t) * (a + (-0.5d0))))
else
tmp = (a * log(t)) - t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 2.3e-16) {
tmp = Math.log(y) + (Math.log(z) + (Math.log(t) * (a + -0.5)));
} else {
tmp = (a * Math.log(t)) - t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 2.3e-16: tmp = math.log(y) + (math.log(z) + (math.log(t) * (a + -0.5))) else: tmp = (a * math.log(t)) - t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 2.3e-16) tmp = Float64(log(y) + Float64(log(z) + Float64(log(t) * Float64(a + -0.5)))); else tmp = Float64(Float64(a * log(t)) - t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= 2.3e-16) tmp = log(y) + (log(z) + (log(t) * (a + -0.5))); else tmp = (a * log(t)) - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 2.3e-16], N[(N[Log[y], $MachinePrecision] + N[(N[Log[z], $MachinePrecision] + N[(N[Log[t], $MachinePrecision] * N[(a + -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * N[Log[t], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 2.3 \cdot 10^{-16}:\\
\;\;\;\;\log y + \left(\log z + \log t \cdot \left(a + -0.5\right)\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \log t - t\\
\end{array}
\end{array}
if t < 2.2999999999999999e-16Initial program 99.5%
Taylor expanded in x around 0
+-commutativeN/A
remove-double-negN/A
log-recN/A
mul-1-negN/A
+-lowering-+.f64N/A
log-lowering-log.f64N/A
mul-1-negN/A
log-recN/A
remove-double-negN/A
log-lowering-log.f6463.4%
Simplified63.4%
Taylor expanded in t around 0
+-lowering-+.f64N/A
log-lowering-log.f64N/A
+-lowering-+.f64N/A
log-lowering-log.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6463.4%
Simplified63.4%
if 2.2999999999999999e-16 < t Initial program 99.9%
Taylor expanded in x around 0
+-commutativeN/A
remove-double-negN/A
log-recN/A
mul-1-negN/A
+-lowering-+.f64N/A
log-lowering-log.f64N/A
mul-1-negN/A
log-recN/A
remove-double-negN/A
log-lowering-log.f6468.8%
Simplified68.8%
+-commutativeN/A
associate-+r-N/A
--lowering--.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
log-lowering-log.f64N/A
sum-logN/A
log-lowering-log.f64N/A
*-lowering-*.f6457.0%
Applied egg-rr57.0%
Taylor expanded in a around inf
*-commutativeN/A
*-lowering-*.f64N/A
log-lowering-log.f6497.9%
Simplified97.9%
Final simplification80.7%
(FPCore (x y z t a) :precision binary64 (+ (log (+ x y)) (+ (log z) (- (* (log t) (- a 0.5)) t))))
double code(double x, double y, double z, double t, double a) {
return log((x + y)) + (log(z) + ((log(t) * (a - 0.5)) - t));
}
real(8) function code(x, y, z, t, a)
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
code = log((x + y)) + (log(z) + ((log(t) * (a - 0.5d0)) - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return Math.log((x + y)) + (Math.log(z) + ((Math.log(t) * (a - 0.5)) - t));
}
def code(x, y, z, t, a): return math.log((x + y)) + (math.log(z) + ((math.log(t) * (a - 0.5)) - t))
function code(x, y, z, t, a) return Float64(log(Float64(x + y)) + Float64(log(z) + Float64(Float64(log(t) * Float64(a - 0.5)) - t))) end
function tmp = code(x, y, z, t, a) tmp = log((x + y)) + (log(z) + ((log(t) * (a - 0.5)) - t)); end
code[x_, y_, z_, t_, a_] := N[(N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision] + N[(N[Log[z], $MachinePrecision] + N[(N[(N[Log[t], $MachinePrecision] * N[(a - 0.5), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\log \left(x + y\right) + \left(\log z + \left(\log t \cdot \left(a - 0.5\right) - t\right)\right)
\end{array}
Initial program 99.7%
associate--l+N/A
associate-+l+N/A
+-lowering-+.f64N/A
log-lowering-log.f64N/A
+-lowering-+.f64N/A
associate-+l-N/A
--lowering--.f64N/A
log-lowering-log.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
neg-sub0N/A
associate--r-N/A
neg-sub0N/A
+-commutativeN/A
unsub-negN/A
--lowering--.f6499.7%
Simplified99.7%
Final simplification99.7%
(FPCore (x y z t a) :precision binary64 (+ (- (+ (log z) (log y)) t) (* (log t) (- a 0.5))))
double code(double x, double y, double z, double t, double a) {
return ((log(z) + log(y)) - t) + (log(t) * (a - 0.5));
}
real(8) function code(x, y, z, t, a)
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
code = ((log(z) + log(y)) - t) + (log(t) * (a - 0.5d0))
end function
public static double code(double x, double y, double z, double t, double a) {
return ((Math.log(z) + Math.log(y)) - t) + (Math.log(t) * (a - 0.5));
}
def code(x, y, z, t, a): return ((math.log(z) + math.log(y)) - t) + (math.log(t) * (a - 0.5))
function code(x, y, z, t, a) return Float64(Float64(Float64(log(z) + log(y)) - t) + Float64(log(t) * Float64(a - 0.5))) end
function tmp = code(x, y, z, t, a) tmp = ((log(z) + log(y)) - t) + (log(t) * (a - 0.5)); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(N[Log[z], $MachinePrecision] + N[Log[y], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision] + N[(N[Log[t], $MachinePrecision] * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\log z + \log y\right) - t\right) + \log t \cdot \left(a - 0.5\right)
\end{array}
Initial program 99.7%
Taylor expanded in x around 0
+-commutativeN/A
remove-double-negN/A
log-recN/A
mul-1-negN/A
+-lowering-+.f64N/A
log-lowering-log.f64N/A
mul-1-negN/A
log-recN/A
remove-double-negN/A
log-lowering-log.f6466.1%
Simplified66.1%
Final simplification66.1%
(FPCore (x y z t a) :precision binary64 (+ (log z) (+ (- (log y) t) (* (log t) (- a 0.5)))))
double code(double x, double y, double z, double t, double a) {
return log(z) + ((log(y) - t) + (log(t) * (a - 0.5)));
}
real(8) function code(x, y, z, t, a)
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
code = log(z) + ((log(y) - t) + (log(t) * (a - 0.5d0)))
end function
public static double code(double x, double y, double z, double t, double a) {
return Math.log(z) + ((Math.log(y) - t) + (Math.log(t) * (a - 0.5)));
}
def code(x, y, z, t, a): return math.log(z) + ((math.log(y) - t) + (math.log(t) * (a - 0.5)))
function code(x, y, z, t, a) return Float64(log(z) + Float64(Float64(log(y) - t) + Float64(log(t) * Float64(a - 0.5)))) end
function tmp = code(x, y, z, t, a) tmp = log(z) + ((log(y) - t) + (log(t) * (a - 0.5))); end
code[x_, y_, z_, t_, a_] := N[(N[Log[z], $MachinePrecision] + N[(N[(N[Log[y], $MachinePrecision] - t), $MachinePrecision] + N[(N[Log[t], $MachinePrecision] * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\log z + \left(\left(\log y - t\right) + \log t \cdot \left(a - 0.5\right)\right)
\end{array}
Initial program 99.7%
associate--l+N/A
associate-+l+N/A
+-lowering-+.f64N/A
log-lowering-log.f64N/A
+-lowering-+.f64N/A
associate-+l-N/A
--lowering--.f64N/A
log-lowering-log.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
neg-sub0N/A
associate--r-N/A
neg-sub0N/A
+-commutativeN/A
unsub-negN/A
--lowering--.f6499.7%
Simplified99.7%
Taylor expanded in x around 0
+-commutativeN/A
remove-double-negN/A
log-recN/A
mul-1-negN/A
associate--l+N/A
+-lowering-+.f64N/A
log-lowering-log.f64N/A
associate--r+N/A
--lowering--.f64N/A
--lowering--.f64N/A
mul-1-negN/A
log-recN/A
remove-double-negN/A
log-lowering-log.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
--lowering--.f6466.1%
Simplified66.1%
Final simplification66.1%
(FPCore (x y z t a) :precision binary64 (if (<= t 4.7e-17) (+ (* (log t) (+ a -0.5)) (log (* y z))) (- (* (log t) (- a 0.5)) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 4.7e-17) {
tmp = (log(t) * (a + -0.5)) + log((y * z));
} else {
tmp = (log(t) * (a - 0.5)) - t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
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) :: tmp
if (t <= 4.7d-17) then
tmp = (log(t) * (a + (-0.5d0))) + log((y * z))
else
tmp = (log(t) * (a - 0.5d0)) - t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 4.7e-17) {
tmp = (Math.log(t) * (a + -0.5)) + Math.log((y * z));
} else {
tmp = (Math.log(t) * (a - 0.5)) - t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 4.7e-17: tmp = (math.log(t) * (a + -0.5)) + math.log((y * z)) else: tmp = (math.log(t) * (a - 0.5)) - t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 4.7e-17) tmp = Float64(Float64(log(t) * Float64(a + -0.5)) + log(Float64(y * z))); else tmp = Float64(Float64(log(t) * Float64(a - 0.5)) - t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= 4.7e-17) tmp = (log(t) * (a + -0.5)) + log((y * z)); else tmp = (log(t) * (a - 0.5)) - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 4.7e-17], N[(N[(N[Log[t], $MachinePrecision] * N[(a + -0.5), $MachinePrecision]), $MachinePrecision] + N[Log[N[(y * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(N[Log[t], $MachinePrecision] * N[(a - 0.5), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 4.7 \cdot 10^{-17}:\\
\;\;\;\;\log t \cdot \left(a + -0.5\right) + \log \left(y \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;\log t \cdot \left(a - 0.5\right) - t\\
\end{array}
\end{array}
if t < 4.7e-17Initial program 99.5%
Taylor expanded in x around 0
+-commutativeN/A
remove-double-negN/A
log-recN/A
mul-1-negN/A
+-lowering-+.f64N/A
log-lowering-log.f64N/A
mul-1-negN/A
log-recN/A
remove-double-negN/A
log-lowering-log.f6463.2%
Simplified63.2%
+-commutativeN/A
associate-+r-N/A
--lowering--.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
log-lowering-log.f64N/A
sum-logN/A
log-lowering-log.f64N/A
*-lowering-*.f6453.7%
Applied egg-rr53.7%
Taylor expanded in t around 0
+-lowering-+.f64N/A
log-lowering-log.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6453.7%
Simplified53.7%
if 4.7e-17 < t Initial program 99.9%
Taylor expanded in t around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6497.3%
Simplified97.3%
Final simplification75.7%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (- (* a (log t)) t))) (if (<= a -0.45) t_1 (if (<= a 1.9) (- (log (+ x y)) t) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (a * log(t)) - t;
double tmp;
if (a <= -0.45) {
tmp = t_1;
} else if (a <= 1.9) {
tmp = log((x + y)) - t;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
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) :: t_1
real(8) :: tmp
t_1 = (a * log(t)) - t
if (a <= (-0.45d0)) then
tmp = t_1
else if (a <= 1.9d0) then
tmp = log((x + 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 a) {
double t_1 = (a * Math.log(t)) - t;
double tmp;
if (a <= -0.45) {
tmp = t_1;
} else if (a <= 1.9) {
tmp = Math.log((x + y)) - t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (a * math.log(t)) - t tmp = 0 if a <= -0.45: tmp = t_1 elif a <= 1.9: tmp = math.log((x + y)) - t else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(a * log(t)) - t) tmp = 0.0 if (a <= -0.45) tmp = t_1; elseif (a <= 1.9) tmp = Float64(log(Float64(x + y)) - t); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (a * log(t)) - t; tmp = 0.0; if (a <= -0.45) tmp = t_1; elseif (a <= 1.9) tmp = log((x + y)) - t; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(a * N[Log[t], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]}, If[LessEqual[a, -0.45], t$95$1, If[LessEqual[a, 1.9], N[(N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision] - t), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \log t - t\\
\mathbf{if}\;a \leq -0.45:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1.9:\\
\;\;\;\;\log \left(x + y\right) - t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -0.450000000000000011 or 1.8999999999999999 < a Initial program 99.7%
Taylor expanded in x around 0
+-commutativeN/A
remove-double-negN/A
log-recN/A
mul-1-negN/A
+-lowering-+.f64N/A
log-lowering-log.f64N/A
mul-1-negN/A
log-recN/A
remove-double-negN/A
log-lowering-log.f6469.1%
Simplified69.1%
+-commutativeN/A
associate-+r-N/A
--lowering--.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
log-lowering-log.f64N/A
sum-logN/A
log-lowering-log.f64N/A
*-lowering-*.f6458.1%
Applied egg-rr58.1%
Taylor expanded in a around inf
*-commutativeN/A
*-lowering-*.f64N/A
log-lowering-log.f6498.6%
Simplified98.6%
if -0.450000000000000011 < a < 1.8999999999999999Initial program 99.6%
associate--l+N/A
associate-+l+N/A
+-lowering-+.f64N/A
log-lowering-log.f64N/A
+-lowering-+.f64N/A
associate-+l-N/A
--lowering--.f64N/A
log-lowering-log.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
neg-sub0N/A
associate--r-N/A
neg-sub0N/A
+-commutativeN/A
unsub-negN/A
--lowering--.f6499.6%
Simplified99.6%
Taylor expanded in t around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6454.8%
Simplified54.8%
Final simplification77.6%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* a (log t)))) (if (<= a -1.1e+60) t_1 (if (<= a 1.5e+80) (- (log z) t) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = a * log(t);
double tmp;
if (a <= -1.1e+60) {
tmp = t_1;
} else if (a <= 1.5e+80) {
tmp = log(z) - t;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
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) :: t_1
real(8) :: tmp
t_1 = a * log(t)
if (a <= (-1.1d+60)) then
tmp = t_1
else if (a <= 1.5d+80) then
tmp = log(z) - t
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = a * Math.log(t);
double tmp;
if (a <= -1.1e+60) {
tmp = t_1;
} else if (a <= 1.5e+80) {
tmp = Math.log(z) - t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = a * math.log(t) tmp = 0 if a <= -1.1e+60: tmp = t_1 elif a <= 1.5e+80: tmp = math.log(z) - t else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(a * log(t)) tmp = 0.0 if (a <= -1.1e+60) tmp = t_1; elseif (a <= 1.5e+80) tmp = Float64(log(z) - t); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = a * log(t); tmp = 0.0; if (a <= -1.1e+60) tmp = t_1; elseif (a <= 1.5e+80) tmp = log(z) - t; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(a * N[Log[t], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.1e+60], t$95$1, If[LessEqual[a, 1.5e+80], N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \log t\\
\mathbf{if}\;a \leq -1.1 \cdot 10^{+60}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1.5 \cdot 10^{+80}:\\
\;\;\;\;\log z - t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -1.09999999999999998e60 or 1.49999999999999993e80 < a Initial program 99.7%
associate--l+N/A
associate-+l+N/A
+-lowering-+.f64N/A
log-lowering-log.f64N/A
+-lowering-+.f64N/A
associate-+l-N/A
--lowering--.f64N/A
log-lowering-log.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
neg-sub0N/A
associate--r-N/A
neg-sub0N/A
+-commutativeN/A
unsub-negN/A
--lowering--.f6499.7%
Simplified99.7%
Taylor expanded in a around inf
*-commutativeN/A
*-lowering-*.f64N/A
log-lowering-log.f6486.0%
Simplified86.0%
if -1.09999999999999998e60 < a < 1.49999999999999993e80Initial program 99.7%
Taylor expanded in x around 0
+-commutativeN/A
remove-double-negN/A
log-recN/A
mul-1-negN/A
+-lowering-+.f64N/A
log-lowering-log.f64N/A
mul-1-negN/A
log-recN/A
remove-double-negN/A
log-lowering-log.f6462.9%
Simplified62.9%
Taylor expanded in a around 0
associate-+r+N/A
+-commutativeN/A
associate-+r+N/A
remove-double-negN/A
log-recN/A
mul-1-negN/A
associate--l+N/A
+-lowering-+.f64N/A
log-lowering-log.f64N/A
+-commutativeN/A
mul-1-negN/A
log-recN/A
remove-double-negN/A
associate--l+N/A
+-lowering-+.f64N/A
Simplified58.5%
Taylor expanded in t around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6454.9%
Simplified54.9%
Final simplification68.1%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* a (log t)))) (if (<= a -5.2e+36) t_1 (if (<= a 2.15e+82) (- 0.0 t) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = a * log(t);
double tmp;
if (a <= -5.2e+36) {
tmp = t_1;
} else if (a <= 2.15e+82) {
tmp = 0.0 - t;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
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) :: t_1
real(8) :: tmp
t_1 = a * log(t)
if (a <= (-5.2d+36)) then
tmp = t_1
else if (a <= 2.15d+82) then
tmp = 0.0d0 - t
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = a * Math.log(t);
double tmp;
if (a <= -5.2e+36) {
tmp = t_1;
} else if (a <= 2.15e+82) {
tmp = 0.0 - t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = a * math.log(t) tmp = 0 if a <= -5.2e+36: tmp = t_1 elif a <= 2.15e+82: tmp = 0.0 - t else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(a * log(t)) tmp = 0.0 if (a <= -5.2e+36) tmp = t_1; elseif (a <= 2.15e+82) tmp = Float64(0.0 - t); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = a * log(t); tmp = 0.0; if (a <= -5.2e+36) tmp = t_1; elseif (a <= 2.15e+82) tmp = 0.0 - t; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(a * N[Log[t], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -5.2e+36], t$95$1, If[LessEqual[a, 2.15e+82], N[(0.0 - t), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \log t\\
\mathbf{if}\;a \leq -5.2 \cdot 10^{+36}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 2.15 \cdot 10^{+82}:\\
\;\;\;\;0 - t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -5.2000000000000003e36 or 2.15000000000000007e82 < a Initial program 99.7%
associate--l+N/A
associate-+l+N/A
+-lowering-+.f64N/A
log-lowering-log.f64N/A
+-lowering-+.f64N/A
associate-+l-N/A
--lowering--.f64N/A
log-lowering-log.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
neg-sub0N/A
associate--r-N/A
neg-sub0N/A
+-commutativeN/A
unsub-negN/A
--lowering--.f6499.7%
Simplified99.7%
Taylor expanded in a around inf
*-commutativeN/A
*-lowering-*.f64N/A
log-lowering-log.f6485.4%
Simplified85.4%
if -5.2000000000000003e36 < a < 2.15000000000000007e82Initial program 99.7%
associate--l+N/A
associate-+l+N/A
+-lowering-+.f64N/A
log-lowering-log.f64N/A
+-lowering-+.f64N/A
associate-+l-N/A
--lowering--.f64N/A
log-lowering-log.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
neg-sub0N/A
associate--r-N/A
neg-sub0N/A
+-commutativeN/A
unsub-negN/A
--lowering--.f6499.6%
Simplified99.6%
Taylor expanded in t around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6450.6%
Simplified50.6%
sub0-negN/A
neg-lowering-neg.f6450.6%
Applied egg-rr50.6%
Final simplification65.7%
(FPCore (x y z t a) :precision binary64 (if (<= t 1.8e-12) (log (+ x y)) (- 0.0 t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 1.8e-12) {
tmp = log((x + y));
} else {
tmp = 0.0 - t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
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) :: tmp
if (t <= 1.8d-12) then
tmp = log((x + y))
else
tmp = 0.0d0 - t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 1.8e-12) {
tmp = Math.log((x + y));
} else {
tmp = 0.0 - t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 1.8e-12: tmp = math.log((x + y)) else: tmp = 0.0 - t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 1.8e-12) tmp = log(Float64(x + y)); else tmp = Float64(0.0 - t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= 1.8e-12) tmp = log((x + y)); else tmp = 0.0 - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 1.8e-12], N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision], N[(0.0 - t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 1.8 \cdot 10^{-12}:\\
\;\;\;\;\log \left(x + y\right)\\
\mathbf{else}:\\
\;\;\;\;0 - t\\
\end{array}
\end{array}
if t < 1.8e-12Initial program 99.5%
associate--l+N/A
associate-+l+N/A
+-lowering-+.f64N/A
log-lowering-log.f64N/A
+-lowering-+.f64N/A
associate-+l-N/A
--lowering--.f64N/A
log-lowering-log.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
neg-sub0N/A
associate--r-N/A
neg-sub0N/A
+-commutativeN/A
unsub-negN/A
--lowering--.f6499.4%
Simplified99.4%
Taylor expanded in a around inf
*-commutativeN/A
*-lowering-*.f64N/A
log-lowering-log.f6457.9%
Simplified57.9%
Taylor expanded in a around 0
log-lowering-log.f64N/A
+-commutativeN/A
+-lowering-+.f649.9%
Simplified9.9%
if 1.8e-12 < t Initial program 99.9%
associate--l+N/A
associate-+l+N/A
+-lowering-+.f64N/A
log-lowering-log.f64N/A
+-lowering-+.f64N/A
associate-+l-N/A
--lowering--.f64N/A
log-lowering-log.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
neg-sub0N/A
associate--r-N/A
neg-sub0N/A
+-commutativeN/A
unsub-negN/A
--lowering--.f6499.9%
Simplified99.9%
Taylor expanded in t around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6468.8%
Simplified68.8%
sub0-negN/A
neg-lowering-neg.f6468.8%
Applied egg-rr68.8%
Final simplification38.9%
(FPCore (x y z t a) :precision binary64 (- (* (log t) (- a 0.5)) t))
double code(double x, double y, double z, double t, double a) {
return (log(t) * (a - 0.5)) - t;
}
real(8) function code(x, y, z, t, a)
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
code = (log(t) * (a - 0.5d0)) - t
end function
public static double code(double x, double y, double z, double t, double a) {
return (Math.log(t) * (a - 0.5)) - t;
}
def code(x, y, z, t, a): return (math.log(t) * (a - 0.5)) - t
function code(x, y, z, t, a) return Float64(Float64(log(t) * Float64(a - 0.5)) - t) end
function tmp = code(x, y, z, t, a) tmp = (log(t) * (a - 0.5)) - t; end
code[x_, y_, z_, t_, a_] := N[(N[(N[Log[t], $MachinePrecision] * N[(a - 0.5), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
\log t \cdot \left(a - 0.5\right) - t
\end{array}
Initial program 99.7%
Taylor expanded in t around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6476.9%
Simplified76.9%
Final simplification76.9%
(FPCore (x y z t a) :precision binary64 (if (<= t 1.05e-12) (log y) (- 0.0 t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 1.05e-12) {
tmp = log(y);
} else {
tmp = 0.0 - t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
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) :: tmp
if (t <= 1.05d-12) then
tmp = log(y)
else
tmp = 0.0d0 - t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 1.05e-12) {
tmp = Math.log(y);
} else {
tmp = 0.0 - t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 1.05e-12: tmp = math.log(y) else: tmp = 0.0 - t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 1.05e-12) tmp = log(y); else tmp = Float64(0.0 - t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= 1.05e-12) tmp = log(y); else tmp = 0.0 - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 1.05e-12], N[Log[y], $MachinePrecision], N[(0.0 - t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 1.05 \cdot 10^{-12}:\\
\;\;\;\;\log y\\
\mathbf{else}:\\
\;\;\;\;0 - t\\
\end{array}
\end{array}
if t < 1.04999999999999997e-12Initial program 99.5%
associate--l+N/A
associate-+l+N/A
+-lowering-+.f64N/A
log-lowering-log.f64N/A
+-lowering-+.f64N/A
associate-+l-N/A
--lowering--.f64N/A
log-lowering-log.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
neg-sub0N/A
associate--r-N/A
neg-sub0N/A
+-commutativeN/A
unsub-negN/A
--lowering--.f6499.4%
Simplified99.4%
Taylor expanded in a around inf
*-commutativeN/A
*-lowering-*.f64N/A
log-lowering-log.f6457.9%
Simplified57.9%
Taylor expanded in a around 0
log-lowering-log.f64N/A
+-commutativeN/A
+-lowering-+.f649.9%
Simplified9.9%
Taylor expanded in y around inf
mul-1-negN/A
log-recN/A
remove-double-negN/A
log-lowering-log.f646.3%
Simplified6.3%
if 1.04999999999999997e-12 < t Initial program 99.9%
associate--l+N/A
associate-+l+N/A
+-lowering-+.f64N/A
log-lowering-log.f64N/A
+-lowering-+.f64N/A
associate-+l-N/A
--lowering--.f64N/A
log-lowering-log.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
neg-sub0N/A
associate--r-N/A
neg-sub0N/A
+-commutativeN/A
unsub-negN/A
--lowering--.f6499.9%
Simplified99.9%
Taylor expanded in t around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6468.8%
Simplified68.8%
sub0-negN/A
neg-lowering-neg.f6468.8%
Applied egg-rr68.8%
Final simplification37.1%
(FPCore (x y z t a) :precision binary64 (- (* a (log t)) t))
double code(double x, double y, double z, double t, double a) {
return (a * log(t)) - t;
}
real(8) function code(x, y, z, t, a)
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
code = (a * log(t)) - t
end function
public static double code(double x, double y, double z, double t, double a) {
return (a * Math.log(t)) - t;
}
def code(x, y, z, t, a): return (a * math.log(t)) - t
function code(x, y, z, t, a) return Float64(Float64(a * log(t)) - t) end
function tmp = code(x, y, z, t, a) tmp = (a * log(t)) - t; end
code[x_, y_, z_, t_, a_] := N[(N[(a * N[Log[t], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
a \cdot \log t - t
\end{array}
Initial program 99.7%
Taylor expanded in x around 0
+-commutativeN/A
remove-double-negN/A
log-recN/A
mul-1-negN/A
+-lowering-+.f64N/A
log-lowering-log.f64N/A
mul-1-negN/A
log-recN/A
remove-double-negN/A
log-lowering-log.f6466.1%
Simplified66.1%
+-commutativeN/A
associate-+r-N/A
--lowering--.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
log-lowering-log.f64N/A
sum-logN/A
log-lowering-log.f64N/A
*-lowering-*.f6455.2%
Applied egg-rr55.2%
Taylor expanded in a around inf
*-commutativeN/A
*-lowering-*.f64N/A
log-lowering-log.f6474.2%
Simplified74.2%
Final simplification74.2%
(FPCore (x y z t a) :precision binary64 (- 0.0 t))
double code(double x, double y, double z, double t, double a) {
return 0.0 - t;
}
real(8) function code(x, y, z, t, a)
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
code = 0.0d0 - t
end function
public static double code(double x, double y, double z, double t, double a) {
return 0.0 - t;
}
def code(x, y, z, t, a): return 0.0 - t
function code(x, y, z, t, a) return Float64(0.0 - t) end
function tmp = code(x, y, z, t, a) tmp = 0.0 - t; end
code[x_, y_, z_, t_, a_] := N[(0.0 - t), $MachinePrecision]
\begin{array}{l}
\\
0 - t
\end{array}
Initial program 99.7%
associate--l+N/A
associate-+l+N/A
+-lowering-+.f64N/A
log-lowering-log.f64N/A
+-lowering-+.f64N/A
associate-+l-N/A
--lowering--.f64N/A
log-lowering-log.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
neg-sub0N/A
associate--r-N/A
neg-sub0N/A
+-commutativeN/A
unsub-negN/A
--lowering--.f6499.7%
Simplified99.7%
Taylor expanded in t around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6435.2%
Simplified35.2%
sub0-negN/A
neg-lowering-neg.f6435.2%
Applied egg-rr35.2%
Final simplification35.2%
(FPCore (x y z t a) :precision binary64 (+ (log (+ x y)) (+ (- (log z) t) (* (- a 0.5) (log t)))))
double code(double x, double y, double z, double t, double a) {
return log((x + y)) + ((log(z) - t) + ((a - 0.5) * log(t)));
}
real(8) function code(x, y, z, t, a)
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
code = log((x + y)) + ((log(z) - t) + ((a - 0.5d0) * log(t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return Math.log((x + y)) + ((Math.log(z) - t) + ((a - 0.5) * Math.log(t)));
}
def code(x, y, z, t, a): return math.log((x + y)) + ((math.log(z) - t) + ((a - 0.5) * math.log(t)))
function code(x, y, z, t, a) return Float64(log(Float64(x + y)) + Float64(Float64(log(z) - t) + Float64(Float64(a - 0.5) * log(t)))) end
function tmp = code(x, y, z, t, a) tmp = log((x + y)) + ((log(z) - t) + ((a - 0.5) * log(t))); end
code[x_, y_, z_, t_, a_] := N[(N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision] + N[(N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision] + N[(N[(a - 0.5), $MachinePrecision] * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\log \left(x + y\right) + \left(\left(\log z - t\right) + \left(a - 0.5\right) \cdot \log t\right)
\end{array}
herbie shell --seed 2024158
(FPCore (x y z t a)
:name "Numeric.SpecFunctions:logGammaL from math-functions-0.1.5.2"
:precision binary64
:alt
(! :herbie-platform default (+ (log (+ x y)) (+ (- (log z) t) (* (- a 1/2) (log t)))))
(+ (- (+ (log (+ x y)) (log z)) t) (* (- a 0.5) (log t))))