
(FPCore (x y z t a) :precision binary64 :pre TRUE (- (+ x y) (/ (* (- z t) y) (- a t))))
double code(double x, double y, double z, double t, double a) {
return (x + y) - (((z - t) * y) / (a - t));
}
real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = (x + y) - (((z - t) * y) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return (x + y) - (((z - t) * y) / (a - t));
}
def code(x, y, z, t, a): return (x + y) - (((z - t) * y) / (a - t))
function code(x, y, z, t, a) return Float64(Float64(x + y) - Float64(Float64(Float64(z - t) * y) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = (x + y) - (((z - t) * y) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(N[(x + y), $MachinePrecision] - N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
f(x, y, z, t, a): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf], t in [-inf, +inf], a in [-inf, +inf] code: THEORY BEGIN f(x, y, z, t, a: real): real = (x + y) - (((z - t) * y) / (a - t)) END code
\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}
Herbie found 12 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 :pre TRUE (- (+ x y) (/ (* (- z t) y) (- a t))))
double code(double x, double y, double z, double t, double a) {
return (x + y) - (((z - t) * y) / (a - t));
}
real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = (x + y) - (((z - t) * y) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return (x + y) - (((z - t) * y) / (a - t));
}
def code(x, y, z, t, a): return (x + y) - (((z - t) * y) / (a - t))
function code(x, y, z, t, a) return Float64(Float64(x + y) - Float64(Float64(Float64(z - t) * y) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = (x + y) - (((z - t) * y) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(N[(x + y), $MachinePrecision] - N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
f(x, y, z, t, a): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf], t in [-inf, +inf], a in [-inf, +inf] code: THEORY BEGIN f(x, y, z, t, a: real): real = (x + y) - (((z - t) * y) / (a - t)) END code
\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}
(FPCore (x y z t a) :precision binary64 :pre TRUE (fma y (/ (- a z) (- a t)) x))
double code(double x, double y, double z, double t, double a) {
return fma(y, ((a - z) / (a - t)), x);
}
function code(x, y, z, t, a) return fma(y, Float64(Float64(a - z) / Float64(a - t)), x) end
code[x_, y_, z_, t_, a_] := N[(y * N[(N[(a - z), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]
f(x, y, z, t, a): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf], t in [-inf, +inf], a in [-inf, +inf] code: THEORY BEGIN f(x, y, z, t, a: real): real = (y * ((a - z) / (a - t))) + x END code
\mathsf{fma}\left(y, \frac{a - z}{a - t}, x\right)
Initial program 77.0%
Applied rewrites93.9%
Taylor expanded in t around 0
Applied rewrites98.1%
(FPCore (x y z t a)
:precision binary64
:pre TRUE
(if (<= a -7.767293747409786e-87)
(fma y (/ a (- a t)) x)
(if (<= a 6.238359636049081e-18)
(fma z (/ y (- t a)) x)
(- (+ x y) (* z (/ y a))))))double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -7.767293747409786e-87) {
tmp = fma(y, (a / (a - t)), x);
} else if (a <= 6.238359636049081e-18) {
tmp = fma(z, (y / (t - a)), x);
} else {
tmp = (x + y) - (z * (y / a));
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (a <= -7.767293747409786e-87) tmp = fma(y, Float64(a / Float64(a - t)), x); elseif (a <= 6.238359636049081e-18) tmp = fma(z, Float64(y / Float64(t - a)), x); else tmp = Float64(Float64(x + y) - Float64(z * Float64(y / a))); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -7.767293747409786e-87], N[(y * N[(a / N[(a - t), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[a, 6.238359636049081e-18], N[(z * N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(N[(x + y), $MachinePrecision] - N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
f(x, y, z, t, a): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf], t in [-inf, +inf], a in [-inf, +inf] code: THEORY BEGIN f(x, y, z, t, a: real): real = LET tmp_1 = IF (a <= (6238359636049080634043266411720840101667096935550600733666470887328614480793476104736328125e-108)) THEN ((z * (y / (t - a))) + x) ELSE ((x + y) - (z * (y / a))) ENDIF IN LET tmp = IF (a <= (-7767293747409786068860004718053809514319862217966251197644451806220388392778359204458858685011090803370413084866929821613201903964891940446760468621856013708268980104612414688340717808333809105499388671915936559371484992908563071978278458118438720703125e-339)) THEN ((y * (a / (a - t))) + x) ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
\mathbf{if}\;a \leq -7.767293747409786 \cdot 10^{-87}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{a}{a - t}, x\right)\\
\mathbf{elif}\;a \leq 6.238359636049081 \cdot 10^{-18}:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{y}{t - a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x + y\right) - z \cdot \frac{y}{a}\\
\end{array}
if a < -7.7672937474097861e-87Initial program 77.0%
Applied rewrites93.9%
Taylor expanded in z around 0
Applied rewrites72.4%
if -7.7672937474097861e-87 < a < 6.2383596360490806e-18Initial program 77.0%
Applied rewrites87.0%
Taylor expanded in t around inf
Applied rewrites77.2%
Applied rewrites77.2%
Applied rewrites77.2%
if 6.2383596360490806e-18 < a Initial program 77.0%
Taylor expanded in t around 0
Applied rewrites64.7%
Applied rewrites66.6%
(FPCore (x y z t a)
:precision binary64
:pre TRUE
(if (<= a -7.767293747409786e-87)
(fma y (/ a (- a t)) x)
(if (<= a 6.238359636049081e-18)
(fma z (/ y (- t a)) x)
(fma y (/ (- a z) a) x))))double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -7.767293747409786e-87) {
tmp = fma(y, (a / (a - t)), x);
} else if (a <= 6.238359636049081e-18) {
tmp = fma(z, (y / (t - a)), x);
} else {
tmp = fma(y, ((a - z) / a), x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (a <= -7.767293747409786e-87) tmp = fma(y, Float64(a / Float64(a - t)), x); elseif (a <= 6.238359636049081e-18) tmp = fma(z, Float64(y / Float64(t - a)), x); else tmp = fma(y, Float64(Float64(a - z) / a), x); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -7.767293747409786e-87], N[(y * N[(a / N[(a - t), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[a, 6.238359636049081e-18], N[(z * N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(y * N[(N[(a - z), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision]]]
f(x, y, z, t, a): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf], t in [-inf, +inf], a in [-inf, +inf] code: THEORY BEGIN f(x, y, z, t, a: real): real = LET tmp_1 = IF (a <= (6238359636049080634043266411720840101667096935550600733666470887328614480793476104736328125e-108)) THEN ((z * (y / (t - a))) + x) ELSE ((y * ((a - z) / a)) + x) ENDIF IN LET tmp = IF (a <= (-7767293747409786068860004718053809514319862217966251197644451806220388392778359204458858685011090803370413084866929821613201903964891940446760468621856013708268980104612414688340717808333809105499388671915936559371484992908563071978278458118438720703125e-339)) THEN ((y * (a / (a - t))) + x) ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
\mathbf{if}\;a \leq -7.767293747409786 \cdot 10^{-87}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{a}{a - t}, x\right)\\
\mathbf{elif}\;a \leq 6.238359636049081 \cdot 10^{-18}:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{y}{t - a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{a - z}{a}, x\right)\\
\end{array}
if a < -7.7672937474097861e-87Initial program 77.0%
Applied rewrites93.9%
Taylor expanded in z around 0
Applied rewrites72.4%
if -7.7672937474097861e-87 < a < 6.2383596360490806e-18Initial program 77.0%
Applied rewrites87.0%
Taylor expanded in t around inf
Applied rewrites77.2%
Applied rewrites77.2%
Applied rewrites77.2%
if 6.2383596360490806e-18 < a Initial program 77.0%
Applied rewrites93.9%
Taylor expanded in t around 0
Applied rewrites66.6%
(FPCore (x y z t a)
:precision binary64
:pre TRUE
(if (<= a -6.38665791065844e-98)
(fma y (/ a (- a t)) x)
(if (<= a 1.99087747824985e-46)
(+ x (/ (* y z) t))
(fma y (/ (- a z) a) x))))double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -6.38665791065844e-98) {
tmp = fma(y, (a / (a - t)), x);
} else if (a <= 1.99087747824985e-46) {
tmp = x + ((y * z) / t);
} else {
tmp = fma(y, ((a - z) / a), x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (a <= -6.38665791065844e-98) tmp = fma(y, Float64(a / Float64(a - t)), x); elseif (a <= 1.99087747824985e-46) tmp = Float64(x + Float64(Float64(y * z) / t)); else tmp = fma(y, Float64(Float64(a - z) / a), x); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -6.38665791065844e-98], N[(y * N[(a / N[(a - t), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[a, 1.99087747824985e-46], N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(y * N[(N[(a - z), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision]]]
f(x, y, z, t, a): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf], t in [-inf, +inf], a in [-inf, +inf] code: THEORY BEGIN f(x, y, z, t, a: real): real = LET tmp_1 = IF (a <= (199087747824984997886936872567856876854385410234444426897562071506677284933182711521177846255462710731655466742830835023825297724897609441541135311126708984375e-204)) THEN (x + ((y * z) / t)) ELSE ((y * ((a - z) / a)) + x) ENDIF IN LET tmp = IF (a <= (-63866579106584405506981906040670426465631804627889179778673726773923104937353692653962337658245320279703048988352080320914247659761099343849866450533491356225701021626109490901859264695964462277401532530499587101613399551057338899908723782450348238626247621141374111175537109375e-375)) THEN ((y * (a / (a - t))) + x) ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
\mathbf{if}\;a \leq -6.38665791065844 \cdot 10^{-98}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{a}{a - t}, x\right)\\
\mathbf{elif}\;a \leq 1.99087747824985 \cdot 10^{-46}:\\
\;\;\;\;x + \frac{y \cdot z}{t}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{a - z}{a}, x\right)\\
\end{array}
if a < -6.3866579106584406e-98Initial program 77.0%
Applied rewrites93.9%
Taylor expanded in z around 0
Applied rewrites72.4%
if -6.3866579106584406e-98 < a < 1.99087747824985e-46Initial program 77.0%
Taylor expanded in t around -inf
Applied rewrites58.1%
Taylor expanded in z around inf
Applied rewrites61.0%
if 1.99087747824985e-46 < a Initial program 77.0%
Applied rewrites93.9%
Taylor expanded in t around 0
Applied rewrites66.6%
(FPCore (x y z t a)
:precision binary64
:pre TRUE
(let* ((t_1 (fma y (/ (- a z) a) x)))
(if (<= a -4.636794655788244e-97)
t_1
(if (<= a 1.99087747824985e-46) (+ x (/ (* y z) t)) t_1))))double code(double x, double y, double z, double t, double a) {
double t_1 = fma(y, ((a - z) / a), x);
double tmp;
if (a <= -4.636794655788244e-97) {
tmp = t_1;
} else if (a <= 1.99087747824985e-46) {
tmp = x + ((y * z) / t);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(y, Float64(Float64(a - z) / a), x) tmp = 0.0 if (a <= -4.636794655788244e-97) tmp = t_1; elseif (a <= 1.99087747824985e-46) tmp = Float64(x + Float64(Float64(y * z) / t)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(a - z), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -4.636794655788244e-97], t$95$1, If[LessEqual[a, 1.99087747824985e-46], N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], t$95$1]]]
f(x, y, z, t, a): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf], t in [-inf, +inf], a in [-inf, +inf] code: THEORY BEGIN f(x, y, z, t, a: real): real = LET t_1 = ((y * ((a - z) / a)) + x) IN LET tmp_1 = IF (a <= (199087747824984997886936872567856876854385410234444426897562071506677284933182711521177846255462710731655466742830835023825297724897609441541135311126708984375e-204)) THEN (x + ((y * z) / t)) ELSE t_1 ENDIF IN LET tmp = IF (a <= (-4636794655788244106205890780400092776968265779497900829864312184489138126709900652532247695786012145183880387530159310844688074697528154710961678879739479776583348965041979855810706223203959339235709257233776220354908983746422201517567961148724720032987534068524837493896484375e-373)) THEN t_1 ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
t_1 := \mathsf{fma}\left(y, \frac{a - z}{a}, x\right)\\
\mathbf{if}\;a \leq -4.636794655788244 \cdot 10^{-97}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1.99087747824985 \cdot 10^{-46}:\\
\;\;\;\;x + \frac{y \cdot z}{t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if a < -4.6367946557882441e-97 or 1.99087747824985e-46 < a Initial program 77.0%
Applied rewrites93.9%
Taylor expanded in t around 0
Applied rewrites66.6%
if -4.6367946557882441e-97 < a < 1.99087747824985e-46Initial program 77.0%
Taylor expanded in t around -inf
Applied rewrites58.1%
Taylor expanded in z around inf
Applied rewrites61.0%
(FPCore (x y z t a) :precision binary64 :pre TRUE (if (<= a -2.8197968432687736e-44) (fma a (/ y a) x) (if (<= a 1.7299952040874803e-44) (+ x (/ (* y z) t)) (- x (- y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.8197968432687736e-44) {
tmp = fma(a, (y / a), x);
} else if (a <= 1.7299952040874803e-44) {
tmp = x + ((y * z) / t);
} else {
tmp = x - -y;
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (a <= -2.8197968432687736e-44) tmp = fma(a, Float64(y / a), x); elseif (a <= 1.7299952040874803e-44) tmp = Float64(x + Float64(Float64(y * z) / t)); else tmp = Float64(x - Float64(-y)); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.8197968432687736e-44], N[(a * N[(y / a), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[a, 1.7299952040874803e-44], N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(x - (-y)), $MachinePrecision]]]
f(x, y, z, t, a): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf], t in [-inf, +inf], a in [-inf, +inf] code: THEORY BEGIN f(x, y, z, t, a: real): real = LET tmp_1 = IF (a <= (17299952040874803418414247971230233205871008441999637021103833758252304860327992232766502972757785728140875823708073888429481712591950781643390655517578125e-198)) THEN (x + ((y * z) / t)) ELSE (x - (- y)) ENDIF IN LET tmp = IF (a <= (-2819796843268773614640655943967757972125580407807420717691756877242900831520732692518096284692827848864992446313755547482315932938945479691028594970703125e-197)) THEN ((a * (y / a)) + x) ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
\mathbf{if}\;a \leq -2.8197968432687736 \cdot 10^{-44}:\\
\;\;\;\;\mathsf{fma}\left(a, \frac{y}{a}, x\right)\\
\mathbf{elif}\;a \leq 1.7299952040874803 \cdot 10^{-44}:\\
\;\;\;\;x + \frac{y \cdot z}{t}\\
\mathbf{else}:\\
\;\;\;\;x - \left(-y\right)\\
\end{array}
if a < -2.8197968432687736e-44Initial program 77.0%
Applied rewrites93.9%
Taylor expanded in t around 0
Applied rewrites58.3%
Applied rewrites65.5%
Taylor expanded in z around 0
Applied rewrites59.6%
if -2.8197968432687736e-44 < a < 1.7299952040874803e-44Initial program 77.0%
Taylor expanded in t around -inf
Applied rewrites58.1%
Taylor expanded in z around inf
Applied rewrites61.0%
if 1.7299952040874803e-44 < a Initial program 77.0%
Applied rewrites80.3%
Taylor expanded in a around inf
Applied rewrites60.8%
Applied rewrites60.8%
(FPCore (x y z t a) :precision binary64 :pre TRUE (if (<= a -5.649431352281286e-46) (fma a (/ y a) x) (if (<= a 1.4695601448716176e-41) (fma y (/ z t) x) (- x (- y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -5.649431352281286e-46) {
tmp = fma(a, (y / a), x);
} else if (a <= 1.4695601448716176e-41) {
tmp = fma(y, (z / t), x);
} else {
tmp = x - -y;
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (a <= -5.649431352281286e-46) tmp = fma(a, Float64(y / a), x); elseif (a <= 1.4695601448716176e-41) tmp = fma(y, Float64(z / t), x); else tmp = Float64(x - Float64(-y)); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -5.649431352281286e-46], N[(a * N[(y / a), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[a, 1.4695601448716176e-41], N[(y * N[(z / t), $MachinePrecision] + x), $MachinePrecision], N[(x - (-y)), $MachinePrecision]]]
f(x, y, z, t, a): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf], t in [-inf, +inf], a in [-inf, +inf] code: THEORY BEGIN f(x, y, z, t, a: real): real = LET tmp_1 = IF (a <= (146956014487161759545361415833330398912754032598929048665339341158869906267905470159666315090122358735943118579481136976028210483491420745849609375e-187)) THEN ((y * (z / t)) + x) ELSE (x - (- y)) ENDIF IN LET tmp = IF (a <= (-5649431352281286034085126318945065878873864764640056167622648579870085906491504741951659109966815981418844940965405705679547310182897490449249744415283203125e-202)) THEN ((a * (y / a)) + x) ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
\mathbf{if}\;a \leq -5.649431352281286 \cdot 10^{-46}:\\
\;\;\;\;\mathsf{fma}\left(a, \frac{y}{a}, x\right)\\
\mathbf{elif}\;a \leq 1.4695601448716176 \cdot 10^{-41}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{z}{t}, x\right)\\
\mathbf{else}:\\
\;\;\;\;x - \left(-y\right)\\
\end{array}
if a < -5.649431352281286e-46Initial program 77.0%
Applied rewrites93.9%
Taylor expanded in t around 0
Applied rewrites58.3%
Applied rewrites65.5%
Taylor expanded in z around 0
Applied rewrites59.6%
if -5.649431352281286e-46 < a < 1.4695601448716176e-41Initial program 77.0%
Taylor expanded in t around -inf
Applied rewrites58.1%
Applied rewrites58.5%
Applied rewrites60.6%
Taylor expanded in z around inf
Applied rewrites62.1%
if 1.4695601448716176e-41 < a Initial program 77.0%
Applied rewrites80.3%
Taylor expanded in a around inf
Applied rewrites60.8%
Applied rewrites60.8%
(FPCore (x y z t a) :precision binary64 :pre TRUE (if (<= a -6.484516363435089e-221) (fma a (/ y a) x) (if (<= a 1.1437049085958378e-141) (/ (* y z) t) (- x (- y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -6.484516363435089e-221) {
tmp = fma(a, (y / a), x);
} else if (a <= 1.1437049085958378e-141) {
tmp = (y * z) / t;
} else {
tmp = x - -y;
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (a <= -6.484516363435089e-221) tmp = fma(a, Float64(y / a), x); elseif (a <= 1.1437049085958378e-141) tmp = Float64(Float64(y * z) / t); else tmp = Float64(x - Float64(-y)); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -6.484516363435089e-221], N[(a * N[(y / a), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[a, 1.1437049085958378e-141], N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision], N[(x - (-y)), $MachinePrecision]]]
f(x, y, z, t, a): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf], t in [-inf, +inf], a in [-inf, +inf] code: THEORY BEGIN f(x, y, z, t, a: real): real = LET tmp_1 = IF (a <= (114370490859583777271374036729465620805172096937795052943677469182271019900591827520730328083914053097537391008004524757140382858662677664461573204580447671393737482385891980537269100108984238330795851089737739279275282826958458553828576250880428745901248441937054516857168802072728745268439250969788984492428766607666172702666036381578644476331163559734704904258251190185546875e-518)) THEN ((y * z) / t) ELSE (x - (- y)) ENDIF IN LET tmp = IF (a <= (-64845163634350893305161489319631960443392902123726436481453975237944805185575063166056120803718912265584694039716055291619812239443383167009808873683128931121477221902018764882023680076618772329835736224009857527721434962456203072720475450928231719974625665332956061501085417580924278641871820923579778616827856948597457808636045555058322098009533646702383920066212905671800637220103002524385734977723890017423958021172852685917220397555399323677886970653244957413031622884334230996362610134333925514357912184444194676996402193491775278744171373546123504638671875e-783)) THEN ((a * (y / a)) + x) ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
\mathbf{if}\;a \leq -6.484516363435089 \cdot 10^{-221}:\\
\;\;\;\;\mathsf{fma}\left(a, \frac{y}{a}, x\right)\\
\mathbf{elif}\;a \leq 1.1437049085958378 \cdot 10^{-141}:\\
\;\;\;\;\frac{y \cdot z}{t}\\
\mathbf{else}:\\
\;\;\;\;x - \left(-y\right)\\
\end{array}
if a < -6.4845163634350893e-221Initial program 77.0%
Applied rewrites93.9%
Taylor expanded in t around 0
Applied rewrites58.3%
Applied rewrites65.5%
Taylor expanded in z around 0
Applied rewrites59.6%
if -6.4845163634350893e-221 < a < 1.1437049085958378e-141Initial program 77.0%
Taylor expanded in t around -inf
Applied rewrites58.1%
Applied rewrites58.5%
Applied rewrites60.6%
Taylor expanded in z around inf
Applied rewrites18.3%
if 1.1437049085958378e-141 < a Initial program 77.0%
Applied rewrites80.3%
Taylor expanded in a around inf
Applied rewrites60.8%
Applied rewrites60.8%
(FPCore (x y z t a)
:precision binary64
:pre TRUE
(let* ((t_1 (- x (- y))))
(if (<= a -6.484516363435089e-221)
t_1
(if (<= a 1.1437049085958378e-141) (/ (* y z) t) t_1))))double code(double x, double y, double z, double t, double a) {
double t_1 = x - -y;
double tmp;
if (a <= -6.484516363435089e-221) {
tmp = t_1;
} else if (a <= 1.1437049085958378e-141) {
tmp = (y * z) / t;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x - -y
if (a <= (-6.484516363435089d-221)) then
tmp = t_1
else if (a <= 1.1437049085958378d-141) then
tmp = (y * 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 = x - -y;
double tmp;
if (a <= -6.484516363435089e-221) {
tmp = t_1;
} else if (a <= 1.1437049085958378e-141) {
tmp = (y * z) / t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - -y tmp = 0 if a <= -6.484516363435089e-221: tmp = t_1 elif a <= 1.1437049085958378e-141: tmp = (y * z) / t else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(-y)) tmp = 0.0 if (a <= -6.484516363435089e-221) tmp = t_1; elseif (a <= 1.1437049085958378e-141) tmp = Float64(Float64(y * z) / t); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - -y; tmp = 0.0; if (a <= -6.484516363435089e-221) tmp = t_1; elseif (a <= 1.1437049085958378e-141) tmp = (y * z) / t; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - (-y)), $MachinePrecision]}, If[LessEqual[a, -6.484516363435089e-221], t$95$1, If[LessEqual[a, 1.1437049085958378e-141], N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision], t$95$1]]]
f(x, y, z, t, a): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf], t in [-inf, +inf], a in [-inf, +inf] code: THEORY BEGIN f(x, y, z, t, a: real): real = LET t_1 = (x - (- y)) IN LET tmp_1 = IF (a <= (114370490859583777271374036729465620805172096937795052943677469182271019900591827520730328083914053097537391008004524757140382858662677664461573204580447671393737482385891980537269100108984238330795851089737739279275282826958458553828576250880428745901248441937054516857168802072728745268439250969788984492428766607666172702666036381578644476331163559734704904258251190185546875e-518)) THEN ((y * z) / t) ELSE t_1 ENDIF IN LET tmp = IF (a <= (-64845163634350893305161489319631960443392902123726436481453975237944805185575063166056120803718912265584694039716055291619812239443383167009808873683128931121477221902018764882023680076618772329835736224009857527721434962456203072720475450928231719974625665332956061501085417580924278641871820923579778616827856948597457808636045555058322098009533646702383920066212905671800637220103002524385734977723890017423958021172852685917220397555399323677886970653244957413031622884334230996362610134333925514357912184444194676996402193491775278744171373546123504638671875e-783)) THEN t_1 ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
t_1 := x - \left(-y\right)\\
\mathbf{if}\;a \leq -6.484516363435089 \cdot 10^{-221}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1.1437049085958378 \cdot 10^{-141}:\\
\;\;\;\;\frac{y \cdot z}{t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if a < -6.4845163634350893e-221 or 1.1437049085958378e-141 < a Initial program 77.0%
Applied rewrites80.3%
Taylor expanded in a around inf
Applied rewrites60.8%
Applied rewrites60.8%
if -6.4845163634350893e-221 < a < 1.1437049085958378e-141Initial program 77.0%
Taylor expanded in t around -inf
Applied rewrites58.1%
Applied rewrites58.5%
Applied rewrites60.6%
Taylor expanded in z around inf
Applied rewrites18.3%
(FPCore (x y z t a)
:precision binary64
:pre TRUE
(let* ((t_1 (- x (- y))))
(if (<= a -6.484516363435089e-221)
t_1
(if (<= a 1.1437049085958378e-141) (* y (/ z t)) t_1))))double code(double x, double y, double z, double t, double a) {
double t_1 = x - -y;
double tmp;
if (a <= -6.484516363435089e-221) {
tmp = t_1;
} else if (a <= 1.1437049085958378e-141) {
tmp = y * (z / t);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x - -y
if (a <= (-6.484516363435089d-221)) then
tmp = t_1
else if (a <= 1.1437049085958378d-141) then
tmp = y * (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 = x - -y;
double tmp;
if (a <= -6.484516363435089e-221) {
tmp = t_1;
} else if (a <= 1.1437049085958378e-141) {
tmp = y * (z / t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - -y tmp = 0 if a <= -6.484516363435089e-221: tmp = t_1 elif a <= 1.1437049085958378e-141: tmp = y * (z / t) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(-y)) tmp = 0.0 if (a <= -6.484516363435089e-221) tmp = t_1; elseif (a <= 1.1437049085958378e-141) tmp = Float64(y * Float64(z / t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - -y; tmp = 0.0; if (a <= -6.484516363435089e-221) tmp = t_1; elseif (a <= 1.1437049085958378e-141) tmp = y * (z / t); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - (-y)), $MachinePrecision]}, If[LessEqual[a, -6.484516363435089e-221], t$95$1, If[LessEqual[a, 1.1437049085958378e-141], N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision], t$95$1]]]
f(x, y, z, t, a): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf], t in [-inf, +inf], a in [-inf, +inf] code: THEORY BEGIN f(x, y, z, t, a: real): real = LET t_1 = (x - (- y)) IN LET tmp_1 = IF (a <= (114370490859583777271374036729465620805172096937795052943677469182271019900591827520730328083914053097537391008004524757140382858662677664461573204580447671393737482385891980537269100108984238330795851089737739279275282826958458553828576250880428745901248441937054516857168802072728745268439250969788984492428766607666172702666036381578644476331163559734704904258251190185546875e-518)) THEN (y * (z / t)) ELSE t_1 ENDIF IN LET tmp = IF (a <= (-64845163634350893305161489319631960443392902123726436481453975237944805185575063166056120803718912265584694039716055291619812239443383167009808873683128931121477221902018764882023680076618772329835736224009857527721434962456203072720475450928231719974625665332956061501085417580924278641871820923579778616827856948597457808636045555058322098009533646702383920066212905671800637220103002524385734977723890017423958021172852685917220397555399323677886970653244957413031622884334230996362610134333925514357912184444194676996402193491775278744171373546123504638671875e-783)) THEN t_1 ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
t_1 := x - \left(-y\right)\\
\mathbf{if}\;a \leq -6.484516363435089 \cdot 10^{-221}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1.1437049085958378 \cdot 10^{-141}:\\
\;\;\;\;y \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if a < -6.4845163634350893e-221 or 1.1437049085958378e-141 < a Initial program 77.0%
Applied rewrites80.3%
Taylor expanded in a around inf
Applied rewrites60.8%
Applied rewrites60.8%
if -6.4845163634350893e-221 < a < 1.1437049085958378e-141Initial program 77.0%
Taylor expanded in y around inf
Applied rewrites43.8%
Taylor expanded in a around 0
Applied rewrites19.7%
(FPCore (x y z t a)
:precision binary64
:pre TRUE
(let* ((t_1 (- x (- y))))
(if (<= a -5.524266933419271e-46)
t_1
(if (<= a 5.501123753950062e-83) (* x 1.0) t_1))))double code(double x, double y, double z, double t, double a) {
double t_1 = x - -y;
double tmp;
if (a <= -5.524266933419271e-46) {
tmp = t_1;
} else if (a <= 5.501123753950062e-83) {
tmp = x * 1.0;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x - -y
if (a <= (-5.524266933419271d-46)) then
tmp = t_1
else if (a <= 5.501123753950062d-83) then
tmp = x * 1.0d0
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 = x - -y;
double tmp;
if (a <= -5.524266933419271e-46) {
tmp = t_1;
} else if (a <= 5.501123753950062e-83) {
tmp = x * 1.0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - -y tmp = 0 if a <= -5.524266933419271e-46: tmp = t_1 elif a <= 5.501123753950062e-83: tmp = x * 1.0 else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(-y)) tmp = 0.0 if (a <= -5.524266933419271e-46) tmp = t_1; elseif (a <= 5.501123753950062e-83) tmp = Float64(x * 1.0); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - -y; tmp = 0.0; if (a <= -5.524266933419271e-46) tmp = t_1; elseif (a <= 5.501123753950062e-83) tmp = x * 1.0; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - (-y)), $MachinePrecision]}, If[LessEqual[a, -5.524266933419271e-46], t$95$1, If[LessEqual[a, 5.501123753950062e-83], N[(x * 1.0), $MachinePrecision], t$95$1]]]
f(x, y, z, t, a): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf], t in [-inf, +inf], a in [-inf, +inf] code: THEORY BEGIN f(x, y, z, t, a: real): real = LET t_1 = (x - (- y)) IN LET tmp_1 = IF (a <= (550112375395006215264065830248421423148279323137760169791012310228656434031263840549532241924139425239018088415733531205046607855016932308142045621145153195141818214024160484891394296818750703726441935066671096166146526229567825794219970703125e-325)) THEN (x * (1)) ELSE t_1 ENDIF IN LET tmp = IF (a <= (-5524266933419270696379376482145355092983230355190068415953939097793202543076501506689501139211518258463466868045149867072485250218960572965443134307861328125e-202)) THEN t_1 ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
t_1 := x - \left(-y\right)\\
\mathbf{if}\;a \leq -5.524266933419271 \cdot 10^{-46}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 5.501123753950062 \cdot 10^{-83}:\\
\;\;\;\;x \cdot 1\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if a < -5.5242669334192707e-46 or 5.5011237539500622e-83 < a Initial program 77.0%
Applied rewrites80.3%
Taylor expanded in a around inf
Applied rewrites60.8%
Applied rewrites60.8%
if -5.5242669334192707e-46 < a < 5.5011237539500622e-83Initial program 77.0%
Taylor expanded in x around inf
Applied rewrites68.6%
Taylor expanded in z around inf
Applied rewrites21.7%
Taylor expanded in x around inf
Applied rewrites51.9%
(FPCore (x y z t a) :precision binary64 :pre TRUE (* x 1.0))
double code(double x, double y, double z, double t, double a) {
return x * 1.0;
}
real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x * 1.0d0
end function
public static double code(double x, double y, double z, double t, double a) {
return x * 1.0;
}
def code(x, y, z, t, a): return x * 1.0
function code(x, y, z, t, a) return Float64(x * 1.0) end
function tmp = code(x, y, z, t, a) tmp = x * 1.0; end
code[x_, y_, z_, t_, a_] := N[(x * 1.0), $MachinePrecision]
f(x, y, z, t, a): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf], t in [-inf, +inf], a in [-inf, +inf] code: THEORY BEGIN f(x, y, z, t, a: real): real = x * (1) END code
x \cdot 1
Initial program 77.0%
Taylor expanded in x around inf
Applied rewrites68.6%
Taylor expanded in z around inf
Applied rewrites21.7%
Taylor expanded in x around inf
Applied rewrites51.9%
herbie shell --seed 2026092
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTick from plot-0.2.3.4, B"
:precision binary64
(- (+ x y) (/ (* (- z t) y) (- a t))))