
(FPCore (x y z t a b) :precision binary64 :pre TRUE (+ (+ (+ x (* y z)) (* t a)) (* (* a z) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((x + (y * z)) + (t * a)) + ((a * z) * b);
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
code = ((x + (y * z)) + (t * a)) + ((a * z) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x + (y * z)) + (t * a)) + ((a * z) * b);
}
def code(x, y, z, t, a, b): return ((x + (y * z)) + (t * a)) + ((a * z) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x + Float64(y * z)) + Float64(t * a)) + Float64(Float64(a * z) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((x + (y * z)) + (t * a)) + ((a * z) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(N[(a * z), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
f(x, y, z, t, a, b): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf], t in [-inf, +inf], a in [-inf, +inf], b in [-inf, +inf] code: THEORY BEGIN f(x, y, z, t, a, b: real): real = ((x + (y * z)) + (t * a)) + ((a * z) * b) END code
\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b
Herbie found 12 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 :pre TRUE (+ (+ (+ x (* y z)) (* t a)) (* (* a z) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((x + (y * z)) + (t * a)) + ((a * z) * b);
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
code = ((x + (y * z)) + (t * a)) + ((a * z) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x + (y * z)) + (t * a)) + ((a * z) * b);
}
def code(x, y, z, t, a, b): return ((x + (y * z)) + (t * a)) + ((a * z) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x + Float64(y * z)) + Float64(t * a)) + Float64(Float64(a * z) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((x + (y * z)) + (t * a)) + ((a * z) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(N[(a * z), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
f(x, y, z, t, a, b): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf], t in [-inf, +inf], a in [-inf, +inf], b in [-inf, +inf] code: THEORY BEGIN f(x, y, z, t, a, b: real): real = ((x + (y * z)) + (t * a)) + ((a * z) * b) END code
\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b
(FPCore (x y z t a b) :precision binary64 :pre TRUE (fma y z (fma (fma b z t) a x)))
double code(double x, double y, double z, double t, double a, double b) {
return fma(y, z, fma(fma(b, z, t), a, x));
}
function code(x, y, z, t, a, b) return fma(y, z, fma(fma(b, z, t), a, x)) end
code[x_, y_, z_, t_, a_, b_] := N[(y * z + N[(N[(b * z + t), $MachinePrecision] * a + x), $MachinePrecision]), $MachinePrecision]
f(x, y, z, t, a, b): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf], t in [-inf, +inf], a in [-inf, +inf], b in [-inf, +inf] code: THEORY BEGIN f(x, y, z, t, a, b: real): real = (y * z) + ((((b * z) + t) * a) + x) END code
\mathsf{fma}\left(y, z, \mathsf{fma}\left(\mathsf{fma}\left(b, z, t\right), a, x\right)\right)
Initial program 92.4%
Applied rewrites95.9%
(FPCore (x y z t a b) :precision binary64 :pre TRUE (fma a (fma b z t) (fma z y x)))
double code(double x, double y, double z, double t, double a, double b) {
return fma(a, fma(b, z, t), fma(z, y, x));
}
function code(x, y, z, t, a, b) return fma(a, fma(b, z, t), fma(z, y, x)) end
code[x_, y_, z_, t_, a_, b_] := N[(a * N[(b * z + t), $MachinePrecision] + N[(z * y + x), $MachinePrecision]), $MachinePrecision]
f(x, y, z, t, a, b): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf], t in [-inf, +inf], a in [-inf, +inf], b in [-inf, +inf] code: THEORY BEGIN f(x, y, z, t, a, b: real): real = (a * ((b * z) + t)) + ((z * y) + x) END code
\mathsf{fma}\left(a, \mathsf{fma}\left(b, z, t\right), \mathsf{fma}\left(z, y, x\right)\right)
Initial program 92.4%
Applied rewrites94.7%
(FPCore (x y z t a b)
:precision binary64
:pre TRUE
(let* ((t_1 (+ x (fma a t (* y z)))))
(if (<= t -1.0290029408705577e+39)
t_1
(if (<= t 1.6163433092851772e+103) (fma z (fma b a y) x) t_1))))double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + fma(a, t, (y * z));
double tmp;
if (t <= -1.0290029408705577e+39) {
tmp = t_1;
} else if (t <= 1.6163433092851772e+103) {
tmp = fma(z, fma(b, a, y), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(x + fma(a, t, Float64(y * z))) tmp = 0.0 if (t <= -1.0290029408705577e+39) tmp = t_1; elseif (t <= 1.6163433092851772e+103) tmp = fma(z, fma(b, a, y), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(a * t + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.0290029408705577e+39], t$95$1, If[LessEqual[t, 1.6163433092851772e+103], N[(z * N[(b * a + y), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
f(x, y, z, t, a, b): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf], t in [-inf, +inf], a in [-inf, +inf], b in [-inf, +inf] code: THEORY BEGIN f(x, y, z, t, a, b: real): real = LET t_1 = (x + ((a * t) + (y * z))) IN LET tmp_1 = IF (t <= (16163433092851771783478583547475802844320555422705729077095303238300543760771779593294521397662827151360)) THEN ((z * ((b * a) + y)) + x) ELSE t_1 ENDIF IN LET tmp = IF (t <= (-1029002940870557748486631365136013590528)) THEN t_1 ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
t_1 := x + \mathsf{fma}\left(a, t, y \cdot z\right)\\
\mathbf{if}\;t \leq -1.0290029408705577 \cdot 10^{+39}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.6163433092851772 \cdot 10^{+103}:\\
\;\;\;\;\mathsf{fma}\left(z, \mathsf{fma}\left(b, a, y\right), x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if t < -1.0290029408705577e39 or 1.6163433092851772e103 < t Initial program 92.4%
Taylor expanded in y around 0
Applied rewrites74.2%
Applied rewrites75.1%
Taylor expanded in b around 0
Applied rewrites77.5%
if -1.0290029408705577e39 < t < 1.6163433092851772e103Initial program 92.4%
Taylor expanded in t around 0
Applied rewrites70.4%
Applied rewrites74.2%
(FPCore (x y z t a b)
:precision binary64
:pre TRUE
(let* ((t_1 (fma a (fma b z t) x)))
(if (<= a -3.236277176738126e+88)
t_1
(if (<= a 4.403094324568071e-29) (fma z (fma b a y) x) t_1))))double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma(a, fma(b, z, t), x);
double tmp;
if (a <= -3.236277176738126e+88) {
tmp = t_1;
} else if (a <= 4.403094324568071e-29) {
tmp = fma(z, fma(b, a, y), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = fma(a, fma(b, z, t), x) tmp = 0.0 if (a <= -3.236277176738126e+88) tmp = t_1; elseif (a <= 4.403094324568071e-29) tmp = fma(z, fma(b, a, y), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * N[(b * z + t), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -3.236277176738126e+88], t$95$1, If[LessEqual[a, 4.403094324568071e-29], N[(z * N[(b * a + y), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
f(x, y, z, t, a, b): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf], t in [-inf, +inf], a in [-inf, +inf], b in [-inf, +inf] code: THEORY BEGIN f(x, y, z, t, a, b: real): real = LET t_1 = ((a * ((b * z) + t)) + x) IN LET tmp_1 = IF (a <= (440309432456807115603274732007944228092365790289831204449825570220422883281792547638389123676461167633533477783203125e-145)) THEN ((z * ((b * a) + y)) + x) ELSE t_1 ENDIF IN LET tmp = IF (a <= (-32362771767381261027173400555815062327721996682210731934682595531826247633566682622984192)) THEN t_1 ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
t_1 := \mathsf{fma}\left(a, \mathsf{fma}\left(b, z, t\right), x\right)\\
\mathbf{if}\;a \leq -3.236277176738126 \cdot 10^{+88}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 4.403094324568071 \cdot 10^{-29}:\\
\;\;\;\;\mathsf{fma}\left(z, \mathsf{fma}\left(b, a, y\right), x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if a < -3.2362771767381261e88 or 4.4030943245680712e-29 < a Initial program 92.4%
Taylor expanded in y around 0
Applied rewrites74.2%
Applied rewrites75.1%
if -3.2362771767381261e88 < a < 4.4030943245680712e-29Initial program 92.4%
Taylor expanded in t around 0
Applied rewrites70.4%
Applied rewrites74.2%
(FPCore (x y z t a b)
:precision binary64
:pre TRUE
(let* ((t_1 (fma a (fma b z t) x)))
(if (<= a -1.6145232955268959e-21)
t_1
(if (<= a 1.6361200213358513e-29) (+ x (* y z)) t_1))))double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma(a, fma(b, z, t), x);
double tmp;
if (a <= -1.6145232955268959e-21) {
tmp = t_1;
} else if (a <= 1.6361200213358513e-29) {
tmp = x + (y * z);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = fma(a, fma(b, z, t), x) tmp = 0.0 if (a <= -1.6145232955268959e-21) tmp = t_1; elseif (a <= 1.6361200213358513e-29) tmp = Float64(x + Float64(y * z)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * N[(b * z + t), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -1.6145232955268959e-21], t$95$1, If[LessEqual[a, 1.6361200213358513e-29], N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision], t$95$1]]]
f(x, y, z, t, a, b): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf], t in [-inf, +inf], a in [-inf, +inf], b in [-inf, +inf] code: THEORY BEGIN f(x, y, z, t, a, b: real): real = LET t_1 = ((a * ((b * z) + t)) + x) IN LET tmp_1 = IF (a <= (163612002133585128567905375442641069520673474055805915161224240298328735099806820196821632862338447012007236480712890625e-148)) THEN (x + (y * z)) ELSE t_1 ENDIF IN LET tmp = IF (a <= (-161452329552689588678725899245363663767743370433652913621441933600397788950431277044117450714111328125e-122)) THEN t_1 ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
t_1 := \mathsf{fma}\left(a, \mathsf{fma}\left(b, z, t\right), x\right)\\
\mathbf{if}\;a \leq -1.6145232955268959 \cdot 10^{-21}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1.6361200213358513 \cdot 10^{-29}:\\
\;\;\;\;x + y \cdot z\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if a < -1.6145232955268959e-21 or 1.6361200213358513e-29 < a Initial program 92.4%
Taylor expanded in y around 0
Applied rewrites74.2%
Applied rewrites75.1%
if -1.6145232955268959e-21 < a < 1.6361200213358513e-29Initial program 92.4%
Taylor expanded in y around 0
Applied rewrites74.2%
Applied rewrites75.1%
Taylor expanded in b around 0
Applied rewrites77.5%
Taylor expanded in t around 0
Applied rewrites51.8%
(FPCore (x y z t a b)
:precision binary64
:pre TRUE
(let* ((t_1 (* a (fma b z t))))
(if (<= a -1.5025481781466902e+122)
t_1
(if (<= a 6.070706073601857e+88) (+ x (* y z)) t_1))))double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * fma(b, z, t);
double tmp;
if (a <= -1.5025481781466902e+122) {
tmp = t_1;
} else if (a <= 6.070706073601857e+88) {
tmp = x + (y * z);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(a * fma(b, z, t)) tmp = 0.0 if (a <= -1.5025481781466902e+122) tmp = t_1; elseif (a <= 6.070706073601857e+88) tmp = Float64(x + Float64(y * z)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * N[(b * z + t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.5025481781466902e+122], t$95$1, If[LessEqual[a, 6.070706073601857e+88], N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision], t$95$1]]]
f(x, y, z, t, a, b): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf], t in [-inf, +inf], a in [-inf, +inf], b in [-inf, +inf] code: THEORY BEGIN f(x, y, z, t, a, b: real): real = LET t_1 = (a * ((b * z) + t)) IN LET tmp_1 = IF (a <= (60707060736018569638450938756250612026765092358842099253284006284084362032372968975237120)) THEN (x + (y * z)) ELSE t_1 ENDIF IN LET tmp = IF (a <= (-150254817814669024259716006003699880137987587893693701913014886197031797836892527087193534000552470576229625931149931970560)) THEN t_1 ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
t_1 := a \cdot \mathsf{fma}\left(b, z, t\right)\\
\mathbf{if}\;a \leq -1.5025481781466902 \cdot 10^{+122}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 6.070706073601857 \cdot 10^{+88}:\\
\;\;\;\;x + y \cdot z\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if a < -1.5025481781466902e122 or 6.070706073601857e88 < a Initial program 92.4%
Taylor expanded in a around inf
Applied rewrites51.2%
Applied rewrites51.2%
if -1.5025481781466902e122 < a < 6.070706073601857e88Initial program 92.4%
Taylor expanded in y around 0
Applied rewrites74.2%
Applied rewrites75.1%
Taylor expanded in b around 0
Applied rewrites77.5%
Taylor expanded in t around 0
Applied rewrites51.8%
(FPCore (x y z t a b)
:precision binary64
:pre TRUE
(let* ((t_1 (+ x (* a t))))
(if (<= a -1.5025481781466902e+122)
t_1
(if (<= a 4.403094324568071e-29)
(+ x (* y z))
(if (<= a 1.8596571657364098e+261) t_1 (* z (* a b)))))))double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (a * t);
double tmp;
if (a <= -1.5025481781466902e+122) {
tmp = t_1;
} else if (a <= 4.403094324568071e-29) {
tmp = x + (y * z);
} else if (a <= 1.8596571657364098e+261) {
tmp = t_1;
} else {
tmp = z * (a * b);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x + (a * t)
if (a <= (-1.5025481781466902d+122)) then
tmp = t_1
else if (a <= 4.403094324568071d-29) then
tmp = x + (y * z)
else if (a <= 1.8596571657364098d+261) then
tmp = t_1
else
tmp = z * (a * b)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (a * t);
double tmp;
if (a <= -1.5025481781466902e+122) {
tmp = t_1;
} else if (a <= 4.403094324568071e-29) {
tmp = x + (y * z);
} else if (a <= 1.8596571657364098e+261) {
tmp = t_1;
} else {
tmp = z * (a * b);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (a * t) tmp = 0 if a <= -1.5025481781466902e+122: tmp = t_1 elif a <= 4.403094324568071e-29: tmp = x + (y * z) elif a <= 1.8596571657364098e+261: tmp = t_1 else: tmp = z * (a * b) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(a * t)) tmp = 0.0 if (a <= -1.5025481781466902e+122) tmp = t_1; elseif (a <= 4.403094324568071e-29) tmp = Float64(x + Float64(y * z)); elseif (a <= 1.8596571657364098e+261) tmp = t_1; else tmp = Float64(z * Float64(a * b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (a * t); tmp = 0.0; if (a <= -1.5025481781466902e+122) tmp = t_1; elseif (a <= 4.403094324568071e-29) tmp = x + (y * z); elseif (a <= 1.8596571657364098e+261) tmp = t_1; else tmp = z * (a * b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(a * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.5025481781466902e+122], t$95$1, If[LessEqual[a, 4.403094324568071e-29], N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.8596571657364098e+261], t$95$1, N[(z * N[(a * b), $MachinePrecision]), $MachinePrecision]]]]]
f(x, y, z, t, a, b): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf], t in [-inf, +inf], a in [-inf, +inf], b in [-inf, +inf] code: THEORY BEGIN f(x, y, z, t, a, b: real): real = LET t_1 = (x + (a * t)) IN LET tmp_2 = IF (a <= (1859657165736409849594062447616553400098249051077743780668704466095678194282014325590875531396743768666214652318612539198401285876819072653331428623403200983596386392066205185212597945214994365079087396900028939075583971517152980980917241424614344844776201781248)) THEN t_1 ELSE (z * (a * b)) ENDIF IN LET tmp_1 = IF (a <= (440309432456807115603274732007944228092365790289831204449825570220422883281792547638389123676461167633533477783203125e-145)) THEN (x + (y * z)) ELSE tmp_2 ENDIF IN LET tmp = IF (a <= (-150254817814669024259716006003699880137987587893693701913014886197031797836892527087193534000552470576229625931149931970560)) THEN t_1 ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
t_1 := x + a \cdot t\\
\mathbf{if}\;a \leq -1.5025481781466902 \cdot 10^{+122}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 4.403094324568071 \cdot 10^{-29}:\\
\;\;\;\;x + y \cdot z\\
\mathbf{elif}\;a \leq 1.8596571657364098 \cdot 10^{+261}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(a \cdot b\right)\\
\end{array}
if a < -1.5025481781466902e122 or 4.4030943245680712e-29 < a < 1.8596571657364098e261Initial program 92.4%
Taylor expanded in y around 0
Applied rewrites74.2%
Applied rewrites75.1%
Taylor expanded in b around 0
Applied rewrites77.5%
Taylor expanded in y around 0
Applied rewrites52.7%
if -1.5025481781466902e122 < a < 4.4030943245680712e-29Initial program 92.4%
Taylor expanded in y around 0
Applied rewrites74.2%
Applied rewrites75.1%
Taylor expanded in b around 0
Applied rewrites77.5%
Taylor expanded in t around 0
Applied rewrites51.8%
if 1.8596571657364098e261 < a Initial program 92.4%
Taylor expanded in z around inf
Applied rewrites50.4%
Taylor expanded in y around 0
Applied rewrites27.2%
(FPCore (x y z t a b)
:precision binary64
:pre TRUE
(let* ((t_1 (fma a t (* y z))))
(if (<= t -12029383.210549757)
t_1
(if (<= t 2.637402823282898e+103) (+ x (* y z)) t_1))))double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma(a, t, (y * z));
double tmp;
if (t <= -12029383.210549757) {
tmp = t_1;
} else if (t <= 2.637402823282898e+103) {
tmp = x + (y * z);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = fma(a, t, Float64(y * z)) tmp = 0.0 if (t <= -12029383.210549757) tmp = t_1; elseif (t <= 2.637402823282898e+103) tmp = Float64(x + Float64(y * z)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * t + N[(y * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -12029383.210549757], t$95$1, If[LessEqual[t, 2.637402823282898e+103], N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision], t$95$1]]]
f(x, y, z, t, a, b): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf], t in [-inf, +inf], a in [-inf, +inf], b in [-inf, +inf] code: THEORY BEGIN f(x, y, z, t, a, b: real): real = LET t_1 = ((a * t) + (y * z)) IN LET tmp_1 = IF (t <= (26374028232828980691802585978143482065151332871634152824844431277514314811929043691290804315260337520640)) THEN (x + (y * z)) ELSE t_1 ENDIF IN LET tmp = IF (t <= (-1202938321054975688457489013671875e-26)) THEN t_1 ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
t_1 := \mathsf{fma}\left(a, t, y \cdot z\right)\\
\mathbf{if}\;t \leq -12029383.210549757:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.637402823282898 \cdot 10^{+103}:\\
\;\;\;\;x + y \cdot z\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if t < -12029383.210549757 or 2.6374028232828981e103 < t Initial program 92.4%
Taylor expanded in y around 0
Applied rewrites74.2%
Applied rewrites75.1%
Taylor expanded in b around 0
Applied rewrites77.5%
Taylor expanded in x around 0
Applied rewrites53.2%
if -12029383.210549757 < t < 2.6374028232828981e103Initial program 92.4%
Taylor expanded in y around 0
Applied rewrites74.2%
Applied rewrites75.1%
Taylor expanded in b around 0
Applied rewrites77.5%
Taylor expanded in t around 0
Applied rewrites51.8%
(FPCore (x y z t a b)
:precision binary64
:pre TRUE
(let* ((t_1 (+ x (* a t))))
(if (<= a -1.5025481781466902e+122)
t_1
(if (<= a 4.403094324568071e-29) (+ x (* y z)) t_1))))double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (a * t);
double tmp;
if (a <= -1.5025481781466902e+122) {
tmp = t_1;
} else if (a <= 4.403094324568071e-29) {
tmp = x + (y * z);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x + (a * t)
if (a <= (-1.5025481781466902d+122)) then
tmp = t_1
else if (a <= 4.403094324568071d-29) then
tmp = x + (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 a, double b) {
double t_1 = x + (a * t);
double tmp;
if (a <= -1.5025481781466902e+122) {
tmp = t_1;
} else if (a <= 4.403094324568071e-29) {
tmp = x + (y * z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (a * t) tmp = 0 if a <= -1.5025481781466902e+122: tmp = t_1 elif a <= 4.403094324568071e-29: tmp = x + (y * z) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(a * t)) tmp = 0.0 if (a <= -1.5025481781466902e+122) tmp = t_1; elseif (a <= 4.403094324568071e-29) tmp = Float64(x + Float64(y * z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (a * t); tmp = 0.0; if (a <= -1.5025481781466902e+122) tmp = t_1; elseif (a <= 4.403094324568071e-29) tmp = x + (y * z); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(a * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.5025481781466902e+122], t$95$1, If[LessEqual[a, 4.403094324568071e-29], N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision], t$95$1]]]
f(x, y, z, t, a, b): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf], t in [-inf, +inf], a in [-inf, +inf], b in [-inf, +inf] code: THEORY BEGIN f(x, y, z, t, a, b: real): real = LET t_1 = (x + (a * t)) IN LET tmp_1 = IF (a <= (440309432456807115603274732007944228092365790289831204449825570220422883281792547638389123676461167633533477783203125e-145)) THEN (x + (y * z)) ELSE t_1 ENDIF IN LET tmp = IF (a <= (-150254817814669024259716006003699880137987587893693701913014886197031797836892527087193534000552470576229625931149931970560)) THEN t_1 ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
t_1 := x + a \cdot t\\
\mathbf{if}\;a \leq -1.5025481781466902 \cdot 10^{+122}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 4.403094324568071 \cdot 10^{-29}:\\
\;\;\;\;x + y \cdot z\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if a < -1.5025481781466902e122 or 4.4030943245680712e-29 < a Initial program 92.4%
Taylor expanded in y around 0
Applied rewrites74.2%
Applied rewrites75.1%
Taylor expanded in b around 0
Applied rewrites77.5%
Taylor expanded in y around 0
Applied rewrites52.7%
if -1.5025481781466902e122 < a < 4.4030943245680712e-29Initial program 92.4%
Taylor expanded in y around 0
Applied rewrites74.2%
Applied rewrites75.1%
Taylor expanded in b around 0
Applied rewrites77.5%
Taylor expanded in t around 0
Applied rewrites51.8%
(FPCore (x y z t a b) :precision binary64 :pre TRUE (if (<= a -1.6108731000765975e+144) (* a t) (if (<= a 2.0891736297478233e+146) (+ x (* y z)) (* a t))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -1.6108731000765975e+144) {
tmp = a * t;
} else if (a <= 2.0891736297478233e+146) {
tmp = x + (y * z);
} else {
tmp = a * t;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: tmp
if (a <= (-1.6108731000765975d+144)) then
tmp = a * t
else if (a <= 2.0891736297478233d+146) then
tmp = x + (y * z)
else
tmp = a * t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -1.6108731000765975e+144) {
tmp = a * t;
} else if (a <= 2.0891736297478233e+146) {
tmp = x + (y * z);
} else {
tmp = a * t;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -1.6108731000765975e+144: tmp = a * t elif a <= 2.0891736297478233e+146: tmp = x + (y * z) else: tmp = a * t return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -1.6108731000765975e+144) tmp = Float64(a * t); elseif (a <= 2.0891736297478233e+146) tmp = Float64(x + Float64(y * z)); else tmp = Float64(a * t); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -1.6108731000765975e+144) tmp = a * t; elseif (a <= 2.0891736297478233e+146) tmp = x + (y * z); else tmp = a * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -1.6108731000765975e+144], N[(a * t), $MachinePrecision], If[LessEqual[a, 2.0891736297478233e+146], N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision], N[(a * t), $MachinePrecision]]]
f(x, y, z, t, a, b): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf], t in [-inf, +inf], a in [-inf, +inf], b in [-inf, +inf] code: THEORY BEGIN f(x, y, z, t, a, b: real): real = LET tmp_1 = IF (a <= (208917362974782334242344370490876829639259307903310463172698964211774172649710996426431075713956009777801997451260578606050158115331392638271094784)) THEN (x + (y * z)) ELSE (a * t) ENDIF IN LET tmp = IF (a <= (-1610873100076597498634470784731551506507391221633330811854394743782880426239203976559100195312012224726829715685065818757731585912425039114797056)) THEN (a * t) ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
\mathbf{if}\;a \leq -1.6108731000765975 \cdot 10^{+144}:\\
\;\;\;\;a \cdot t\\
\mathbf{elif}\;a \leq 2.0891736297478233 \cdot 10^{+146}:\\
\;\;\;\;x + y \cdot z\\
\mathbf{else}:\\
\;\;\;\;a \cdot t\\
\end{array}
if a < -1.6108731000765975e144 or 2.0891736297478233e146 < a Initial program 92.4%
Taylor expanded in a around inf
Applied rewrites51.2%
Taylor expanded in z around 0
Applied rewrites28.6%
if -1.6108731000765975e144 < a < 2.0891736297478233e146Initial program 92.4%
Taylor expanded in y around 0
Applied rewrites74.2%
Applied rewrites75.1%
Taylor expanded in b around 0
Applied rewrites77.5%
Taylor expanded in t around 0
Applied rewrites51.8%
(FPCore (x y z t a b) :precision binary64 :pre TRUE (if (<= t -12029383.210549757) (* a t) (if (<= t 2.637402823282898e+103) (* x 1.0) (* a t))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -12029383.210549757) {
tmp = a * t;
} else if (t <= 2.637402823282898e+103) {
tmp = x * 1.0;
} else {
tmp = a * t;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: tmp
if (t <= (-12029383.210549757d0)) then
tmp = a * t
else if (t <= 2.637402823282898d+103) then
tmp = x * 1.0d0
else
tmp = a * t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -12029383.210549757) {
tmp = a * t;
} else if (t <= 2.637402823282898e+103) {
tmp = x * 1.0;
} else {
tmp = a * t;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -12029383.210549757: tmp = a * t elif t <= 2.637402823282898e+103: tmp = x * 1.0 else: tmp = a * t return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -12029383.210549757) tmp = Float64(a * t); elseif (t <= 2.637402823282898e+103) tmp = Float64(x * 1.0); else tmp = Float64(a * t); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -12029383.210549757) tmp = a * t; elseif (t <= 2.637402823282898e+103) tmp = x * 1.0; else tmp = a * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -12029383.210549757], N[(a * t), $MachinePrecision], If[LessEqual[t, 2.637402823282898e+103], N[(x * 1.0), $MachinePrecision], N[(a * t), $MachinePrecision]]]
f(x, y, z, t, a, b): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf], t in [-inf, +inf], a in [-inf, +inf], b in [-inf, +inf] code: THEORY BEGIN f(x, y, z, t, a, b: real): real = LET tmp_1 = IF (t <= (26374028232828980691802585978143482065151332871634152824844431277514314811929043691290804315260337520640)) THEN (x * (1)) ELSE (a * t) ENDIF IN LET tmp = IF (t <= (-1202938321054975688457489013671875e-26)) THEN (a * t) ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
\mathbf{if}\;t \leq -12029383.210549757:\\
\;\;\;\;a \cdot t\\
\mathbf{elif}\;t \leq 2.637402823282898 \cdot 10^{+103}:\\
\;\;\;\;x \cdot 1\\
\mathbf{else}:\\
\;\;\;\;a \cdot t\\
\end{array}
if t < -12029383.210549757 or 2.6374028232828981e103 < t Initial program 92.4%
Taylor expanded in a around inf
Applied rewrites51.2%
Taylor expanded in z around 0
Applied rewrites28.6%
if -12029383.210549757 < t < 2.6374028232828981e103Initial program 92.4%
Taylor expanded in t around 0
Applied rewrites70.4%
Applied rewrites74.2%
Taylor expanded in x around inf
Applied rewrites67.9%
Taylor expanded in x around inf
Applied rewrites26.1%
(FPCore (x y z t a b) :precision binary64 :pre TRUE (* x 1.0))
double code(double x, double y, double z, double t, double a, double b) {
return x * 1.0;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
code = x * 1.0d0
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x * 1.0;
}
def code(x, y, z, t, a, b): return x * 1.0
function code(x, y, z, t, a, b) return Float64(x * 1.0) end
function tmp = code(x, y, z, t, a, b) tmp = x * 1.0; end
code[x_, y_, z_, t_, a_, b_] := N[(x * 1.0), $MachinePrecision]
f(x, y, z, t, a, b): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf], t in [-inf, +inf], a in [-inf, +inf], b in [-inf, +inf] code: THEORY BEGIN f(x, y, z, t, a, b: real): real = x * (1) END code
x \cdot 1
Initial program 92.4%
Taylor expanded in t around 0
Applied rewrites70.4%
Applied rewrites74.2%
Taylor expanded in x around inf
Applied rewrites67.9%
Taylor expanded in x around inf
Applied rewrites26.1%
herbie shell --seed 2026092
(FPCore (x y z t a b)
:name "Graphics.Rasterific.CubicBezier:cachedBezierAt from Rasterific-0.6.1"
:precision binary64
(+ (+ (+ x (* y z)) (* t a)) (* (* a z) b)))