
(FPCore (x y z t) :precision binary64 :pre TRUE (+ (- (- (* x (log y)) y) z) (log t)))
double code(double x, double y, double z, double t) {
return (((x * log(y)) - y) - z) + log(t);
}
real(8) function code(x, y, z, t)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (((x * log(y)) - y) - z) + log(t)
end function
public static double code(double x, double y, double z, double t) {
return (((x * Math.log(y)) - y) - z) + Math.log(t);
}
def code(x, y, z, t): return (((x * math.log(y)) - y) - z) + math.log(t)
function code(x, y, z, t) return Float64(Float64(Float64(Float64(x * log(y)) - y) - z) + log(t)) end
function tmp = code(x, y, z, t) tmp = (((x * log(y)) - y) - z) + log(t); end
code[x_, y_, z_, t_] := N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision] - z), $MachinePrecision] + N[Log[t], $MachinePrecision]), $MachinePrecision]
f(x, y, z, t): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf], t in [-inf, +inf] code: THEORY BEGIN f(x, y, z, t: real): real = (((x * (ln(y))) - y) - z) + (ln(t)) END code
\left(\left(x \cdot \log y - y\right) - z\right) + \log t
Herbie found 12 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 :pre TRUE (+ (- (- (* x (log y)) y) z) (log t)))
double code(double x, double y, double z, double t) {
return (((x * log(y)) - y) - z) + log(t);
}
real(8) function code(x, y, z, t)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (((x * log(y)) - y) - z) + log(t)
end function
public static double code(double x, double y, double z, double t) {
return (((x * Math.log(y)) - y) - z) + Math.log(t);
}
def code(x, y, z, t): return (((x * math.log(y)) - y) - z) + math.log(t)
function code(x, y, z, t) return Float64(Float64(Float64(Float64(x * log(y)) - y) - z) + log(t)) end
function tmp = code(x, y, z, t) tmp = (((x * log(y)) - y) - z) + log(t); end
code[x_, y_, z_, t_] := N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision] - z), $MachinePrecision] + N[Log[t], $MachinePrecision]), $MachinePrecision]
f(x, y, z, t): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf], t in [-inf, +inf] code: THEORY BEGIN f(x, y, z, t: real): real = (((x * (ln(y))) - y) - z) + (ln(t)) END code
\left(\left(x \cdot \log y - y\right) - z\right) + \log t
(FPCore (x y z t) :precision binary64 :pre TRUE (fma x (log y) (- (- (log t) z) y)))
double code(double x, double y, double z, double t) {
return fma(x, log(y), ((log(t) - z) - y));
}
function code(x, y, z, t) return fma(x, log(y), Float64(Float64(log(t) - z) - y)) end
code[x_, y_, z_, t_] := N[(x * N[Log[y], $MachinePrecision] + N[(N[(N[Log[t], $MachinePrecision] - z), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]
f(x, y, z, t): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf], t in [-inf, +inf] code: THEORY BEGIN f(x, y, z, t: real): real = (x * (ln(y))) + (((ln(t)) - z) - y) END code
\mathsf{fma}\left(x, \log y, \left(\log t - z\right) - y\right)
Initial program 99.9%
Applied rewrites99.9%
(FPCore (x y z t)
:precision binary64
:pre TRUE
(if (<= y 1.9400327209735698e+31)
(+ (- (* x (log y)) z) (log t))
(if (<= y 1.721387848480009e+248)
(- (log t) (+ y z))
(fma x (log y) (- (log t) y)))))double code(double x, double y, double z, double t) {
double tmp;
if (y <= 1.9400327209735698e+31) {
tmp = ((x * log(y)) - z) + log(t);
} else if (y <= 1.721387848480009e+248) {
tmp = log(t) - (y + z);
} else {
tmp = fma(x, log(y), (log(t) - y));
}
return tmp;
}
function code(x, y, z, t) tmp = 0.0 if (y <= 1.9400327209735698e+31) tmp = Float64(Float64(Float64(x * log(y)) - z) + log(t)); elseif (y <= 1.721387848480009e+248) tmp = Float64(log(t) - Float64(y + z)); else tmp = fma(x, log(y), Float64(log(t) - y)); end return tmp end
code[x_, y_, z_, t_] := If[LessEqual[y, 1.9400327209735698e+31], N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision] + N[Log[t], $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.721387848480009e+248], N[(N[Log[t], $MachinePrecision] - N[(y + z), $MachinePrecision]), $MachinePrecision], N[(x * N[Log[y], $MachinePrecision] + N[(N[Log[t], $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]]]
f(x, y, z, t): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf], t in [-inf, +inf] code: THEORY BEGIN f(x, y, z, t: real): real = LET tmp_1 = IF (y <= (172138784848000910678784409119011237206298314965381906828690193615571084267346565904389242826559038341044754864056304444295696053129816752963291972220795393619411543965205101828526562124213876522311000020857282480043023351113822424735545765482463232)) THEN ((ln(t)) - (y + z)) ELSE ((x * (ln(y))) + ((ln(t)) - y)) ENDIF IN LET tmp = IF (y <= (19400327209735697715520610500608)) THEN (((x * (ln(y))) - z) + (ln(t))) ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
\mathbf{if}\;y \leq 1.9400327209735698 \cdot 10^{+31}:\\
\;\;\;\;\left(x \cdot \log y - z\right) + \log t\\
\mathbf{elif}\;y \leq 1.721387848480009 \cdot 10^{+248}:\\
\;\;\;\;\log t - \left(y + z\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x, \log y, \log t - y\right)\\
\end{array}
if y < 1.9400327209735698e31Initial program 99.9%
Taylor expanded in y around 0
Applied rewrites71.2%
if 1.9400327209735698e31 < y < 1.7213878484800091e248Initial program 99.9%
Taylor expanded in x around 0
Applied rewrites69.8%
if 1.7213878484800091e248 < y Initial program 99.9%
Taylor expanded in z around 0
Applied rewrites71.3%
Applied rewrites71.3%
(FPCore (x y z t)
:precision binary64
:pre TRUE
(let* ((t_1 (- (log t) (+ y z))))
(if (<= z -3.3950948268142874e+74)
t_1
(if (<= z 2.0377994761209829e-13)
(fma x (log y) (- (log t) y))
t_1))))double code(double x, double y, double z, double t) {
double t_1 = log(t) - (y + z);
double tmp;
if (z <= -3.3950948268142874e+74) {
tmp = t_1;
} else if (z <= 2.0377994761209829e-13) {
tmp = fma(x, log(y), (log(t) - y));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t) t_1 = Float64(log(t) - Float64(y + z)) tmp = 0.0 if (z <= -3.3950948268142874e+74) tmp = t_1; elseif (z <= 2.0377994761209829e-13) tmp = fma(x, log(y), Float64(log(t) - y)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[Log[t], $MachinePrecision] - N[(y + z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.3950948268142874e+74], t$95$1, If[LessEqual[z, 2.0377994761209829e-13], N[(x * N[Log[y], $MachinePrecision] + N[(N[Log[t], $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision], t$95$1]]]
f(x, y, z, t): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf], t in [-inf, +inf] code: THEORY BEGIN f(x, y, z, t: real): real = LET t_1 = ((ln(t)) - (y + z)) IN LET tmp_1 = IF (z <= (2037799476120982867987924073719547209712459057140421236908878199756145477294921875e-94)) THEN ((x * (ln(y))) + ((ln(t)) - y)) ELSE t_1 ENDIF IN LET tmp = IF (z <= (-339509482681428740206532583944965862344874843797051379248844413982885281792)) THEN t_1 ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
t_1 := \log t - \left(y + z\right)\\
\mathbf{if}\;z \leq -3.3950948268142874 \cdot 10^{+74}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.0377994761209829 \cdot 10^{-13}:\\
\;\;\;\;\mathsf{fma}\left(x, \log y, \log t - y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if z < -3.3950948268142874e74 or 2.0377994761209829e-13 < z Initial program 99.9%
Taylor expanded in x around 0
Applied rewrites69.8%
if -3.3950948268142874e74 < z < 2.0377994761209829e-13Initial program 99.9%
Taylor expanded in z around 0
Applied rewrites71.3%
Applied rewrites71.3%
(FPCore (x y z t)
:precision binary64
:pre TRUE
(if (<= x -3.3553147626182586e+106)
(/ 1.0 (/ (/ 0.5 x) (log (sqrt y))))
(if (<= x 1.0136549878959845e+189)
(- (log t) (+ y z))
(* (log y) x))))double code(double x, double y, double z, double t) {
double tmp;
if (x <= -3.3553147626182586e+106) {
tmp = 1.0 / ((0.5 / x) / log(sqrt(y)));
} else if (x <= 1.0136549878959845e+189) {
tmp = log(t) - (y + z);
} else {
tmp = log(y) * x;
}
return tmp;
}
real(8) function code(x, y, z, t)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (x <= (-3.3553147626182586d+106)) then
tmp = 1.0d0 / ((0.5d0 / x) / log(sqrt(y)))
else if (x <= 1.0136549878959845d+189) then
tmp = log(t) - (y + z)
else
tmp = log(y) * x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= -3.3553147626182586e+106) {
tmp = 1.0 / ((0.5 / x) / Math.log(Math.sqrt(y)));
} else if (x <= 1.0136549878959845e+189) {
tmp = Math.log(t) - (y + z);
} else {
tmp = Math.log(y) * x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -3.3553147626182586e+106: tmp = 1.0 / ((0.5 / x) / math.log(math.sqrt(y))) elif x <= 1.0136549878959845e+189: tmp = math.log(t) - (y + z) else: tmp = math.log(y) * x return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -3.3553147626182586e+106) tmp = Float64(1.0 / Float64(Float64(0.5 / x) / log(sqrt(y)))); elseif (x <= 1.0136549878959845e+189) tmp = Float64(log(t) - Float64(y + z)); else tmp = Float64(log(y) * x); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -3.3553147626182586e+106) tmp = 1.0 / ((0.5 / x) / log(sqrt(y))); elseif (x <= 1.0136549878959845e+189) tmp = log(t) - (y + z); else tmp = log(y) * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -3.3553147626182586e+106], N[(1.0 / N[(N[(0.5 / x), $MachinePrecision] / N[Log[N[Sqrt[y], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.0136549878959845e+189], N[(N[Log[t], $MachinePrecision] - N[(y + z), $MachinePrecision]), $MachinePrecision], N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision]]]
f(x, y, z, t): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf], t in [-inf, +inf] code: THEORY BEGIN f(x, y, z, t: real): real = LET tmp_1 = IF (x <= (1013654987895984510930819536748060057011936254392728101032616601915457362985283915651363764121002113082029871351976696181650498247217107769133623148287600376891257947298171457715136358252544)) THEN ((ln(t)) - (y + z)) ELSE ((ln(y)) * x) ENDIF IN LET tmp = IF (x <= (-33553147626182586240847438317368570267580901609090972179257517970379359670654625604138917832625974763585536)) THEN ((1) / (((5e-1) / x) / (ln((sqrt(y)))))) ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
\mathbf{if}\;x \leq -3.3553147626182586 \cdot 10^{+106}:\\
\;\;\;\;\frac{1}{\frac{\frac{0.5}{x}}{\log \left(\sqrt{y}\right)}}\\
\mathbf{elif}\;x \leq 1.0136549878959845 \cdot 10^{+189}:\\
\;\;\;\;\log t - \left(y + z\right)\\
\mathbf{else}:\\
\;\;\;\;\log y \cdot x\\
\end{array}
if x < -3.3553147626182586e106Initial program 99.9%
Applied rewrites99.9%
Taylor expanded in x around inf
Applied rewrites31.0%
Applied rewrites31.0%
if -3.3553147626182586e106 < x < 1.0136549878959845e189Initial program 99.9%
Taylor expanded in x around 0
Applied rewrites69.8%
if 1.0136549878959845e189 < x Initial program 99.9%
Applied rewrites99.9%
Taylor expanded in x around inf
Applied rewrites31.0%
Applied rewrites31.0%
(FPCore (x y z t)
:precision binary64
:pre TRUE
(if (<= x -3.3553147626182586e+106)
(* (log (sqrt y)) (/ -2.0 (/ -1.0 x)))
(if (<= x 1.0136549878959845e+189)
(- (log t) (+ y z))
(* (log y) x))))double code(double x, double y, double z, double t) {
double tmp;
if (x <= -3.3553147626182586e+106) {
tmp = log(sqrt(y)) * (-2.0 / (-1.0 / x));
} else if (x <= 1.0136549878959845e+189) {
tmp = log(t) - (y + z);
} else {
tmp = log(y) * x;
}
return tmp;
}
real(8) function code(x, y, z, t)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (x <= (-3.3553147626182586d+106)) then
tmp = log(sqrt(y)) * ((-2.0d0) / ((-1.0d0) / x))
else if (x <= 1.0136549878959845d+189) then
tmp = log(t) - (y + z)
else
tmp = log(y) * x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= -3.3553147626182586e+106) {
tmp = Math.log(Math.sqrt(y)) * (-2.0 / (-1.0 / x));
} else if (x <= 1.0136549878959845e+189) {
tmp = Math.log(t) - (y + z);
} else {
tmp = Math.log(y) * x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -3.3553147626182586e+106: tmp = math.log(math.sqrt(y)) * (-2.0 / (-1.0 / x)) elif x <= 1.0136549878959845e+189: tmp = math.log(t) - (y + z) else: tmp = math.log(y) * x return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -3.3553147626182586e+106) tmp = Float64(log(sqrt(y)) * Float64(-2.0 / Float64(-1.0 / x))); elseif (x <= 1.0136549878959845e+189) tmp = Float64(log(t) - Float64(y + z)); else tmp = Float64(log(y) * x); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -3.3553147626182586e+106) tmp = log(sqrt(y)) * (-2.0 / (-1.0 / x)); elseif (x <= 1.0136549878959845e+189) tmp = log(t) - (y + z); else tmp = log(y) * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -3.3553147626182586e+106], N[(N[Log[N[Sqrt[y], $MachinePrecision]], $MachinePrecision] * N[(-2.0 / N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.0136549878959845e+189], N[(N[Log[t], $MachinePrecision] - N[(y + z), $MachinePrecision]), $MachinePrecision], N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision]]]
f(x, y, z, t): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf], t in [-inf, +inf] code: THEORY BEGIN f(x, y, z, t: real): real = LET tmp_1 = IF (x <= (1013654987895984510930819536748060057011936254392728101032616601915457362985283915651363764121002113082029871351976696181650498247217107769133623148287600376891257947298171457715136358252544)) THEN ((ln(t)) - (y + z)) ELSE ((ln(y)) * x) ENDIF IN LET tmp = IF (x <= (-33553147626182586240847438317368570267580901609090972179257517970379359670654625604138917832625974763585536)) THEN ((ln((sqrt(y)))) * ((-2) / ((-1) / x))) ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
\mathbf{if}\;x \leq -3.3553147626182586 \cdot 10^{+106}:\\
\;\;\;\;\log \left(\sqrt{y}\right) \cdot \frac{-2}{\frac{-1}{x}}\\
\mathbf{elif}\;x \leq 1.0136549878959845 \cdot 10^{+189}:\\
\;\;\;\;\log t - \left(y + z\right)\\
\mathbf{else}:\\
\;\;\;\;\log y \cdot x\\
\end{array}
if x < -3.3553147626182586e106Initial program 99.9%
Applied rewrites99.9%
Taylor expanded in x around inf
Applied rewrites31.0%
Applied rewrites31.0%
Applied rewrites31.0%
if -3.3553147626182586e106 < x < 1.0136549878959845e189Initial program 99.9%
Taylor expanded in x around 0
Applied rewrites69.8%
if 1.0136549878959845e189 < x Initial program 99.9%
Applied rewrites99.9%
Taylor expanded in x around inf
Applied rewrites31.0%
Applied rewrites31.0%
(FPCore (x y z t)
:precision binary64
:pre TRUE
(if (<= x -3.3553147626182586e+106)
(/ x (/ 1.0 (log y)))
(if (<= x 1.0136549878959845e+189)
(- (log t) (+ y z))
(* (log y) x))))double code(double x, double y, double z, double t) {
double tmp;
if (x <= -3.3553147626182586e+106) {
tmp = x / (1.0 / log(y));
} else if (x <= 1.0136549878959845e+189) {
tmp = log(t) - (y + z);
} else {
tmp = log(y) * x;
}
return tmp;
}
real(8) function code(x, y, z, t)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (x <= (-3.3553147626182586d+106)) then
tmp = x / (1.0d0 / log(y))
else if (x <= 1.0136549878959845d+189) then
tmp = log(t) - (y + z)
else
tmp = log(y) * x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= -3.3553147626182586e+106) {
tmp = x / (1.0 / Math.log(y));
} else if (x <= 1.0136549878959845e+189) {
tmp = Math.log(t) - (y + z);
} else {
tmp = Math.log(y) * x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -3.3553147626182586e+106: tmp = x / (1.0 / math.log(y)) elif x <= 1.0136549878959845e+189: tmp = math.log(t) - (y + z) else: tmp = math.log(y) * x return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -3.3553147626182586e+106) tmp = Float64(x / Float64(1.0 / log(y))); elseif (x <= 1.0136549878959845e+189) tmp = Float64(log(t) - Float64(y + z)); else tmp = Float64(log(y) * x); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -3.3553147626182586e+106) tmp = x / (1.0 / log(y)); elseif (x <= 1.0136549878959845e+189) tmp = log(t) - (y + z); else tmp = log(y) * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -3.3553147626182586e+106], N[(x / N[(1.0 / N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.0136549878959845e+189], N[(N[Log[t], $MachinePrecision] - N[(y + z), $MachinePrecision]), $MachinePrecision], N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision]]]
f(x, y, z, t): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf], t in [-inf, +inf] code: THEORY BEGIN f(x, y, z, t: real): real = LET tmp_1 = IF (x <= (1013654987895984510930819536748060057011936254392728101032616601915457362985283915651363764121002113082029871351976696181650498247217107769133623148287600376891257947298171457715136358252544)) THEN ((ln(t)) - (y + z)) ELSE ((ln(y)) * x) ENDIF IN LET tmp = IF (x <= (-33553147626182586240847438317368570267580901609090972179257517970379359670654625604138917832625974763585536)) THEN (x / ((1) / (ln(y)))) ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
\mathbf{if}\;x \leq -3.3553147626182586 \cdot 10^{+106}:\\
\;\;\;\;\frac{x}{\frac{1}{\log y}}\\
\mathbf{elif}\;x \leq 1.0136549878959845 \cdot 10^{+189}:\\
\;\;\;\;\log t - \left(y + z\right)\\
\mathbf{else}:\\
\;\;\;\;\log y \cdot x\\
\end{array}
if x < -3.3553147626182586e106Initial program 99.9%
Applied rewrites99.9%
Taylor expanded in x around inf
Applied rewrites31.0%
Applied rewrites31.0%
if -3.3553147626182586e106 < x < 1.0136549878959845e189Initial program 99.9%
Taylor expanded in x around 0
Applied rewrites69.8%
if 1.0136549878959845e189 < x Initial program 99.9%
Applied rewrites99.9%
Taylor expanded in x around inf
Applied rewrites31.0%
Applied rewrites31.0%
(FPCore (x y z t)
:precision binary64
:pre TRUE
(if (<= x -3.3553147626182586e+106)
(* (log (sqrt y)) (+ x x))
(if (<= x 1.0136549878959845e+189)
(- (log t) (+ y z))
(* (log y) x))))double code(double x, double y, double z, double t) {
double tmp;
if (x <= -3.3553147626182586e+106) {
tmp = log(sqrt(y)) * (x + x);
} else if (x <= 1.0136549878959845e+189) {
tmp = log(t) - (y + z);
} else {
tmp = log(y) * x;
}
return tmp;
}
real(8) function code(x, y, z, t)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (x <= (-3.3553147626182586d+106)) then
tmp = log(sqrt(y)) * (x + x)
else if (x <= 1.0136549878959845d+189) then
tmp = log(t) - (y + z)
else
tmp = log(y) * x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= -3.3553147626182586e+106) {
tmp = Math.log(Math.sqrt(y)) * (x + x);
} else if (x <= 1.0136549878959845e+189) {
tmp = Math.log(t) - (y + z);
} else {
tmp = Math.log(y) * x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -3.3553147626182586e+106: tmp = math.log(math.sqrt(y)) * (x + x) elif x <= 1.0136549878959845e+189: tmp = math.log(t) - (y + z) else: tmp = math.log(y) * x return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -3.3553147626182586e+106) tmp = Float64(log(sqrt(y)) * Float64(x + x)); elseif (x <= 1.0136549878959845e+189) tmp = Float64(log(t) - Float64(y + z)); else tmp = Float64(log(y) * x); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -3.3553147626182586e+106) tmp = log(sqrt(y)) * (x + x); elseif (x <= 1.0136549878959845e+189) tmp = log(t) - (y + z); else tmp = log(y) * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -3.3553147626182586e+106], N[(N[Log[N[Sqrt[y], $MachinePrecision]], $MachinePrecision] * N[(x + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.0136549878959845e+189], N[(N[Log[t], $MachinePrecision] - N[(y + z), $MachinePrecision]), $MachinePrecision], N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision]]]
f(x, y, z, t): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf], t in [-inf, +inf] code: THEORY BEGIN f(x, y, z, t: real): real = LET tmp_1 = IF (x <= (1013654987895984510930819536748060057011936254392728101032616601915457362985283915651363764121002113082029871351976696181650498247217107769133623148287600376891257947298171457715136358252544)) THEN ((ln(t)) - (y + z)) ELSE ((ln(y)) * x) ENDIF IN LET tmp = IF (x <= (-33553147626182586240847438317368570267580901609090972179257517970379359670654625604138917832625974763585536)) THEN ((ln((sqrt(y)))) * (x + x)) ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
\mathbf{if}\;x \leq -3.3553147626182586 \cdot 10^{+106}:\\
\;\;\;\;\log \left(\sqrt{y}\right) \cdot \left(x + x\right)\\
\mathbf{elif}\;x \leq 1.0136549878959845 \cdot 10^{+189}:\\
\;\;\;\;\log t - \left(y + z\right)\\
\mathbf{else}:\\
\;\;\;\;\log y \cdot x\\
\end{array}
if x < -3.3553147626182586e106Initial program 99.9%
Applied rewrites99.9%
Taylor expanded in x around inf
Applied rewrites31.0%
Applied rewrites31.0%
if -3.3553147626182586e106 < x < 1.0136549878959845e189Initial program 99.9%
Taylor expanded in x around 0
Applied rewrites69.8%
if 1.0136549878959845e189 < x Initial program 99.9%
Applied rewrites99.9%
Taylor expanded in x around inf
Applied rewrites31.0%
Applied rewrites31.0%
(FPCore (x y z t)
:precision binary64
:pre TRUE
(let* ((t_1 (* (log y) x)))
(if (<= x -3.3553147626182586e+106)
t_1
(if (<= x 1.0136549878959845e+189) (- (log t) (+ y z)) t_1))))double code(double x, double y, double z, double t) {
double t_1 = log(y) * x;
double tmp;
if (x <= -3.3553147626182586e+106) {
tmp = t_1;
} else if (x <= 1.0136549878959845e+189) {
tmp = log(t) - (y + z);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = log(y) * x
if (x <= (-3.3553147626182586d+106)) then
tmp = t_1
else if (x <= 1.0136549878959845d+189) then
tmp = log(t) - (y + z)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = Math.log(y) * x;
double tmp;
if (x <= -3.3553147626182586e+106) {
tmp = t_1;
} else if (x <= 1.0136549878959845e+189) {
tmp = Math.log(t) - (y + z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = math.log(y) * x tmp = 0 if x <= -3.3553147626182586e+106: tmp = t_1 elif x <= 1.0136549878959845e+189: tmp = math.log(t) - (y + z) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(log(y) * x) tmp = 0.0 if (x <= -3.3553147626182586e+106) tmp = t_1; elseif (x <= 1.0136549878959845e+189) tmp = Float64(log(t) - Float64(y + z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = log(y) * x; tmp = 0.0; if (x <= -3.3553147626182586e+106) tmp = t_1; elseif (x <= 1.0136549878959845e+189) tmp = log(t) - (y + z); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[x, -3.3553147626182586e+106], t$95$1, If[LessEqual[x, 1.0136549878959845e+189], N[(N[Log[t], $MachinePrecision] - N[(y + z), $MachinePrecision]), $MachinePrecision], t$95$1]]]
f(x, y, z, t): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf], t in [-inf, +inf] code: THEORY BEGIN f(x, y, z, t: real): real = LET t_1 = ((ln(y)) * x) IN LET tmp_1 = IF (x <= (1013654987895984510930819536748060057011936254392728101032616601915457362985283915651363764121002113082029871351976696181650498247217107769133623148287600376891257947298171457715136358252544)) THEN ((ln(t)) - (y + z)) ELSE t_1 ENDIF IN LET tmp = IF (x <= (-33553147626182586240847438317368570267580901609090972179257517970379359670654625604138917832625974763585536)) THEN t_1 ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
t_1 := \log y \cdot x\\
\mathbf{if}\;x \leq -3.3553147626182586 \cdot 10^{+106}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 1.0136549878959845 \cdot 10^{+189}:\\
\;\;\;\;\log t - \left(y + z\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if x < -3.3553147626182586e106 or 1.0136549878959845e189 < x Initial program 99.9%
Applied rewrites99.9%
Taylor expanded in x around inf
Applied rewrites31.0%
Applied rewrites31.0%
if -3.3553147626182586e106 < x < 1.0136549878959845e189Initial program 99.9%
Taylor expanded in x around 0
Applied rewrites69.8%
(FPCore (x y z t)
:precision binary64
:pre TRUE
(let* ((t_1 (- (* x (log y)) y)))
(if (<= t_1 -2e+29)
(* y -1.0)
(if (<= t_1 5e+108) (- (log t) z) (* (log y) x)))))double code(double x, double y, double z, double t) {
double t_1 = (x * log(y)) - y;
double tmp;
if (t_1 <= -2e+29) {
tmp = y * -1.0;
} else if (t_1 <= 5e+108) {
tmp = log(t) - z;
} else {
tmp = log(y) * x;
}
return tmp;
}
real(8) function code(x, y, z, t)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (x * log(y)) - y
if (t_1 <= (-2d+29)) then
tmp = y * (-1.0d0)
else if (t_1 <= 5d+108) then
tmp = log(t) - z
else
tmp = log(y) * x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (x * Math.log(y)) - y;
double tmp;
if (t_1 <= -2e+29) {
tmp = y * -1.0;
} else if (t_1 <= 5e+108) {
tmp = Math.log(t) - z;
} else {
tmp = Math.log(y) * x;
}
return tmp;
}
def code(x, y, z, t): t_1 = (x * math.log(y)) - y tmp = 0 if t_1 <= -2e+29: tmp = y * -1.0 elif t_1 <= 5e+108: tmp = math.log(t) - z else: tmp = math.log(y) * x return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x * log(y)) - y) tmp = 0.0 if (t_1 <= -2e+29) tmp = Float64(y * -1.0); elseif (t_1 <= 5e+108) tmp = Float64(log(t) - z); else tmp = Float64(log(y) * x); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x * log(y)) - y; tmp = 0.0; if (t_1 <= -2e+29) tmp = y * -1.0; elseif (t_1 <= 5e+108) tmp = log(t) - z; else tmp = log(y) * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+29], N[(y * -1.0), $MachinePrecision], If[LessEqual[t$95$1, 5e+108], N[(N[Log[t], $MachinePrecision] - z), $MachinePrecision], N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision]]]]
f(x, y, z, t): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf], t in [-inf, +inf] code: THEORY BEGIN f(x, y, z, t: real): real = LET t_1 = ((x * (ln(y))) - y) IN LET tmp_1 = IF (t_1 <= (4999999999999999909254353594199903932358825482164085623979199184949536277190026649102901712196568838131679232)) THEN ((ln(t)) - z) ELSE ((ln(y)) * x) ENDIF IN LET tmp = IF (t_1 <= (-199999999999999982866301714432)) THEN (y * (-1)) ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
t_1 := x \cdot \log y - y\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+29}:\\
\;\;\;\;y \cdot -1\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+108}:\\
\;\;\;\;\log t - z\\
\mathbf{else}:\\
\;\;\;\;\log y \cdot x\\
\end{array}
if (-.f64 (*.f64 x (log.f64 y)) y) < -1.9999999999999998e29Initial program 99.9%
Taylor expanded in x around 0
Applied rewrites69.8%
Taylor expanded in y around inf
Applied rewrites60.3%
Taylor expanded in y around inf
Applied rewrites29.7%
if -1.9999999999999998e29 < (-.f64 (*.f64 x (log.f64 y)) y) < 4.9999999999999999e108Initial program 99.9%
Taylor expanded in x around 0
Applied rewrites69.8%
Taylor expanded in y around 0
Applied rewrites41.8%
if 4.9999999999999999e108 < (-.f64 (*.f64 x (log.f64 y)) y) Initial program 99.9%
Applied rewrites99.9%
Taylor expanded in x around inf
Applied rewrites31.0%
Applied rewrites31.0%
(FPCore (x y z t) :precision binary64 :pre TRUE (if (<= y 6.908300660868751e+47) (- (log t) z) (* y -1.0)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= 6.908300660868751e+47) {
tmp = log(t) - z;
} else {
tmp = y * -1.0;
}
return tmp;
}
real(8) function code(x, y, z, t)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= 6.908300660868751d+47) then
tmp = log(t) - z
else
tmp = y * (-1.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= 6.908300660868751e+47) {
tmp = Math.log(t) - z;
} else {
tmp = y * -1.0;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= 6.908300660868751e+47: tmp = math.log(t) - z else: tmp = y * -1.0 return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= 6.908300660868751e+47) tmp = Float64(log(t) - z); else tmp = Float64(y * -1.0); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= 6.908300660868751e+47) tmp = log(t) - z; else tmp = y * -1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, 6.908300660868751e+47], N[(N[Log[t], $MachinePrecision] - z), $MachinePrecision], N[(y * -1.0), $MachinePrecision]]
f(x, y, z, t): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf], t in [-inf, +inf] code: THEORY BEGIN f(x, y, z, t: real): real = LET tmp = IF (y <= (690830066086875074461239755593732369843675463680)) THEN ((ln(t)) - z) ELSE (y * (-1)) ENDIF IN tmp END code
\begin{array}{l}
\mathbf{if}\;y \leq 6.908300660868751 \cdot 10^{+47}:\\
\;\;\;\;\log t - z\\
\mathbf{else}:\\
\;\;\;\;y \cdot -1\\
\end{array}
if y < 6.9083006608687507e47Initial program 99.9%
Taylor expanded in x around 0
Applied rewrites69.8%
Taylor expanded in y around 0
Applied rewrites41.8%
if 6.9083006608687507e47 < y Initial program 99.9%
Taylor expanded in x around 0
Applied rewrites69.8%
Taylor expanded in y around inf
Applied rewrites60.3%
Taylor expanded in y around inf
Applied rewrites29.7%
(FPCore (x y z t) :precision binary64 :pre TRUE (- (log t) y))
double code(double x, double y, double z, double t) {
return log(t) - y;
}
real(8) function code(x, y, z, t)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = log(t) - y
end function
public static double code(double x, double y, double z, double t) {
return Math.log(t) - y;
}
def code(x, y, z, t): return math.log(t) - y
function code(x, y, z, t) return Float64(log(t) - y) end
function tmp = code(x, y, z, t) tmp = log(t) - y; end
code[x_, y_, z_, t_] := N[(N[Log[t], $MachinePrecision] - y), $MachinePrecision]
f(x, y, z, t): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf], t in [-inf, +inf] code: THEORY BEGIN f(x, y, z, t: real): real = (ln(t)) - y END code
\log t - y
Initial program 99.9%
Taylor expanded in z around 0
Applied rewrites71.3%
Taylor expanded in x around 0
Applied rewrites41.8%
(FPCore (x y z t) :precision binary64 :pre TRUE (* y -1.0))
double code(double x, double y, double z, double t) {
return y * -1.0;
}
real(8) function code(x, y, z, t)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = y * (-1.0d0)
end function
public static double code(double x, double y, double z, double t) {
return y * -1.0;
}
def code(x, y, z, t): return y * -1.0
function code(x, y, z, t) return Float64(y * -1.0) end
function tmp = code(x, y, z, t) tmp = y * -1.0; end
code[x_, y_, z_, t_] := N[(y * -1.0), $MachinePrecision]
f(x, y, z, t): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf], t in [-inf, +inf] code: THEORY BEGIN f(x, y, z, t: real): real = y * (-1) END code
y \cdot -1
Initial program 99.9%
Taylor expanded in x around 0
Applied rewrites69.8%
Taylor expanded in y around inf
Applied rewrites60.3%
Taylor expanded in y around inf
Applied rewrites29.7%
herbie shell --seed 2026092
(FPCore (x y z t)
:name "Numeric.SpecFunctions:incompleteGamma from math-functions-0.1.5.2, A"
:precision binary64
(+ (- (- (* x (log y)) y) z) (log t)))