
(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 19 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) (* (- 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}
Initial program 99.7%
(FPCore (x y z t a)
:precision binary64
(if (<= (- a 0.5) -40000000.0)
(- (* (- a 0.5) (log t)) t)
(if (<= (- a 0.5) -0.2)
(+ (log y) (+ (log z) (- (* (log t) -0.5) t)))
(+ (- (log z) t) (* a (log t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a - 0.5) <= -40000000.0) {
tmp = ((a - 0.5) * log(t)) - t;
} else if ((a - 0.5) <= -0.2) {
tmp = log(y) + (log(z) + ((log(t) * -0.5) - t));
} else {
tmp = (log(z) - t) + (a * log(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 ((a - 0.5d0) <= (-40000000.0d0)) then
tmp = ((a - 0.5d0) * log(t)) - t
else if ((a - 0.5d0) <= (-0.2d0)) then
tmp = log(y) + (log(z) + ((log(t) * (-0.5d0)) - t))
else
tmp = (log(z) - t) + (a * log(t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a - 0.5) <= -40000000.0) {
tmp = ((a - 0.5) * Math.log(t)) - t;
} else if ((a - 0.5) <= -0.2) {
tmp = Math.log(y) + (Math.log(z) + ((Math.log(t) * -0.5) - t));
} else {
tmp = (Math.log(z) - t) + (a * Math.log(t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a - 0.5) <= -40000000.0: tmp = ((a - 0.5) * math.log(t)) - t elif (a - 0.5) <= -0.2: tmp = math.log(y) + (math.log(z) + ((math.log(t) * -0.5) - t)) else: tmp = (math.log(z) - t) + (a * math.log(t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(a - 0.5) <= -40000000.0) tmp = Float64(Float64(Float64(a - 0.5) * log(t)) - t); elseif (Float64(a - 0.5) <= -0.2) tmp = Float64(log(y) + Float64(log(z) + Float64(Float64(log(t) * -0.5) - t))); else tmp = Float64(Float64(log(z) - t) + Float64(a * log(t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a - 0.5) <= -40000000.0) tmp = ((a - 0.5) * log(t)) - t; elseif ((a - 0.5) <= -0.2) tmp = log(y) + (log(z) + ((log(t) * -0.5) - t)); else tmp = (log(z) - t) + (a * log(t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a - 0.5), $MachinePrecision], -40000000.0], N[(N[(N[(a - 0.5), $MachinePrecision] * N[Log[t], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], If[LessEqual[N[(a - 0.5), $MachinePrecision], -0.2], N[(N[Log[y], $MachinePrecision] + N[(N[Log[z], $MachinePrecision] + N[(N[(N[Log[t], $MachinePrecision] * -0.5), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision] + N[(a * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a - 0.5 \leq -40000000:\\
\;\;\;\;\left(a - 0.5\right) \cdot \log t - t\\
\mathbf{elif}\;a - 0.5 \leq -0.2:\\
\;\;\;\;\log y + \left(\log z + \left(\log t \cdot -0.5 - t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\log z - t\right) + a \cdot \log t\\
\end{array}
\end{array}
if (-.f64 a #s(literal 1/2 binary64)) < -4e7Initial program 99.8%
Taylor expanded in t around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6499.1%
Simplified99.1%
if -4e7 < (-.f64 a #s(literal 1/2 binary64)) < -0.20000000000000001Initial program 99.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
--lowering--.f64N/A
mul-1-negN/A
log-recN/A
remove-double-negN/A
log-lowering-log.f6466.6%
Simplified66.6%
Taylor expanded in a around 0
associate--l+N/A
remove-double-negN/A
log-recN/A
mul-1-negN/A
+-lowering-+.f64N/A
mul-1-negN/A
log-recN/A
remove-double-negN/A
log-lowering-log.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
log-lowering-log.f64N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
log-lowering-log.f6466.6%
Simplified66.6%
if -0.20000000000000001 < (-.f64 a #s(literal 1/2 binary64)) Initial program 99.5%
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
--lowering--.f64N/A
mul-1-negN/A
log-recN/A
remove-double-negN/A
log-lowering-log.f6478.6%
Simplified78.6%
Taylor expanded in t around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6498.8%
Simplified98.8%
Taylor expanded in a around inf
*-commutativeN/A
*-lowering-*.f64N/A
log-lowering-log.f6498.8%
Simplified98.8%
Final simplification82.5%
(FPCore (x y z t a) :precision binary64 (if (<= t 2.7) (+ (log z) (+ (log y) (* (log t) (+ a -0.5)))) (+ (- (log z) t) (* a (log t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 2.7) {
tmp = log(z) + (log(y) + (log(t) * (a + -0.5)));
} else {
tmp = (log(z) - t) + (a * log(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.7d0) then
tmp = log(z) + (log(y) + (log(t) * (a + (-0.5d0))))
else
tmp = (log(z) - t) + (a * log(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.7) {
tmp = Math.log(z) + (Math.log(y) + (Math.log(t) * (a + -0.5)));
} else {
tmp = (Math.log(z) - t) + (a * Math.log(t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 2.7: tmp = math.log(z) + (math.log(y) + (math.log(t) * (a + -0.5))) else: tmp = (math.log(z) - t) + (a * math.log(t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 2.7) tmp = Float64(log(z) + Float64(log(y) + Float64(log(t) * Float64(a + -0.5)))); else tmp = Float64(Float64(log(z) - t) + Float64(a * log(t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= 2.7) tmp = log(z) + (log(y) + (log(t) * (a + -0.5))); else tmp = (log(z) - t) + (a * log(t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 2.7], N[(N[Log[z], $MachinePrecision] + N[(N[Log[y], $MachinePrecision] + N[(N[Log[t], $MachinePrecision] * N[(a + -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision] + N[(a * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 2.7:\\
\;\;\;\;\log z + \left(\log y + \log t \cdot \left(a + -0.5\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\log z - t\right) + a \cdot \log t\\
\end{array}
\end{array}
if t < 2.7000000000000002Initial program 99.5%
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
--lowering--.f64N/A
mul-1-negN/A
log-recN/A
remove-double-negN/A
log-lowering-log.f6471.1%
Simplified71.1%
Taylor expanded in t around 0
+-commutativeN/A
remove-double-negN/A
log-recN/A
mul-1-negN/A
associate-+r+N/A
+-commutativeN/A
+-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-+.f64N/A
mul-1-negN/A
log-recN/A
remove-double-negN/A
log-lowering-log.f6470.0%
Simplified70.0%
if 2.7000000000000002 < t Initial program 99.9%
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
--lowering--.f64N/A
mul-1-negN/A
log-recN/A
remove-double-negN/A
log-lowering-log.f6476.6%
Simplified76.6%
Taylor expanded in t around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6498.9%
Simplified98.9%
Taylor expanded in a around inf
*-commutativeN/A
*-lowering-*.f64N/A
log-lowering-log.f6498.9%
Simplified98.9%
Final simplification84.9%
(FPCore (x y z t a) :precision binary64 (+ (log (+ x y)) (+ (log z) (- (* (- a 0.5) (log t)) t))))
double code(double x, double y, double z, double t, double a) {
return log((x + y)) + (log(z) + (((a - 0.5) * 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 = log((x + y)) + (log(z) + (((a - 0.5d0) * log(t)) - 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) + (((a - 0.5) * Math.log(t)) - t));
}
def code(x, y, z, t, a): return math.log((x + y)) + (math.log(z) + (((a - 0.5) * math.log(t)) - t))
function code(x, y, z, t, a) return Float64(log(Float64(x + y)) + Float64(log(z) + Float64(Float64(Float64(a - 0.5) * log(t)) - t))) end
function tmp = code(x, y, z, t, a) tmp = log((x + y)) + (log(z) + (((a - 0.5) * log(t)) - t)); end
code[x_, y_, z_, t_, a_] := N[(N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision] + N[(N[Log[z], $MachinePrecision] + N[(N[(N[(a - 0.5), $MachinePrecision] * N[Log[t], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\log \left(x + y\right) + \left(\log z + \left(\left(a - 0.5\right) \cdot \log t - 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.6%
Simplified99.6%
Final simplification99.6%
(FPCore (x y z t a) :precision binary64 (+ (+ (log z) (- (log y) t)) (* (- a 0.5) (log t))))
double code(double x, double y, double z, double t, double a) {
return (log(z) + (log(y) - 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(z) + (log(y) - 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(z) + (Math.log(y) - t)) + ((a - 0.5) * Math.log(t));
}
def code(x, y, z, t, a): return (math.log(z) + (math.log(y) - t)) + ((a - 0.5) * math.log(t))
function code(x, y, z, t, a) return Float64(Float64(log(z) + Float64(log(y) - t)) + Float64(Float64(a - 0.5) * log(t))) end
function tmp = code(x, y, z, t, a) tmp = (log(z) + (log(y) - t)) + ((a - 0.5) * log(t)); end
code[x_, y_, z_, t_, a_] := N[(N[(N[Log[z], $MachinePrecision] + N[(N[Log[y], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision] + N[(N[(a - 0.5), $MachinePrecision] * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\log z + \left(\log y - t\right)\right) + \left(a - 0.5\right) \cdot \log 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
associate--l+N/A
+-lowering-+.f64N/A
log-lowering-log.f64N/A
--lowering--.f64N/A
mul-1-negN/A
log-recN/A
remove-double-negN/A
log-lowering-log.f6473.9%
Simplified73.9%
(FPCore (x y z t a) :precision binary64 (+ (log z) (+ (- (log y) t) (* (- a 0.5) (log t)))))
double code(double x, double y, double z, double t, double a) {
return log(z) + ((log(y) - 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(z) + ((log(y) - 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(z) + ((Math.log(y) - t) + ((a - 0.5) * Math.log(t)));
}
def code(x, y, z, t, a): return math.log(z) + ((math.log(y) - t) + ((a - 0.5) * math.log(t)))
function code(x, y, z, t, a) return Float64(log(z) + Float64(Float64(log(y) - t) + Float64(Float64(a - 0.5) * log(t)))) end
function tmp = code(x, y, z, t, a) tmp = log(z) + ((log(y) - t) + ((a - 0.5) * log(t))); end
code[x_, y_, z_, t_, a_] := N[(N[Log[z], $MachinePrecision] + N[(N[(N[Log[y], $MachinePrecision] - t), $MachinePrecision] + N[(N[(a - 0.5), $MachinePrecision] * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\log z + \left(\left(\log y - t\right) + \left(a - 0.5\right) \cdot \log t\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.6%
Simplified99.6%
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--.f6473.9%
Simplified73.9%
Final simplification73.9%
(FPCore (x y z t a) :precision binary64 (+ (+ (log z) (- (* (- a 0.5) (log t)) t)) (log y)))
double code(double x, double y, double z, double t, double a) {
return (log(z) + (((a - 0.5) * log(t)) - t)) + log(y);
}
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) + (((a - 0.5d0) * log(t)) - t)) + log(y)
end function
public static double code(double x, double y, double z, double t, double a) {
return (Math.log(z) + (((a - 0.5) * Math.log(t)) - t)) + Math.log(y);
}
def code(x, y, z, t, a): return (math.log(z) + (((a - 0.5) * math.log(t)) - t)) + math.log(y)
function code(x, y, z, t, a) return Float64(Float64(log(z) + Float64(Float64(Float64(a - 0.5) * log(t)) - t)) + log(y)) end
function tmp = code(x, y, z, t, a) tmp = (log(z) + (((a - 0.5) * log(t)) - t)) + log(y); end
code[x_, y_, z_, t_, a_] := N[(N[(N[Log[z], $MachinePrecision] + N[(N[(N[(a - 0.5), $MachinePrecision] * N[Log[t], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision] + N[Log[y], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\log z + \left(\left(a - 0.5\right) \cdot \log t - t\right)\right) + \log y
\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.6%
Simplified99.6%
Taylor expanded in x around 0
log-lowering-log.f6473.9%
Simplified73.9%
Final simplification73.9%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* (- a 0.5) (log t)))) (if (<= t 5e+16) (- (+ (log (* (+ x y) z)) t_1) t) (- t_1 t))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (a - 0.5) * log(t);
double tmp;
if (t <= 5e+16) {
tmp = (log(((x + y) * z)) + t_1) - t;
} else {
tmp = t_1 - 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 = (a - 0.5d0) * log(t)
if (t <= 5d+16) then
tmp = (log(((x + y) * z)) + t_1) - t
else
tmp = t_1 - t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (a - 0.5) * Math.log(t);
double tmp;
if (t <= 5e+16) {
tmp = (Math.log(((x + y) * z)) + t_1) - t;
} else {
tmp = t_1 - t;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (a - 0.5) * math.log(t) tmp = 0 if t <= 5e+16: tmp = (math.log(((x + y) * z)) + t_1) - t else: tmp = t_1 - t return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(a - 0.5) * log(t)) tmp = 0.0 if (t <= 5e+16) tmp = Float64(Float64(log(Float64(Float64(x + y) * z)) + t_1) - t); else tmp = Float64(t_1 - t); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (a - 0.5) * log(t); tmp = 0.0; if (t <= 5e+16) tmp = (log(((x + y) * z)) + t_1) - t; else tmp = t_1 - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(a - 0.5), $MachinePrecision] * N[Log[t], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, 5e+16], N[(N[(N[Log[N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision]], $MachinePrecision] + t$95$1), $MachinePrecision] - t), $MachinePrecision], N[(t$95$1 - t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a - 0.5\right) \cdot \log t\\
\mathbf{if}\;t \leq 5 \cdot 10^{+16}:\\
\;\;\;\;\left(\log \left(\left(x + y\right) \cdot z\right) + t\_1\right) - t\\
\mathbf{else}:\\
\;\;\;\;t\_1 - t\\
\end{array}
\end{array}
if t < 5e16Initial 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%
associate-+r-N/A
+-commutativeN/A
associate--r+N/A
flip3-+N/A
div-invN/A
fmm-defN/A
*-commutativeN/A
Applied egg-rr74.2%
if 5e16 < t Initial program 99.9%
Taylor expanded in t around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6499.9%
Simplified99.9%
Final simplification86.7%
(FPCore (x y z t a) :precision binary64 (if (<= t 5e+16) (- (+ (* (log t) (+ a -0.5)) (log (* y z))) t) (- (* (- a 0.5) (log t)) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 5e+16) {
tmp = ((log(t) * (a + -0.5)) + log((y * z))) - t;
} else {
tmp = ((a - 0.5) * 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 <= 5d+16) then
tmp = ((log(t) * (a + (-0.5d0))) + log((y * z))) - t
else
tmp = ((a - 0.5d0) * 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 <= 5e+16) {
tmp = ((Math.log(t) * (a + -0.5)) + Math.log((y * z))) - t;
} else {
tmp = ((a - 0.5) * Math.log(t)) - t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 5e+16: tmp = ((math.log(t) * (a + -0.5)) + math.log((y * z))) - t else: tmp = ((a - 0.5) * math.log(t)) - t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 5e+16) tmp = Float64(Float64(Float64(log(t) * Float64(a + -0.5)) + log(Float64(y * z))) - t); else tmp = Float64(Float64(Float64(a - 0.5) * log(t)) - t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= 5e+16) tmp = ((log(t) * (a + -0.5)) + log((y * z))) - t; else tmp = ((a - 0.5) * log(t)) - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 5e+16], 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[(a - 0.5), $MachinePrecision] * N[Log[t], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 5 \cdot 10^{+16}:\\
\;\;\;\;\left(\log t \cdot \left(a + -0.5\right) + \log \left(y \cdot z\right)\right) - t\\
\mathbf{else}:\\
\;\;\;\;\left(a - 0.5\right) \cdot \log t - t\\
\end{array}
\end{array}
if t < 5e16Initial program 99.5%
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
--lowering--.f64N/A
mul-1-negN/A
log-recN/A
remove-double-negN/A
log-lowering-log.f6470.5%
Simplified70.5%
+-commutativeN/A
associate-+r-N/A
associate-+r-N/A
--lowering--.f64N/A
+-lowering-+.f64N/A
sub-negN/A
metadata-evalN/A
*-commutativeN/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
+-lowering-+.f64N/A
sum-logN/A
log-lowering-log.f64N/A
*-lowering-*.f6455.9%
Applied egg-rr55.9%
if 5e16 < t Initial program 99.9%
Taylor expanded in t around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6499.9%
Simplified99.9%
Final simplification77.4%
(FPCore (x y z t a) :precision binary64 (if (<= t 0.8) (+ (* (log t) (+ a -0.5)) (log (* (+ x y) z))) (+ (- (log z) t) (* a (log t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 0.8) {
tmp = (log(t) * (a + -0.5)) + log(((x + y) * z));
} else {
tmp = (log(z) - t) + (a * log(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 <= 0.8d0) then
tmp = (log(t) * (a + (-0.5d0))) + log(((x + y) * z))
else
tmp = (log(z) - t) + (a * log(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 <= 0.8) {
tmp = (Math.log(t) * (a + -0.5)) + Math.log(((x + y) * z));
} else {
tmp = (Math.log(z) - t) + (a * Math.log(t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 0.8: tmp = (math.log(t) * (a + -0.5)) + math.log(((x + y) * z)) else: tmp = (math.log(z) - t) + (a * math.log(t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 0.8) tmp = Float64(Float64(log(t) * Float64(a + -0.5)) + log(Float64(Float64(x + y) * z))); else tmp = Float64(Float64(log(z) - t) + Float64(a * log(t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= 0.8) tmp = (log(t) * (a + -0.5)) + log(((x + y) * z)); else tmp = (log(z) - t) + (a * log(t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 0.8], N[(N[(N[Log[t], $MachinePrecision] * N[(a + -0.5), $MachinePrecision]), $MachinePrecision] + N[Log[N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision] + N[(a * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 0.8:\\
\;\;\;\;\log t \cdot \left(a + -0.5\right) + \log \left(\left(x + y\right) \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\log z - t\right) + a \cdot \log t\\
\end{array}
\end{array}
if t < 0.80000000000000004Initial program 99.5%
+-commutativeN/A
fma-defineN/A
fma-lowering-fma.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
log-lowering-log.f64N/A
--lowering--.f64N/A
sum-logN/A
log-lowering-log.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f6473.5%
Applied egg-rr73.5%
Taylor expanded in t around 0
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
log-lowering-log.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f6472.0%
Simplified72.0%
if 0.80000000000000004 < t Initial program 99.9%
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
--lowering--.f64N/A
mul-1-negN/A
log-recN/A
remove-double-negN/A
log-lowering-log.f6476.6%
Simplified76.6%
Taylor expanded in t around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6498.9%
Simplified98.9%
Taylor expanded in a around inf
*-commutativeN/A
*-lowering-*.f64N/A
log-lowering-log.f6498.9%
Simplified98.9%
Final simplification85.9%
(FPCore (x y z t a) :precision binary64 (if (<= t 0.8) (+ (* (log t) (+ a -0.5)) (log (* y z))) (+ (- (log z) t) (* a (log t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 0.8) {
tmp = (log(t) * (a + -0.5)) + log((y * z));
} else {
tmp = (log(z) - t) + (a * log(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 <= 0.8d0) then
tmp = (log(t) * (a + (-0.5d0))) + log((y * z))
else
tmp = (log(z) - t) + (a * log(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 <= 0.8) {
tmp = (Math.log(t) * (a + -0.5)) + Math.log((y * z));
} else {
tmp = (Math.log(z) - t) + (a * Math.log(t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 0.8: tmp = (math.log(t) * (a + -0.5)) + math.log((y * z)) else: tmp = (math.log(z) - t) + (a * math.log(t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 0.8) tmp = Float64(Float64(log(t) * Float64(a + -0.5)) + log(Float64(y * z))); else tmp = Float64(Float64(log(z) - t) + Float64(a * log(t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= 0.8) tmp = (log(t) * (a + -0.5)) + log((y * z)); else tmp = (log(z) - t) + (a * log(t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 0.8], N[(N[(N[Log[t], $MachinePrecision] * N[(a + -0.5), $MachinePrecision]), $MachinePrecision] + N[Log[N[(y * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision] + N[(a * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 0.8:\\
\;\;\;\;\log t \cdot \left(a + -0.5\right) + \log \left(y \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\log z - t\right) + a \cdot \log t\\
\end{array}
\end{array}
if t < 0.80000000000000004Initial program 99.5%
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
--lowering--.f64N/A
mul-1-negN/A
log-recN/A
remove-double-negN/A
log-lowering-log.f6471.1%
Simplified71.1%
Taylor expanded in t around 0
+-commutativeN/A
remove-double-negN/A
log-recN/A
mul-1-negN/A
associate-+r+N/A
+-commutativeN/A
+-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-+.f64N/A
mul-1-negN/A
log-recN/A
remove-double-negN/A
log-lowering-log.f6470.0%
Simplified70.0%
associate-+r+N/A
+-commutativeN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
+-lowering-+.f64N/A
sum-logN/A
log-lowering-log.f64N/A
*-lowering-*.f6454.6%
Applied egg-rr54.6%
if 0.80000000000000004 < t Initial program 99.9%
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
--lowering--.f64N/A
mul-1-negN/A
log-recN/A
remove-double-negN/A
log-lowering-log.f6476.6%
Simplified76.6%
Taylor expanded in t around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6498.9%
Simplified98.9%
Taylor expanded in a around inf
*-commutativeN/A
*-lowering-*.f64N/A
log-lowering-log.f6498.9%
Simplified98.9%
Final simplification77.5%
(FPCore (x y z t a) :precision binary64 (if (<= t 2.3) (+ (* (log t) (+ a -0.5)) (log (* y z))) (- (* (- a 0.5) (log t)) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 2.3) {
tmp = (log(t) * (a + -0.5)) + log((y * z));
} else {
tmp = ((a - 0.5) * 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.3d0) then
tmp = (log(t) * (a + (-0.5d0))) + log((y * z))
else
tmp = ((a - 0.5d0) * 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.3) {
tmp = (Math.log(t) * (a + -0.5)) + Math.log((y * z));
} else {
tmp = ((a - 0.5) * Math.log(t)) - t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 2.3: tmp = (math.log(t) * (a + -0.5)) + math.log((y * z)) else: tmp = ((a - 0.5) * math.log(t)) - t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 2.3) tmp = Float64(Float64(log(t) * Float64(a + -0.5)) + log(Float64(y * z))); else tmp = Float64(Float64(Float64(a - 0.5) * log(t)) - t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= 2.3) tmp = (log(t) * (a + -0.5)) + log((y * z)); else tmp = ((a - 0.5) * log(t)) - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 2.3], N[(N[(N[Log[t], $MachinePrecision] * N[(a + -0.5), $MachinePrecision]), $MachinePrecision] + N[Log[N[(y * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(N[(a - 0.5), $MachinePrecision] * N[Log[t], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 2.3:\\
\;\;\;\;\log t \cdot \left(a + -0.5\right) + \log \left(y \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;\left(a - 0.5\right) \cdot \log t - t\\
\end{array}
\end{array}
if t < 2.2999999999999998Initial program 99.5%
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
--lowering--.f64N/A
mul-1-negN/A
log-recN/A
remove-double-negN/A
log-lowering-log.f6471.1%
Simplified71.1%
Taylor expanded in t around 0
+-commutativeN/A
remove-double-negN/A
log-recN/A
mul-1-negN/A
associate-+r+N/A
+-commutativeN/A
+-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-+.f64N/A
mul-1-negN/A
log-recN/A
remove-double-negN/A
log-lowering-log.f6470.0%
Simplified70.0%
associate-+r+N/A
+-commutativeN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
+-lowering-+.f64N/A
sum-logN/A
log-lowering-log.f64N/A
*-lowering-*.f6454.6%
Applied egg-rr54.6%
if 2.2999999999999998 < t Initial program 99.9%
Taylor expanded in t around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6498.9%
Simplified98.9%
Final simplification77.5%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* a (log t)))) (if (<= a -3e+32) t_1 (if (<= a 6e+16) (- (log (+ x y)) 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 <= -3e+32) {
tmp = t_1;
} else if (a <= 6e+16) {
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)
if (a <= (-3d+32)) then
tmp = t_1
else if (a <= 6d+16) 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);
double tmp;
if (a <= -3e+32) {
tmp = t_1;
} else if (a <= 6e+16) {
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) tmp = 0 if a <= -3e+32: tmp = t_1 elif a <= 6e+16: tmp = math.log((x + y)) - 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 <= -3e+32) tmp = t_1; elseif (a <= 6e+16) 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); tmp = 0.0; if (a <= -3e+32) tmp = t_1; elseif (a <= 6e+16) 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[(a * N[Log[t], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -3e+32], t$95$1, If[LessEqual[a, 6e+16], 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\\
\mathbf{if}\;a \leq -3 \cdot 10^{+32}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 6 \cdot 10^{+16}:\\
\;\;\;\;\log \left(x + y\right) - t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -3e32 or 6e16 < a Initial 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 a around inf
*-commutativeN/A
*-lowering-*.f64N/A
log-lowering-log.f6479.9%
Simplified79.9%
if -3e32 < a < 6e16Initial 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--.f6457.8%
Simplified57.8%
Final simplification67.8%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* a (log t)))) (if (<= a -1.02e+34) t_1 (if (<= a 1.22e+16) (- 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 <= -1.02e+34) {
tmp = t_1;
} else if (a <= 1.22e+16) {
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 <= (-1.02d+34)) then
tmp = t_1
else if (a <= 1.22d+16) 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 <= -1.02e+34) {
tmp = t_1;
} else if (a <= 1.22e+16) {
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 <= -1.02e+34: tmp = t_1 elif a <= 1.22e+16: 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 <= -1.02e+34) tmp = t_1; elseif (a <= 1.22e+16) 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 <= -1.02e+34) tmp = t_1; elseif (a <= 1.22e+16) 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, -1.02e+34], t$95$1, If[LessEqual[a, 1.22e+16], N[(0.0 - t), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \log t\\
\mathbf{if}\;a \leq -1.02 \cdot 10^{+34}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1.22 \cdot 10^{+16}:\\
\;\;\;\;0 - t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -1.02e34 or 1.22e16 < a Initial 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 a around inf
*-commutativeN/A
*-lowering-*.f64N/A
log-lowering-log.f6479.9%
Simplified79.9%
if -1.02e34 < a < 1.22e16Initial 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--.f6451.4%
Simplified51.4%
sub0-negN/A
neg-lowering-neg.f6451.4%
Applied egg-rr51.4%
Final simplification64.3%
(FPCore (x y z t a) :precision binary64 (if (<= t 0.76) (log (+ x y)) (- 0.0 t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 0.76) {
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 <= 0.76d0) 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 <= 0.76) {
tmp = Math.log((x + y));
} else {
tmp = 0.0 - t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 0.76: tmp = math.log((x + y)) else: tmp = 0.0 - t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 0.76) 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 <= 0.76) tmp = log((x + y)); else tmp = 0.0 - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 0.76], N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision], N[(0.0 - t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 0.76:\\
\;\;\;\;\log \left(x + y\right)\\
\mathbf{else}:\\
\;\;\;\;0 - t\\
\end{array}
\end{array}
if t < 0.76000000000000001Initial program 99.4%
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.f6455.9%
Simplified55.9%
Taylor expanded in a around 0
log-lowering-log.f64N/A
+-commutativeN/A
+-lowering-+.f6410.4%
Simplified10.4%
if 0.76000000000000001 < 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.4%
Simplified68.4%
sub0-negN/A
neg-lowering-neg.f6468.4%
Applied egg-rr68.4%
Final simplification40.5%
(FPCore (x y z t a) :precision binary64 (- (* (- a 0.5) (log t)) t))
double code(double x, double y, double z, double t, double a) {
return ((a - 0.5) * 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 - 0.5d0) * log(t)) - t
end function
public static double code(double x, double y, double z, double t, double a) {
return ((a - 0.5) * Math.log(t)) - t;
}
def code(x, y, z, t, a): return ((a - 0.5) * math.log(t)) - t
function code(x, y, z, t, a) return Float64(Float64(Float64(a - 0.5) * log(t)) - t) end
function tmp = code(x, y, z, t, a) tmp = ((a - 0.5) * log(t)) - t; end
code[x_, y_, z_, t_, a_] := N[(N[(N[(a - 0.5), $MachinePrecision] * N[Log[t], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
\left(a - 0.5\right) \cdot \log t - t
\end{array}
Initial program 99.7%
Taylor expanded in t around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6477.2%
Simplified77.2%
Final simplification77.2%
(FPCore (x y z t a) :precision binary64 (if (<= t 0.76) (log y) (- 0.0 t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 0.76) {
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 <= 0.76d0) 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 <= 0.76) {
tmp = Math.log(y);
} else {
tmp = 0.0 - t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 0.76: tmp = math.log(y) else: tmp = 0.0 - t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 0.76) 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 <= 0.76) tmp = log(y); else tmp = 0.0 - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 0.76], N[Log[y], $MachinePrecision], N[(0.0 - t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 0.76:\\
\;\;\;\;\log y\\
\mathbf{else}:\\
\;\;\;\;0 - t\\
\end{array}
\end{array}
if t < 0.76000000000000001Initial program 99.4%
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.f6455.9%
Simplified55.9%
Taylor expanded in a around 0
log-lowering-log.f64N/A
+-commutativeN/A
+-lowering-+.f6410.4%
Simplified10.4%
Taylor expanded in y around inf
mul-1-negN/A
log-recN/A
remove-double-negN/A
log-lowering-log.f646.9%
Simplified6.9%
if 0.76000000000000001 < 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.4%
Simplified68.4%
sub0-negN/A
neg-lowering-neg.f6468.4%
Applied egg-rr68.4%
Final simplification38.8%
(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.6%
Simplified99.6%
Taylor expanded in t around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6436.8%
Simplified36.8%
sub0-negN/A
neg-lowering-neg.f6436.8%
Applied egg-rr36.8%
Final simplification36.8%
(FPCore (x y z t a) :precision binary64 t)
double code(double x, double y, double z, double t, double a) {
return 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 = t
end function
public static double code(double x, double y, double z, double t, double a) {
return t;
}
def code(x, y, z, t, a): return t
function code(x, y, z, t, a) return t end
function tmp = code(x, y, z, t, a) tmp = t; end
code[x_, y_, z_, t_, a_] := t
\begin{array}{l}
\\
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.6%
Simplified99.6%
Taylor expanded in t around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6436.8%
Simplified36.8%
sub0-negN/A
neg-lowering-neg.f6436.8%
Applied egg-rr36.8%
neg-sub0N/A
flip3--N/A
metadata-evalN/A
sub-negN/A
metadata-evalN/A
cube-negN/A
neg-sub0N/A
sqr-powN/A
pow-prod-downN/A
neg-sub0N/A
neg-sub0N/A
sqr-negN/A
pow-prod-downN/A
sqr-powN/A
fma-defineN/A
mul0-lftN/A
metadata-evalN/A
fmm-defN/A
mul0-lftN/A
flip3-+N/A
+-lft-identity2.6%
Applied egg-rr2.6%
(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 2024161
(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))))