
(FPCore (x y z t a) :precision binary64 :pre TRUE (+ x (/ (* y (- z t)) (- z a))))
double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (z - a));
}
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)) / (z - a))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (z - a));
}
def code(x, y, z, t, a): return x + ((y * (z - t)) / (z - a))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y * Float64(z - t)) / Float64(z - a))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y * (z - t)) / (z - a)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(z - 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 = x + ((y * (z - t)) / (z - a)) END code
x + \frac{y \cdot \left(z - t\right)}{z - a}
Herbie found 11 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 :pre TRUE (+ x (/ (* y (- z t)) (- z a))))
double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (z - a));
}
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)) / (z - a))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (z - a));
}
def code(x, y, z, t, a): return x + ((y * (z - t)) / (z - a))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y * Float64(z - t)) / Float64(z - a))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y * (z - t)) / (z - a)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(z - 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 = x + ((y * (z - t)) / (z - a)) END code
x + \frac{y \cdot \left(z - t\right)}{z - a}
(FPCore (x y z t a) :precision binary64 :pre TRUE (fma y (/ (- t z) (- a z)) x))
double code(double x, double y, double z, double t, double a) {
return fma(y, ((t - z) / (a - z)), x);
}
function code(x, y, z, t, a) return fma(y, Float64(Float64(t - z) / Float64(a - z)), x) end
code[x_, y_, z_, t_, a_] := N[(y * N[(N[(t - z), $MachinePrecision] / N[(a - z), $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 * ((t - z) / (a - z))) + x END code
\mathsf{fma}\left(y, \frac{t - z}{a - z}, x\right)
Initial program 85.4%
Applied rewrites98.0%
(FPCore (x y z t a)
:precision binary64
:pre TRUE
(if (<= z -3.591333072792645e+119)
(+ x (- y (* (/ t z) y)))
(if (<= z 6.160770138968741e-44)
(fma t (/ y (- a z)) x)
(+ x (* y (/ (- z t) z))))))double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.591333072792645e+119) {
tmp = x + (y - ((t / z) * y));
} else if (z <= 6.160770138968741e-44) {
tmp = fma(t, (y / (a - z)), x);
} else {
tmp = x + (y * ((z - t) / z));
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.591333072792645e+119) tmp = Float64(x + Float64(y - Float64(Float64(t / z) * y))); elseif (z <= 6.160770138968741e-44) tmp = fma(t, Float64(y / Float64(a - z)), x); else tmp = Float64(x + Float64(y * Float64(Float64(z - t) / z))); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.591333072792645e+119], N[(x + N[(y - N[(N[(t / z), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.160770138968741e-44], N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / z), $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 (z <= (6160770138968740753864306258720029515741723332288246234688933099762526271665158209876938712959280219646923952743489127925613502156920731067657470703125e-194)) THEN ((t * (y / (a - z))) + x) ELSE (x + (y * ((z - t) / z))) ENDIF IN LET tmp = IF (z <= (-359133307279264471181423639226018461358023480459202427092018584051089105935211859604956351549633280856114360094507925504)) THEN (x + (y - ((t / z) * y))) ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
\mathbf{if}\;z \leq -3.591333072792645 \cdot 10^{+119}:\\
\;\;\;\;x + \left(y - \frac{t}{z} \cdot y\right)\\
\mathbf{elif}\;z \leq 6.160770138968741 \cdot 10^{-44}:\\
\;\;\;\;\mathsf{fma}\left(t, \frac{y}{a - z}, x\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z - t}{z}\\
\end{array}
if z < -3.5913330727926447e119Initial program 85.4%
Taylor expanded in a around 0
Applied rewrites58.8%
Applied rewrites66.9%
Applied rewrites66.9%
if -3.5913330727926447e119 < z < 6.1607701389687408e-44Initial program 85.4%
Applied rewrites95.8%
Taylor expanded in z around 0
Applied rewrites76.6%
if 6.1607701389687408e-44 < z Initial program 85.4%
Taylor expanded in a around 0
Applied rewrites58.8%
Applied rewrites66.9%
(FPCore (x y z t a)
:precision binary64
:pre TRUE
(let* ((t_1 (+ x (* y (/ (- z t) z)))))
(if (<= z -3.591333072792645e+119)
t_1
(if (<= z 6.160770138968741e-44) (fma t (/ y (- a z)) x) t_1))))double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * ((z - t) / z));
double tmp;
if (z <= -3.591333072792645e+119) {
tmp = t_1;
} else if (z <= 6.160770138968741e-44) {
tmp = fma(t, (y / (a - z)), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y * Float64(Float64(z - t) / z))) tmp = 0.0 if (z <= -3.591333072792645e+119) tmp = t_1; elseif (z <= 6.160770138968741e-44) tmp = fma(t, Float64(y / Float64(a - z)), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.591333072792645e+119], t$95$1, If[LessEqual[z, 6.160770138968741e-44], N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $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 * ((z - t) / z))) IN LET tmp_1 = IF (z <= (6160770138968740753864306258720029515741723332288246234688933099762526271665158209876938712959280219646923952743489127925613502156920731067657470703125e-194)) THEN ((t * (y / (a - z))) + x) ELSE t_1 ENDIF IN LET tmp = IF (z <= (-359133307279264471181423639226018461358023480459202427092018584051089105935211859604956351549633280856114360094507925504)) THEN t_1 ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
t_1 := x + y \cdot \frac{z - t}{z}\\
\mathbf{if}\;z \leq -3.591333072792645 \cdot 10^{+119}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 6.160770138968741 \cdot 10^{-44}:\\
\;\;\;\;\mathsf{fma}\left(t, \frac{y}{a - z}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if z < -3.5913330727926447e119 or 6.1607701389687408e-44 < z Initial program 85.4%
Taylor expanded in a around 0
Applied rewrites58.8%
Applied rewrites66.9%
if -3.5913330727926447e119 < z < 6.1607701389687408e-44Initial program 85.4%
Applied rewrites95.8%
Taylor expanded in z around 0
Applied rewrites76.6%
(FPCore (x y z t a) :precision binary64 :pre TRUE (if (<= z -3.2006332828584774e+119) (+ x y) (if (<= z 1.0860344461208277e+99) (fma t (/ y (- a z)) x) (+ x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.2006332828584774e+119) {
tmp = x + y;
} else if (z <= 1.0860344461208277e+99) {
tmp = fma(t, (y / (a - z)), x);
} else {
tmp = x + y;
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.2006332828584774e+119) tmp = Float64(x + y); elseif (z <= 1.0860344461208277e+99) tmp = fma(t, Float64(y / Float64(a - z)), x); else tmp = Float64(x + y); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.2006332828584774e+119], N[(x + y), $MachinePrecision], If[LessEqual[z, 1.0860344461208277e+99], N[(t * N[(y / N[(a - z), $MachinePrecision]), $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 (z <= (1086034446120827697090662479796224499285448762806101703935024084579163397898706478714132622724825088)) THEN ((t * (y / (a - z))) + x) ELSE (x + y) ENDIF IN LET tmp = IF (z <= (-320063328285847740642475589212748460854842850679856893256051146611229254908990277072698266432116104144165336245453455360)) THEN (x + y) ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
\mathbf{if}\;z \leq -3.2006332828584774 \cdot 10^{+119}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;z \leq 1.0860344461208277 \cdot 10^{+99}:\\
\;\;\;\;\mathsf{fma}\left(t, \frac{y}{a - z}, x\right)\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
if z < -3.2006332828584774e119 or 1.0860344461208277e99 < z Initial program 85.4%
Taylor expanded in z around inf
Applied rewrites60.8%
if -3.2006332828584774e119 < z < 1.0860344461208277e99Initial program 85.4%
Applied rewrites95.8%
Taylor expanded in z around 0
Applied rewrites76.6%
(FPCore (x y z t a) :precision binary64 :pre TRUE (if (<= z -3.2006332828584774e+119) (+ x y) (if (<= z 1.0860344461208277e+99) (fma y (/ t (- a z)) x) (+ x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.2006332828584774e+119) {
tmp = x + y;
} else if (z <= 1.0860344461208277e+99) {
tmp = fma(y, (t / (a - z)), x);
} else {
tmp = x + y;
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.2006332828584774e+119) tmp = Float64(x + y); elseif (z <= 1.0860344461208277e+99) tmp = fma(y, Float64(t / Float64(a - z)), x); else tmp = Float64(x + y); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.2006332828584774e+119], N[(x + y), $MachinePrecision], If[LessEqual[z, 1.0860344461208277e+99], N[(y * N[(t / N[(a - z), $MachinePrecision]), $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 (z <= (1086034446120827697090662479796224499285448762806101703935024084579163397898706478714132622724825088)) THEN ((y * (t / (a - z))) + x) ELSE (x + y) ENDIF IN LET tmp = IF (z <= (-320063328285847740642475589212748460854842850679856893256051146611229254908990277072698266432116104144165336245453455360)) THEN (x + y) ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
\mathbf{if}\;z \leq -3.2006332828584774 \cdot 10^{+119}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;z \leq 1.0860344461208277 \cdot 10^{+99}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{t}{a - z}, x\right)\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
if z < -3.2006332828584774e119 or 1.0860344461208277e99 < z Initial program 85.4%
Taylor expanded in z around inf
Applied rewrites60.8%
if -3.2006332828584774e119 < z < 1.0860344461208277e99Initial program 85.4%
Applied rewrites98.0%
Taylor expanded in z around 0
Applied rewrites76.6%
(FPCore (x y z t a) :precision binary64 :pre TRUE (if (<= z -4.0092119274769696e+119) (+ x y) (if (<= z 4.3441364266120796e-60) (fma t (/ y a) x) (+ x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4.0092119274769696e+119) {
tmp = x + y;
} else if (z <= 4.3441364266120796e-60) {
tmp = fma(t, (y / a), x);
} else {
tmp = x + y;
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -4.0092119274769696e+119) tmp = Float64(x + y); elseif (z <= 4.3441364266120796e-60) tmp = fma(t, Float64(y / a), x); else tmp = Float64(x + y); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -4.0092119274769696e+119], N[(x + y), $MachinePrecision], If[LessEqual[z, 4.3441364266120796e-60], N[(t * N[(y / a), $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 (z <= (4344136426612079645920148933154515727349672138600712276858992012262299831984205013002927057406112051808796001553322894713288419961440763238661038627384802790487583479261957108974456787109375e-249)) THEN ((t * (y / a)) + x) ELSE (x + y) ENDIF IN LET tmp = IF (z <= (-400921192747696963113054246837181747459421505472127106883111382938515538004897083551881961629901330165306159503274672128)) THEN (x + y) ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
\mathbf{if}\;z \leq -4.0092119274769696 \cdot 10^{+119}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;z \leq 4.3441364266120796 \cdot 10^{-60}:\\
\;\;\;\;\mathsf{fma}\left(t, \frac{y}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
if z < -4.0092119274769696e119 or 4.3441364266120796e-60 < z Initial program 85.4%
Taylor expanded in z around inf
Applied rewrites60.8%
if -4.0092119274769696e119 < z < 4.3441364266120796e-60Initial program 85.4%
Applied rewrites95.8%
Taylor expanded in z around 0
Applied rewrites60.7%
Taylor expanded in z around 0
Applied rewrites62.1%
(FPCore (x y z t a) :precision binary64 :pre TRUE (if (<= z -3.730626024354086e+119) (+ x y) (if (<= z 4.3441364266120796e-60) (fma y (/ t a) x) (+ x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.730626024354086e+119) {
tmp = x + y;
} else if (z <= 4.3441364266120796e-60) {
tmp = fma(y, (t / a), x);
} else {
tmp = x + y;
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.730626024354086e+119) tmp = Float64(x + y); elseif (z <= 4.3441364266120796e-60) tmp = fma(y, Float64(t / a), x); else tmp = Float64(x + y); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.730626024354086e+119], N[(x + y), $MachinePrecision], If[LessEqual[z, 4.3441364266120796e-60], N[(y * N[(t / a), $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 (z <= (4344136426612079645920148933154515727349672138600712276858992012262299831984205013002927057406112051808796001553322894713288419961440763238661038627384802790487583479261957108974456787109375e-249)) THEN ((y * (t / a)) + x) ELSE (x + y) ENDIF IN LET tmp = IF (z <= (-373062602435408611268023258533161310779105162733438353724830879843969544358556523973484928988005879896485031666954272768)) THEN (x + y) ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
\mathbf{if}\;z \leq -3.730626024354086 \cdot 10^{+119}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;z \leq 4.3441364266120796 \cdot 10^{-60}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{t}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
if z < -3.7306260243540861e119 or 4.3441364266120796e-60 < z Initial program 85.4%
Taylor expanded in z around inf
Applied rewrites60.8%
if -3.7306260243540861e119 < z < 4.3441364266120796e-60Initial program 85.4%
Applied rewrites98.0%
Taylor expanded in z around 0
Applied rewrites62.0%
(FPCore (x y z t a) :precision binary64 :pre TRUE (if (<= a -1.3285211566063567e+112) (* x 1.0) (if (<= a 6.616817877193918e+145) (fma x (/ y x) x) (* x 1.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.3285211566063567e+112) {
tmp = x * 1.0;
} else if (a <= 6.616817877193918e+145) {
tmp = fma(x, (y / x), x);
} else {
tmp = x * 1.0;
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.3285211566063567e+112) tmp = Float64(x * 1.0); elseif (a <= 6.616817877193918e+145) tmp = fma(x, Float64(y / x), x); else tmp = Float64(x * 1.0); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.3285211566063567e+112], N[(x * 1.0), $MachinePrecision], If[LessEqual[a, 6.616817877193918e+145], N[(x * N[(y / x), $MachinePrecision] + x), $MachinePrecision], 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 = LET tmp_1 = IF (a <= (66168178771939178204990947541812968272369034485745516188850647501402849663680844545393345493574237644211583979946265929614112052047736234892591104)) THEN ((x * (y / x)) + x) ELSE (x * (1)) ENDIF IN LET tmp = IF (a <= (-13285211566063566635443518051383323030722052257711134291813311174740145788415668192172421166668371452940450267136)) THEN (x * (1)) ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
\mathbf{if}\;a \leq -1.3285211566063567 \cdot 10^{+112}:\\
\;\;\;\;x \cdot 1\\
\mathbf{elif}\;a \leq 6.616817877193918 \cdot 10^{+145}:\\
\;\;\;\;\mathsf{fma}\left(x, \frac{y}{x}, x\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 1\\
\end{array}
if a < -1.3285211566063567e112 or 6.6168178771939178e145 < a Initial program 85.4%
Taylor expanded in z around inf
Applied rewrites60.8%
Taylor expanded in x around inf
Applied rewrites58.3%
Taylor expanded in x around inf
Applied rewrites50.6%
if -1.3285211566063567e112 < a < 6.6168178771939178e145Initial program 85.4%
Taylor expanded in z around inf
Applied rewrites60.8%
Taylor expanded in x around inf
Applied rewrites58.3%
Applied rewrites58.3%
(FPCore (x y z t a) :precision binary64 :pre TRUE (if (<= a -5.356308163371003e+111) (* x 1.0) (if (<= a 6.616817877193918e+145) (+ x y) (* x 1.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -5.356308163371003e+111) {
tmp = x * 1.0;
} else if (a <= 6.616817877193918e+145) {
tmp = x + y;
} else {
tmp = x * 1.0;
}
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) :: tmp
if (a <= (-5.356308163371003d+111)) then
tmp = x * 1.0d0
else if (a <= 6.616817877193918d+145) then
tmp = x + y
else
tmp = x * 1.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -5.356308163371003e+111) {
tmp = x * 1.0;
} else if (a <= 6.616817877193918e+145) {
tmp = x + y;
} else {
tmp = x * 1.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -5.356308163371003e+111: tmp = x * 1.0 elif a <= 6.616817877193918e+145: tmp = x + y else: tmp = x * 1.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -5.356308163371003e+111) tmp = Float64(x * 1.0); elseif (a <= 6.616817877193918e+145) tmp = Float64(x + y); else tmp = Float64(x * 1.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -5.356308163371003e+111) tmp = x * 1.0; elseif (a <= 6.616817877193918e+145) tmp = x + y; else tmp = x * 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -5.356308163371003e+111], N[(x * 1.0), $MachinePrecision], If[LessEqual[a, 6.616817877193918e+145], N[(x + y), $MachinePrecision], 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 = LET tmp_1 = IF (a <= (66168178771939178204990947541812968272369034485745516188850647501402849663680844545393345493574237644211583979946265929614112052047736234892591104)) THEN (x + y) ELSE (x * (1)) ENDIF IN LET tmp = IF (a <= (-5356308163371002738388645935106676408412253501957477659145052997366278447263337038267430594153630977805130924032)) THEN (x * (1)) ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
\mathbf{if}\;a \leq -5.356308163371003 \cdot 10^{+111}:\\
\;\;\;\;x \cdot 1\\
\mathbf{elif}\;a \leq 6.616817877193918 \cdot 10^{+145}:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x \cdot 1\\
\end{array}
if a < -5.3563081633710027e111 or 6.6168178771939178e145 < a Initial program 85.4%
Taylor expanded in z around inf
Applied rewrites60.8%
Taylor expanded in x around inf
Applied rewrites58.3%
Taylor expanded in x around inf
Applied rewrites50.6%
if -5.3563081633710027e111 < a < 6.6168178771939178e145Initial program 85.4%
Taylor expanded in z around inf
Applied rewrites60.8%
(FPCore (x y z t a) :precision binary64 :pre TRUE (+ x y))
double code(double x, double y, double z, double t, double a) {
return x + y;
}
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
end function
public static double code(double x, double y, double z, double t, double a) {
return x + y;
}
def code(x, y, z, t, a): return x + y
function code(x, y, z, t, a) return Float64(x + y) end
function tmp = code(x, y, z, t, a) tmp = x + y; end
code[x_, y_, z_, t_, a_] := 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 = x + y END code
x + y
Initial program 85.4%
Taylor expanded in z around inf
Applied rewrites60.8%
(FPCore (x y z t a) :precision binary64 :pre TRUE y)
double code(double x, double y, double z, double t, double a) {
return y;
}
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 = y
end function
public static double code(double x, double y, double z, double t, double a) {
return y;
}
def code(x, y, z, t, a): return y
function code(x, y, z, t, a) return y end
function tmp = code(x, y, z, t, a) tmp = y; end
code[x_, y_, z_, t_, a_] := y
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 END code
y
Initial program 85.4%
Taylor expanded in z around inf
Applied rewrites60.8%
Taylor expanded in x around 0
Applied rewrites19.0%
herbie shell --seed 2026092
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTicks from plot-0.2.3.4, A"
:precision binary64
(+ x (/ (* y (- z t)) (- z a))))