
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y z) (- t x)) (- a z))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * (t - x)) / (a - z));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + (((y - z) * (t - x)) / (a - z))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * (t - x)) / (a - z));
}
def code(x, y, z, t, a): return x + (((y - z) * (t - x)) / (a - z))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - z) * (t - x)) / (a - z)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 21 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y z) (- t x)) (- a z))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * (t - x)) / (a - z));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + (((y - z) * (t - x)) / (a - z))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * (t - x)) / (a - z));
}
def code(x, y, z, t, a): return x + (((y - z) * (t - x)) / (a - z))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - z) * (t - x)) / (a - z)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (- t x) (/ (- z y) (- z a)) x))
(t_2 (- x (/ (* (- z y) (- x t)) (- z a)))))
(if (<= t_2 -5e-290)
t_1
(if (<= t_2 0.0) (- t (* (- y a) (/ (- t x) z))) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((t - x), ((z - y) / (z - a)), x);
double t_2 = x - (((z - y) * (x - t)) / (z - a));
double tmp;
if (t_2 <= -5e-290) {
tmp = t_1;
} else if (t_2 <= 0.0) {
tmp = t - ((y - a) * ((t - x) / z));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(t - x), Float64(Float64(z - y) / Float64(z - a)), x) t_2 = Float64(x - Float64(Float64(Float64(z - y) * Float64(x - t)) / Float64(z - a))) tmp = 0.0 if (t_2 <= -5e-290) tmp = t_1; elseif (t_2 <= 0.0) tmp = Float64(t - Float64(Float64(y - a) * Float64(Float64(t - x) / z))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(t - x), $MachinePrecision] * N[(N[(z - y), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]}, Block[{t$95$2 = N[(x - N[(N[(N[(z - y), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -5e-290], t$95$1, If[LessEqual[t$95$2, 0.0], N[(t - N[(N[(y - a), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(t - x, \frac{z - y}{z - a}, x\right)\\
t_2 := x - \frac{\left(z - y\right) \cdot \left(x - t\right)}{z - a}\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{-290}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;t - \left(y - a\right) \cdot \frac{t - x}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -5.0000000000000001e-290 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) Initial program 73.9%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6491.5
Applied rewrites91.5%
if -5.0000000000000001e-290 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 0.0Initial program 4.3%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f644.3
Applied rewrites4.3%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6499.9
Applied rewrites99.9%
Final simplification92.1%
(FPCore (x y z t a)
:precision binary64
(if (<= a -3.8e+56)
(* 1.0 x)
(if (<= a -1.75e-171)
(/ (* (- t x) y) a)
(if (<= a -7e-228)
(* (/ t x) x)
(if (<= a 1.75e+111) (* (/ y (- a z)) t) (* 1.0 x))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.8e+56) {
tmp = 1.0 * x;
} else if (a <= -1.75e-171) {
tmp = ((t - x) * y) / a;
} else if (a <= -7e-228) {
tmp = (t / x) * x;
} else if (a <= 1.75e+111) {
tmp = (y / (a - z)) * t;
} else {
tmp = 1.0 * x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-3.8d+56)) then
tmp = 1.0d0 * x
else if (a <= (-1.75d-171)) then
tmp = ((t - x) * y) / a
else if (a <= (-7d-228)) then
tmp = (t / x) * x
else if (a <= 1.75d+111) then
tmp = (y / (a - z)) * t
else
tmp = 1.0d0 * x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.8e+56) {
tmp = 1.0 * x;
} else if (a <= -1.75e-171) {
tmp = ((t - x) * y) / a;
} else if (a <= -7e-228) {
tmp = (t / x) * x;
} else if (a <= 1.75e+111) {
tmp = (y / (a - z)) * t;
} else {
tmp = 1.0 * x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -3.8e+56: tmp = 1.0 * x elif a <= -1.75e-171: tmp = ((t - x) * y) / a elif a <= -7e-228: tmp = (t / x) * x elif a <= 1.75e+111: tmp = (y / (a - z)) * t else: tmp = 1.0 * x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -3.8e+56) tmp = Float64(1.0 * x); elseif (a <= -1.75e-171) tmp = Float64(Float64(Float64(t - x) * y) / a); elseif (a <= -7e-228) tmp = Float64(Float64(t / x) * x); elseif (a <= 1.75e+111) tmp = Float64(Float64(y / Float64(a - z)) * t); else tmp = Float64(1.0 * x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -3.8e+56) tmp = 1.0 * x; elseif (a <= -1.75e-171) tmp = ((t - x) * y) / a; elseif (a <= -7e-228) tmp = (t / x) * x; elseif (a <= 1.75e+111) tmp = (y / (a - z)) * t; else tmp = 1.0 * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -3.8e+56], N[(1.0 * x), $MachinePrecision], If[LessEqual[a, -1.75e-171], N[(N[(N[(t - x), $MachinePrecision] * y), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[a, -7e-228], N[(N[(t / x), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[a, 1.75e+111], N[(N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], N[(1.0 * x), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.8 \cdot 10^{+56}:\\
\;\;\;\;1 \cdot x\\
\mathbf{elif}\;a \leq -1.75 \cdot 10^{-171}:\\
\;\;\;\;\frac{\left(t - x\right) \cdot y}{a}\\
\mathbf{elif}\;a \leq -7 \cdot 10^{-228}:\\
\;\;\;\;\frac{t}{x} \cdot x\\
\mathbf{elif}\;a \leq 1.75 \cdot 10^{+111}:\\
\;\;\;\;\frac{y}{a - z} \cdot t\\
\mathbf{else}:\\
\;\;\;\;1 \cdot x\\
\end{array}
\end{array}
if a < -3.79999999999999996e56 or 1.7500000000000001e111 < a Initial program 65.9%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
+-commutativeN/A
times-fracN/A
distribute-rgt-outN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f64N/A
lower-+.f64N/A
lower-/.f6484.2
Applied rewrites84.2%
Taylor expanded in a around inf
Applied rewrites60.0%
if -3.79999999999999996e56 < a < -1.74999999999999997e-171Initial program 75.4%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6481.2
Applied rewrites81.2%
Taylor expanded in y around inf
div-subN/A
associate-/l*N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6462.4
Applied rewrites62.4%
Taylor expanded in a around inf
Applied rewrites42.8%
if -1.74999999999999997e-171 < a < -6.9999999999999995e-228Initial program 59.1%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
+-commutativeN/A
times-fracN/A
distribute-rgt-outN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f64N/A
lower-+.f64N/A
lower-/.f6459.9
Applied rewrites59.9%
Taylor expanded in z around inf
Applied rewrites68.0%
if -6.9999999999999995e-228 < a < 1.7500000000000001e111Initial program 70.7%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6484.7
Applied rewrites84.7%
Taylor expanded in y around inf
div-subN/A
associate-/l*N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6456.8
Applied rewrites56.8%
Taylor expanded in t around inf
Applied rewrites42.6%
Final simplification50.4%
(FPCore (x y z t a)
:precision binary64
(if (<= a -1.82e+155)
(* 1.0 x)
(if (<= a -1.48e-294)
(* (/ t (- a z)) y)
(if (<= a 6.5e-115)
(* (/ t x) x)
(if (<= a 1.4e+124) (* (/ (- y z) a) t) (* 1.0 x))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.82e+155) {
tmp = 1.0 * x;
} else if (a <= -1.48e-294) {
tmp = (t / (a - z)) * y;
} else if (a <= 6.5e-115) {
tmp = (t / x) * x;
} else if (a <= 1.4e+124) {
tmp = ((y - z) / a) * t;
} else {
tmp = 1.0 * x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-1.82d+155)) then
tmp = 1.0d0 * x
else if (a <= (-1.48d-294)) then
tmp = (t / (a - z)) * y
else if (a <= 6.5d-115) then
tmp = (t / x) * x
else if (a <= 1.4d+124) then
tmp = ((y - z) / a) * t
else
tmp = 1.0d0 * x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.82e+155) {
tmp = 1.0 * x;
} else if (a <= -1.48e-294) {
tmp = (t / (a - z)) * y;
} else if (a <= 6.5e-115) {
tmp = (t / x) * x;
} else if (a <= 1.4e+124) {
tmp = ((y - z) / a) * t;
} else {
tmp = 1.0 * x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.82e+155: tmp = 1.0 * x elif a <= -1.48e-294: tmp = (t / (a - z)) * y elif a <= 6.5e-115: tmp = (t / x) * x elif a <= 1.4e+124: tmp = ((y - z) / a) * t else: tmp = 1.0 * x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.82e+155) tmp = Float64(1.0 * x); elseif (a <= -1.48e-294) tmp = Float64(Float64(t / Float64(a - z)) * y); elseif (a <= 6.5e-115) tmp = Float64(Float64(t / x) * x); elseif (a <= 1.4e+124) tmp = Float64(Float64(Float64(y - z) / a) * t); else tmp = Float64(1.0 * x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.82e+155) tmp = 1.0 * x; elseif (a <= -1.48e-294) tmp = (t / (a - z)) * y; elseif (a <= 6.5e-115) tmp = (t / x) * x; elseif (a <= 1.4e+124) tmp = ((y - z) / a) * t; else tmp = 1.0 * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.82e+155], N[(1.0 * x), $MachinePrecision], If[LessEqual[a, -1.48e-294], N[(N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[a, 6.5e-115], N[(N[(t / x), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[a, 1.4e+124], N[(N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision] * t), $MachinePrecision], N[(1.0 * x), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.82 \cdot 10^{+155}:\\
\;\;\;\;1 \cdot x\\
\mathbf{elif}\;a \leq -1.48 \cdot 10^{-294}:\\
\;\;\;\;\frac{t}{a - z} \cdot y\\
\mathbf{elif}\;a \leq 6.5 \cdot 10^{-115}:\\
\;\;\;\;\frac{t}{x} \cdot x\\
\mathbf{elif}\;a \leq 1.4 \cdot 10^{+124}:\\
\;\;\;\;\frac{y - z}{a} \cdot t\\
\mathbf{else}:\\
\;\;\;\;1 \cdot x\\
\end{array}
\end{array}
if a < -1.81999999999999989e155 or 1.4e124 < a Initial program 66.3%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
+-commutativeN/A
times-fracN/A
distribute-rgt-outN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f64N/A
lower-+.f64N/A
lower-/.f6486.4
Applied rewrites86.4%
Taylor expanded in a around inf
Applied rewrites65.2%
if -1.81999999999999989e155 < a < -1.48e-294Initial program 71.7%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6456.8
Applied rewrites56.8%
Taylor expanded in y around inf
Applied rewrites35.7%
if -1.48e-294 < a < 6.50000000000000033e-115Initial program 69.3%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
+-commutativeN/A
times-fracN/A
distribute-rgt-outN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f64N/A
lower-+.f64N/A
lower-/.f6475.0
Applied rewrites75.0%
Taylor expanded in z around inf
Applied rewrites39.2%
if 6.50000000000000033e-115 < a < 1.4e124Initial program 69.9%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6453.6
Applied rewrites53.6%
Taylor expanded in a around inf
Applied rewrites40.1%
Final simplification46.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (/ (- y z) a) t)))
(if (<= a -1.85e+157)
(* 1.0 x)
(if (<= a -2.5e-133)
t_1
(if (<= a 6.5e-115)
(* (/ t x) x)
(if (<= a 1.4e+124) t_1 (* 1.0 x)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = ((y - z) / a) * t;
double tmp;
if (a <= -1.85e+157) {
tmp = 1.0 * x;
} else if (a <= -2.5e-133) {
tmp = t_1;
} else if (a <= 6.5e-115) {
tmp = (t / x) * x;
} else if (a <= 1.4e+124) {
tmp = t_1;
} else {
tmp = 1.0 * x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = ((y - z) / a) * t
if (a <= (-1.85d+157)) then
tmp = 1.0d0 * x
else if (a <= (-2.5d-133)) then
tmp = t_1
else if (a <= 6.5d-115) then
tmp = (t / x) * x
else if (a <= 1.4d+124) then
tmp = t_1
else
tmp = 1.0d0 * x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = ((y - z) / a) * t;
double tmp;
if (a <= -1.85e+157) {
tmp = 1.0 * x;
} else if (a <= -2.5e-133) {
tmp = t_1;
} else if (a <= 6.5e-115) {
tmp = (t / x) * x;
} else if (a <= 1.4e+124) {
tmp = t_1;
} else {
tmp = 1.0 * x;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = ((y - z) / a) * t tmp = 0 if a <= -1.85e+157: tmp = 1.0 * x elif a <= -2.5e-133: tmp = t_1 elif a <= 6.5e-115: tmp = (t / x) * x elif a <= 1.4e+124: tmp = t_1 else: tmp = 1.0 * x return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(Float64(y - z) / a) * t) tmp = 0.0 if (a <= -1.85e+157) tmp = Float64(1.0 * x); elseif (a <= -2.5e-133) tmp = t_1; elseif (a <= 6.5e-115) tmp = Float64(Float64(t / x) * x); elseif (a <= 1.4e+124) tmp = t_1; else tmp = Float64(1.0 * x); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = ((y - z) / a) * t; tmp = 0.0; if (a <= -1.85e+157) tmp = 1.0 * x; elseif (a <= -2.5e-133) tmp = t_1; elseif (a <= 6.5e-115) tmp = (t / x) * x; elseif (a <= 1.4e+124) tmp = t_1; else tmp = 1.0 * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[a, -1.85e+157], N[(1.0 * x), $MachinePrecision], If[LessEqual[a, -2.5e-133], t$95$1, If[LessEqual[a, 6.5e-115], N[(N[(t / x), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[a, 1.4e+124], t$95$1, N[(1.0 * x), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y - z}{a} \cdot t\\
\mathbf{if}\;a \leq -1.85 \cdot 10^{+157}:\\
\;\;\;\;1 \cdot x\\
\mathbf{elif}\;a \leq -2.5 \cdot 10^{-133}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 6.5 \cdot 10^{-115}:\\
\;\;\;\;\frac{t}{x} \cdot x\\
\mathbf{elif}\;a \leq 1.4 \cdot 10^{+124}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;1 \cdot x\\
\end{array}
\end{array}
if a < -1.8499999999999999e157 or 1.4e124 < a Initial program 66.3%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
+-commutativeN/A
times-fracN/A
distribute-rgt-outN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f64N/A
lower-+.f64N/A
lower-/.f6486.4
Applied rewrites86.4%
Taylor expanded in a around inf
Applied rewrites65.2%
if -1.8499999999999999e157 < a < -2.5e-133 or 6.50000000000000033e-115 < a < 1.4e124Initial program 71.6%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6452.6
Applied rewrites52.6%
Taylor expanded in a around inf
Applied rewrites36.3%
if -2.5e-133 < a < 6.50000000000000033e-115Initial program 69.2%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
+-commutativeN/A
times-fracN/A
distribute-rgt-outN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f64N/A
lower-+.f64N/A
lower-/.f6472.7
Applied rewrites72.7%
Taylor expanded in z around inf
Applied rewrites37.3%
Final simplification46.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (/ (- y z) a) (- t x) x)))
(if (<= a -8e+41)
t_1
(if (<= a -1.8e-165)
(/ (* (- x t) y) (- z a))
(if (<= a 90000000000000.0) (* (/ (- z y) (- z a)) t) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(((y - z) / a), (t - x), x);
double tmp;
if (a <= -8e+41) {
tmp = t_1;
} else if (a <= -1.8e-165) {
tmp = ((x - t) * y) / (z - a);
} else if (a <= 90000000000000.0) {
tmp = ((z - y) / (z - a)) * t;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(Float64(y - z) / a), Float64(t - x), x) tmp = 0.0 if (a <= -8e+41) tmp = t_1; elseif (a <= -1.8e-165) tmp = Float64(Float64(Float64(x - t) * y) / Float64(z - a)); elseif (a <= 90000000000000.0) tmp = Float64(Float64(Float64(z - y) / Float64(z - a)) * t); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -8e+41], t$95$1, If[LessEqual[a, -1.8e-165], N[(N[(N[(x - t), $MachinePrecision] * y), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 90000000000000.0], N[(N[(N[(z - y), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{y - z}{a}, t - x, x\right)\\
\mathbf{if}\;a \leq -8 \cdot 10^{+41}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -1.8 \cdot 10^{-165}:\\
\;\;\;\;\frac{\left(x - t\right) \cdot y}{z - a}\\
\mathbf{elif}\;a \leq 90000000000000:\\
\;\;\;\;\frac{z - y}{z - a} \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -8.00000000000000005e41 or 9e13 < a Initial program 65.2%
Taylor expanded in a around inf
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6478.4
Applied rewrites78.4%
if -8.00000000000000005e41 < a < -1.79999999999999992e-165Initial program 79.9%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6480.1
Applied rewrites80.1%
Taylor expanded in y around inf
div-subN/A
associate-/l*N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6471.2
Applied rewrites71.2%
if -1.79999999999999992e-165 < a < 9e13Initial program 69.6%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6481.1
Applied rewrites81.1%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
div-subN/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6472.1
Applied rewrites72.1%
Final simplification74.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (/ y a) t)))
(if (<= a -1.82e+155)
(* 1.0 x)
(if (<= a -2.4e-114)
t_1
(if (<= a 1.12e-111)
(* (/ t x) x)
(if (<= a 1.8e+67) t_1 (* 1.0 x)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y / a) * t;
double tmp;
if (a <= -1.82e+155) {
tmp = 1.0 * x;
} else if (a <= -2.4e-114) {
tmp = t_1;
} else if (a <= 1.12e-111) {
tmp = (t / x) * x;
} else if (a <= 1.8e+67) {
tmp = t_1;
} else {
tmp = 1.0 * x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (y / a) * t
if (a <= (-1.82d+155)) then
tmp = 1.0d0 * x
else if (a <= (-2.4d-114)) then
tmp = t_1
else if (a <= 1.12d-111) then
tmp = (t / x) * x
else if (a <= 1.8d+67) then
tmp = t_1
else
tmp = 1.0d0 * x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (y / a) * t;
double tmp;
if (a <= -1.82e+155) {
tmp = 1.0 * x;
} else if (a <= -2.4e-114) {
tmp = t_1;
} else if (a <= 1.12e-111) {
tmp = (t / x) * x;
} else if (a <= 1.8e+67) {
tmp = t_1;
} else {
tmp = 1.0 * x;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y / a) * t tmp = 0 if a <= -1.82e+155: tmp = 1.0 * x elif a <= -2.4e-114: tmp = t_1 elif a <= 1.12e-111: tmp = (t / x) * x elif a <= 1.8e+67: tmp = t_1 else: tmp = 1.0 * x return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y / a) * t) tmp = 0.0 if (a <= -1.82e+155) tmp = Float64(1.0 * x); elseif (a <= -2.4e-114) tmp = t_1; elseif (a <= 1.12e-111) tmp = Float64(Float64(t / x) * x); elseif (a <= 1.8e+67) tmp = t_1; else tmp = Float64(1.0 * x); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y / a) * t; tmp = 0.0; if (a <= -1.82e+155) tmp = 1.0 * x; elseif (a <= -2.4e-114) tmp = t_1; elseif (a <= 1.12e-111) tmp = (t / x) * x; elseif (a <= 1.8e+67) tmp = t_1; else tmp = 1.0 * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y / a), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[a, -1.82e+155], N[(1.0 * x), $MachinePrecision], If[LessEqual[a, -2.4e-114], t$95$1, If[LessEqual[a, 1.12e-111], N[(N[(t / x), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[a, 1.8e+67], t$95$1, N[(1.0 * x), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y}{a} \cdot t\\
\mathbf{if}\;a \leq -1.82 \cdot 10^{+155}:\\
\;\;\;\;1 \cdot x\\
\mathbf{elif}\;a \leq -2.4 \cdot 10^{-114}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1.12 \cdot 10^{-111}:\\
\;\;\;\;\frac{t}{x} \cdot x\\
\mathbf{elif}\;a \leq 1.8 \cdot 10^{+67}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;1 \cdot x\\
\end{array}
\end{array}
if a < -1.81999999999999989e155 or 1.7999999999999999e67 < a Initial program 65.5%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
+-commutativeN/A
times-fracN/A
distribute-rgt-outN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f64N/A
lower-+.f64N/A
lower-/.f6483.5
Applied rewrites83.5%
Taylor expanded in a around inf
Applied rewrites61.3%
if -1.81999999999999989e155 < a < -2.4000000000000001e-114 or 1.12000000000000009e-111 < a < 1.7999999999999999e67Initial program 73.2%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6453.9
Applied rewrites53.9%
Taylor expanded in z around 0
Applied rewrites37.9%
if -2.4000000000000001e-114 < a < 1.12000000000000009e-111Initial program 69.2%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
+-commutativeN/A
times-fracN/A
distribute-rgt-outN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f64N/A
lower-+.f64N/A
lower-/.f6471.2
Applied rewrites71.2%
Taylor expanded in z around inf
Applied rewrites34.9%
Final simplification45.5%
(FPCore (x y z t a)
:precision binary64
(if (<= z -4.6e+226)
(fma a (/ (- t x) z) t)
(if (<= z -4.6e+76)
(* (/ y (- z a)) (- x t))
(if (<= z 6.5e+69) (fma (- t x) (/ y a) x) (* (- z y) (/ t (- z a)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4.6e+226) {
tmp = fma(a, ((t - x) / z), t);
} else if (z <= -4.6e+76) {
tmp = (y / (z - a)) * (x - t);
} else if (z <= 6.5e+69) {
tmp = fma((t - x), (y / a), x);
} else {
tmp = (z - y) * (t / (z - a));
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -4.6e+226) tmp = fma(a, Float64(Float64(t - x) / z), t); elseif (z <= -4.6e+76) tmp = Float64(Float64(y / Float64(z - a)) * Float64(x - t)); elseif (z <= 6.5e+69) tmp = fma(Float64(t - x), Float64(y / a), x); else tmp = Float64(Float64(z - y) * Float64(t / Float64(z - a))); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -4.6e+226], N[(a * N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision], If[LessEqual[z, -4.6e+76], N[(N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.5e+69], N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision] + x), $MachinePrecision], N[(N[(z - y), $MachinePrecision] * N[(t / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.6 \cdot 10^{+226}:\\
\;\;\;\;\mathsf{fma}\left(a, \frac{t - x}{z}, t\right)\\
\mathbf{elif}\;z \leq -4.6 \cdot 10^{+76}:\\
\;\;\;\;\frac{y}{z - a} \cdot \left(x - t\right)\\
\mathbf{elif}\;z \leq 6.5 \cdot 10^{+69}:\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;\left(z - y\right) \cdot \frac{t}{z - a}\\
\end{array}
\end{array}
if z < -4.5999999999999999e226Initial program 30.1%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6457.3
Applied rewrites57.3%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6478.9
Applied rewrites78.9%
Taylor expanded in y around 0
Applied rewrites63.3%
if -4.5999999999999999e226 < z < -4.60000000000000002e76Initial program 49.4%
Taylor expanded in y around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6447.7
Applied rewrites47.7%
if -4.60000000000000002e76 < z < 6.5000000000000001e69Initial program 87.4%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6494.2
Applied rewrites94.2%
Taylor expanded in z around 0
lower-/.f6479.0
Applied rewrites79.0%
if 6.5000000000000001e69 < z Initial program 42.7%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6467.8
Applied rewrites67.8%
Final simplification71.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma a (/ (- t x) z) t)))
(if (<= z -4.6e+226)
t_1
(if (<= z -4.6e+76)
(* (/ y (- z a)) (- x t))
(if (<= z 3.8e+109) (fma (- t x) (/ y a) x) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(a, ((t - x) / z), t);
double tmp;
if (z <= -4.6e+226) {
tmp = t_1;
} else if (z <= -4.6e+76) {
tmp = (y / (z - a)) * (x - t);
} else if (z <= 3.8e+109) {
tmp = fma((t - x), (y / a), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(a, Float64(Float64(t - x) / z), t) tmp = 0.0 if (z <= -4.6e+226) tmp = t_1; elseif (z <= -4.6e+76) tmp = Float64(Float64(y / Float64(z - a)) * Float64(x - t)); elseif (z <= 3.8e+109) tmp = fma(Float64(t - x), Float64(y / a), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(a * N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision]}, If[LessEqual[z, -4.6e+226], t$95$1, If[LessEqual[z, -4.6e+76], N[(N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.8e+109], N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(a, \frac{t - x}{z}, t\right)\\
\mathbf{if}\;z \leq -4.6 \cdot 10^{+226}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -4.6 \cdot 10^{+76}:\\
\;\;\;\;\frac{y}{z - a} \cdot \left(x - t\right)\\
\mathbf{elif}\;z \leq 3.8 \cdot 10^{+109}:\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -4.5999999999999999e226 or 3.80000000000000039e109 < z Initial program 36.0%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6465.6
Applied rewrites65.6%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6484.6
Applied rewrites84.6%
Taylor expanded in y around 0
Applied rewrites71.6%
if -4.5999999999999999e226 < z < -4.60000000000000002e76Initial program 49.4%
Taylor expanded in y around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6447.7
Applied rewrites47.7%
if -4.60000000000000002e76 < z < 3.80000000000000039e109Initial program 85.3%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6494.6
Applied rewrites94.6%
Taylor expanded in z around 0
lower-/.f6476.2
Applied rewrites76.2%
Final simplification71.3%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.1e+146)
(- t (* (- y a) (/ (- t x) z)))
(if (<= z 3.05e+109)
(fma (- t x) (/ y (- a z)) x)
(fma (/ (fma t -1.0 x) z) (- y a) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.1e+146) {
tmp = t - ((y - a) * ((t - x) / z));
} else if (z <= 3.05e+109) {
tmp = fma((t - x), (y / (a - z)), x);
} else {
tmp = fma((fma(t, -1.0, x) / z), (y - a), t);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.1e+146) tmp = Float64(t - Float64(Float64(y - a) * Float64(Float64(t - x) / z))); elseif (z <= 3.05e+109) tmp = fma(Float64(t - x), Float64(y / Float64(a - z)), x); else tmp = fma(Float64(fma(t, -1.0, x) / z), Float64(y - a), t); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.1e+146], N[(t - N[(N[(y - a), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.05e+109], N[(N[(t - x), $MachinePrecision] * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(N[(N[(t * -1.0 + x), $MachinePrecision] / z), $MachinePrecision] * N[(y - a), $MachinePrecision] + t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.1 \cdot 10^{+146}:\\
\;\;\;\;t - \left(y - a\right) \cdot \frac{t - x}{z}\\
\mathbf{elif}\;z \leq 3.05 \cdot 10^{+109}:\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y}{a - z}, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{\mathsf{fma}\left(t, -1, x\right)}{z}, y - a, t\right)\\
\end{array}
\end{array}
if z < -1.0999999999999999e146Initial program 36.1%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6460.9
Applied rewrites60.9%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6476.6
Applied rewrites76.6%
if -1.0999999999999999e146 < z < 3.05000000000000004e109Initial program 81.9%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6493.8
Applied rewrites93.8%
Taylor expanded in y around inf
lower-/.f64N/A
lower--.f6483.5
Applied rewrites83.5%
if 3.05000000000000004e109 < z Initial program 38.6%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites87.3%
Final simplification83.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- t (* (- y a) (/ (- t x) z)))))
(if (<= z -1.1e+146)
t_1
(if (<= z 3.05e+109) (fma (- t x) (/ y (- a z)) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t - ((y - a) * ((t - x) / z));
double tmp;
if (z <= -1.1e+146) {
tmp = t_1;
} else if (z <= 3.05e+109) {
tmp = fma((t - x), (y / (a - z)), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(t - Float64(Float64(y - a) * Float64(Float64(t - x) / z))) tmp = 0.0 if (z <= -1.1e+146) tmp = t_1; elseif (z <= 3.05e+109) tmp = fma(Float64(t - x), 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[(t - N[(N[(y - a), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.1e+146], t$95$1, If[LessEqual[z, 3.05e+109], N[(N[(t - x), $MachinePrecision] * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t - \left(y - a\right) \cdot \frac{t - x}{z}\\
\mathbf{if}\;z \leq -1.1 \cdot 10^{+146}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3.05 \cdot 10^{+109}:\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y}{a - z}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.0999999999999999e146 or 3.05000000000000004e109 < z Initial program 37.5%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6465.5
Applied rewrites65.5%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6482.4
Applied rewrites82.4%
if -1.0999999999999999e146 < z < 3.05000000000000004e109Initial program 81.9%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6493.8
Applied rewrites93.8%
Taylor expanded in y around inf
lower-/.f64N/A
lower--.f6483.5
Applied rewrites83.5%
Final simplification83.2%
(FPCore (x y z t a)
:precision binary64
(if (<= z -2.5e+138)
(- t (* (/ (- a y) z) x))
(if (<= z 1.12e+110)
(fma (- t x) (/ y (- a z)) x)
(* (/ (- z y) (- z a)) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.5e+138) {
tmp = t - (((a - y) / z) * x);
} else if (z <= 1.12e+110) {
tmp = fma((t - x), (y / (a - z)), x);
} else {
tmp = ((z - y) / (z - a)) * t;
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.5e+138) tmp = Float64(t - Float64(Float64(Float64(a - y) / z) * x)); elseif (z <= 1.12e+110) tmp = fma(Float64(t - x), Float64(y / Float64(a - z)), x); else tmp = Float64(Float64(Float64(z - y) / Float64(z - a)) * t); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.5e+138], N[(t - N[(N[(N[(a - y), $MachinePrecision] / z), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.12e+110], N[(N[(t - x), $MachinePrecision] * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(N[(N[(z - y), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.5 \cdot 10^{+138}:\\
\;\;\;\;t - \frac{a - y}{z} \cdot x\\
\mathbf{elif}\;z \leq 1.12 \cdot 10^{+110}:\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y}{a - z}, x\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{z - y}{z - a} \cdot t\\
\end{array}
\end{array}
if z < -2.50000000000000008e138Initial program 36.9%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6460.3
Applied rewrites60.3%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6475.2
Applied rewrites75.2%
Taylor expanded in t around 0
Applied rewrites70.3%
if -2.50000000000000008e138 < z < 1.1200000000000001e110Initial program 82.3%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6494.2
Applied rewrites94.2%
Taylor expanded in y around inf
lower-/.f64N/A
lower--.f6483.9
Applied rewrites83.9%
if 1.1200000000000001e110 < z Initial program 38.6%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6469.4
Applied rewrites69.4%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
div-subN/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6475.9
Applied rewrites75.9%
Final simplification80.8%
(FPCore (x y z t a)
:precision binary64
(if (<= z -9.6e+246)
(fma a (/ (- t x) z) t)
(if (<= z 1.12e+110)
(fma (- t x) (/ y (- a z)) x)
(* (/ (- z y) (- z a)) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -9.6e+246) {
tmp = fma(a, ((t - x) / z), t);
} else if (z <= 1.12e+110) {
tmp = fma((t - x), (y / (a - z)), x);
} else {
tmp = ((z - y) / (z - a)) * t;
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -9.6e+246) tmp = fma(a, Float64(Float64(t - x) / z), t); elseif (z <= 1.12e+110) tmp = fma(Float64(t - x), Float64(y / Float64(a - z)), x); else tmp = Float64(Float64(Float64(z - y) / Float64(z - a)) * t); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -9.6e+246], N[(a * N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision], If[LessEqual[z, 1.12e+110], N[(N[(t - x), $MachinePrecision] * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(N[(N[(z - y), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.6 \cdot 10^{+246}:\\
\;\;\;\;\mathsf{fma}\left(a, \frac{t - x}{z}, t\right)\\
\mathbf{elif}\;z \leq 1.12 \cdot 10^{+110}:\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y}{a - z}, x\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{z - y}{z - a} \cdot t\\
\end{array}
\end{array}
if z < -9.6e246Initial program 43.1%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6444.0
Applied rewrites44.0%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6492.2
Applied rewrites92.2%
Taylor expanded in y around 0
Applied rewrites76.3%
if -9.6e246 < z < 1.1200000000000001e110Initial program 76.8%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6491.4
Applied rewrites91.4%
Taylor expanded in y around inf
lower-/.f64N/A
lower--.f6479.2
Applied rewrites79.2%
if 1.1200000000000001e110 < z Initial program 38.6%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6469.4
Applied rewrites69.4%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
div-subN/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6475.9
Applied rewrites75.9%
Final simplification78.5%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* (/ (- z y) (- z a)) t))) (if (<= z -7e+91) t_1 (if (<= z 6.5e+69) (fma (- t x) (/ y a) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = ((z - y) / (z - a)) * t;
double tmp;
if (z <= -7e+91) {
tmp = t_1;
} else if (z <= 6.5e+69) {
tmp = fma((t - x), (y / a), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(Float64(z - y) / Float64(z - a)) * t) tmp = 0.0 if (z <= -7e+91) tmp = t_1; elseif (z <= 6.5e+69) tmp = fma(Float64(t - x), Float64(y / a), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(z - y), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[z, -7e+91], t$95$1, If[LessEqual[z, 6.5e+69], N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z - y}{z - a} \cdot t\\
\mathbf{if}\;z \leq -7 \cdot 10^{+91}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 6.5 \cdot 10^{+69}:\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -7.00000000000000001e91 or 6.5000000000000001e69 < z Initial program 40.3%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6472.0
Applied rewrites72.0%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
div-subN/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6462.5
Applied rewrites62.5%
if -7.00000000000000001e91 < z < 6.5000000000000001e69Initial program 86.9%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6494.1
Applied rewrites94.1%
Taylor expanded in z around 0
lower-/.f6477.2
Applied rewrites77.2%
Final simplification71.6%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma a (/ (- t x) z) t))) (if (<= z -7.2e+145) t_1 (if (<= z 3.8e+109) (fma (- t x) (/ y a) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(a, ((t - x) / z), t);
double tmp;
if (z <= -7.2e+145) {
tmp = t_1;
} else if (z <= 3.8e+109) {
tmp = fma((t - x), (y / a), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(a, Float64(Float64(t - x) / z), t) tmp = 0.0 if (z <= -7.2e+145) tmp = t_1; elseif (z <= 3.8e+109) tmp = fma(Float64(t - x), Float64(y / a), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(a * N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision]}, If[LessEqual[z, -7.2e+145], t$95$1, If[LessEqual[z, 3.8e+109], N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(a, \frac{t - x}{z}, t\right)\\
\mathbf{if}\;z \leq -7.2 \cdot 10^{+145}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3.8 \cdot 10^{+109}:\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -7.19999999999999948e145 or 3.80000000000000039e109 < z Initial program 37.5%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6465.5
Applied rewrites65.5%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6482.4
Applied rewrites82.4%
Taylor expanded in y around 0
Applied rewrites64.1%
if -7.19999999999999948e145 < z < 3.80000000000000039e109Initial program 81.9%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6493.8
Applied rewrites93.8%
Taylor expanded in z around 0
lower-/.f6471.3
Applied rewrites71.3%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma a (/ (- t x) z) t))) (if (<= z -7.2e+145) t_1 (if (<= z 3.8e+109) (fma (/ (- t x) a) y x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(a, ((t - x) / z), t);
double tmp;
if (z <= -7.2e+145) {
tmp = t_1;
} else if (z <= 3.8e+109) {
tmp = fma(((t - x) / a), y, x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(a, Float64(Float64(t - x) / z), t) tmp = 0.0 if (z <= -7.2e+145) tmp = t_1; elseif (z <= 3.8e+109) tmp = fma(Float64(Float64(t - x) / a), y, x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(a * N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision]}, If[LessEqual[z, -7.2e+145], t$95$1, If[LessEqual[z, 3.8e+109], N[(N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] * y + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(a, \frac{t - x}{z}, t\right)\\
\mathbf{if}\;z \leq -7.2 \cdot 10^{+145}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3.8 \cdot 10^{+109}:\\
\;\;\;\;\mathsf{fma}\left(\frac{t - x}{a}, y, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -7.19999999999999948e145 or 3.80000000000000039e109 < z Initial program 37.5%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6465.5
Applied rewrites65.5%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6482.4
Applied rewrites82.4%
Taylor expanded in y around 0
Applied rewrites64.1%
if -7.19999999999999948e145 < z < 3.80000000000000039e109Initial program 81.9%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6470.2
Applied rewrites70.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (/ t x) x)))
(if (<= z -9.6e+246)
t_1
(if (<= z 1.05e+110) (fma (/ (- t x) a) y x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (t / x) * x;
double tmp;
if (z <= -9.6e+246) {
tmp = t_1;
} else if (z <= 1.05e+110) {
tmp = fma(((t - x) / a), y, x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(t / x) * x) tmp = 0.0 if (z <= -9.6e+246) tmp = t_1; elseif (z <= 1.05e+110) tmp = fma(Float64(Float64(t - x) / a), y, x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(t / x), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[z, -9.6e+246], t$95$1, If[LessEqual[z, 1.05e+110], N[(N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] * y + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{x} \cdot x\\
\mathbf{if}\;z \leq -9.6 \cdot 10^{+246}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.05 \cdot 10^{+110}:\\
\;\;\;\;\mathsf{fma}\left(\frac{t - x}{a}, y, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -9.6e246 or 1.05000000000000007e110 < z Initial program 39.6%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
+-commutativeN/A
times-fracN/A
distribute-rgt-outN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f64N/A
lower-+.f64N/A
lower-/.f6456.1
Applied rewrites56.1%
Taylor expanded in z around inf
Applied rewrites57.8%
if -9.6e246 < z < 1.05000000000000007e110Initial program 76.8%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6466.7
Applied rewrites66.7%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* (/ t x) x))) (if (<= z -9.6e+246) t_1 (if (<= z 7.2e+112) (+ (/ (* t y) a) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (t / x) * x;
double tmp;
if (z <= -9.6e+246) {
tmp = t_1;
} else if (z <= 7.2e+112) {
tmp = ((t * y) / a) + x;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (t / x) * x
if (z <= (-9.6d+246)) then
tmp = t_1
else if (z <= 7.2d+112) then
tmp = ((t * y) / a) + x
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 = (t / x) * x;
double tmp;
if (z <= -9.6e+246) {
tmp = t_1;
} else if (z <= 7.2e+112) {
tmp = ((t * y) / a) + x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (t / x) * x tmp = 0 if z <= -9.6e+246: tmp = t_1 elif z <= 7.2e+112: tmp = ((t * y) / a) + x else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(t / x) * x) tmp = 0.0 if (z <= -9.6e+246) tmp = t_1; elseif (z <= 7.2e+112) tmp = Float64(Float64(Float64(t * y) / a) + x); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (t / x) * x; tmp = 0.0; if (z <= -9.6e+246) tmp = t_1; elseif (z <= 7.2e+112) tmp = ((t * y) / a) + x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(t / x), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[z, -9.6e+246], t$95$1, If[LessEqual[z, 7.2e+112], N[(N[(N[(t * y), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{x} \cdot x\\
\mathbf{if}\;z \leq -9.6 \cdot 10^{+246}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 7.2 \cdot 10^{+112}:\\
\;\;\;\;\frac{t \cdot y}{a} + x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -9.6e246 or 7.20000000000000001e112 < z Initial program 39.6%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
+-commutativeN/A
times-fracN/A
distribute-rgt-outN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f64N/A
lower-+.f64N/A
lower-/.f6456.1
Applied rewrites56.1%
Taylor expanded in z around inf
Applied rewrites57.8%
if -9.6e246 < z < 7.20000000000000001e112Initial program 76.8%
Taylor expanded in z around 0
lower-/.f64N/A
lower-*.f64N/A
lower--.f6462.1
Applied rewrites62.1%
Taylor expanded in t around inf
Applied rewrites53.5%
Final simplification54.4%
(FPCore (x y z t a) :precision binary64 (if (<= a -1.82e+155) (* 1.0 x) (if (<= a 1.75e+111) (* (/ y (- a z)) t) (* 1.0 x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.82e+155) {
tmp = 1.0 * x;
} else if (a <= 1.75e+111) {
tmp = (y / (a - z)) * t;
} else {
tmp = 1.0 * x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-1.82d+155)) then
tmp = 1.0d0 * x
else if (a <= 1.75d+111) then
tmp = (y / (a - z)) * t
else
tmp = 1.0d0 * x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.82e+155) {
tmp = 1.0 * x;
} else if (a <= 1.75e+111) {
tmp = (y / (a - z)) * t;
} else {
tmp = 1.0 * x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.82e+155: tmp = 1.0 * x elif a <= 1.75e+111: tmp = (y / (a - z)) * t else: tmp = 1.0 * x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.82e+155) tmp = Float64(1.0 * x); elseif (a <= 1.75e+111) tmp = Float64(Float64(y / Float64(a - z)) * t); else tmp = Float64(1.0 * x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.82e+155) tmp = 1.0 * x; elseif (a <= 1.75e+111) tmp = (y / (a - z)) * t; else tmp = 1.0 * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.82e+155], N[(1.0 * x), $MachinePrecision], If[LessEqual[a, 1.75e+111], N[(N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], N[(1.0 * x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.82 \cdot 10^{+155}:\\
\;\;\;\;1 \cdot x\\
\mathbf{elif}\;a \leq 1.75 \cdot 10^{+111}:\\
\;\;\;\;\frac{y}{a - z} \cdot t\\
\mathbf{else}:\\
\;\;\;\;1 \cdot x\\
\end{array}
\end{array}
if a < -1.81999999999999989e155 or 1.7500000000000001e111 < a Initial program 64.8%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
+-commutativeN/A
times-fracN/A
distribute-rgt-outN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f64N/A
lower-+.f64N/A
lower-/.f6484.4
Applied rewrites84.4%
Taylor expanded in a around inf
Applied rewrites63.8%
if -1.81999999999999989e155 < a < 1.7500000000000001e111Initial program 71.5%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6482.3
Applied rewrites82.3%
Taylor expanded in y around inf
div-subN/A
associate-/l*N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6454.8
Applied rewrites54.8%
Taylor expanded in t around inf
Applied rewrites37.4%
Final simplification46.3%
(FPCore (x y z t a) :precision binary64 (if (<= a -1.82e+155) (* 1.0 x) (if (<= a 1.8e+67) (* (/ y a) t) (* 1.0 x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.82e+155) {
tmp = 1.0 * x;
} else if (a <= 1.8e+67) {
tmp = (y / a) * t;
} else {
tmp = 1.0 * x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-1.82d+155)) then
tmp = 1.0d0 * x
else if (a <= 1.8d+67) then
tmp = (y / a) * t
else
tmp = 1.0d0 * x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.82e+155) {
tmp = 1.0 * x;
} else if (a <= 1.8e+67) {
tmp = (y / a) * t;
} else {
tmp = 1.0 * x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.82e+155: tmp = 1.0 * x elif a <= 1.8e+67: tmp = (y / a) * t else: tmp = 1.0 * x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.82e+155) tmp = Float64(1.0 * x); elseif (a <= 1.8e+67) tmp = Float64(Float64(y / a) * t); else tmp = Float64(1.0 * x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.82e+155) tmp = 1.0 * x; elseif (a <= 1.8e+67) tmp = (y / a) * t; else tmp = 1.0 * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.82e+155], N[(1.0 * x), $MachinePrecision], If[LessEqual[a, 1.8e+67], N[(N[(y / a), $MachinePrecision] * t), $MachinePrecision], N[(1.0 * x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.82 \cdot 10^{+155}:\\
\;\;\;\;1 \cdot x\\
\mathbf{elif}\;a \leq 1.8 \cdot 10^{+67}:\\
\;\;\;\;\frac{y}{a} \cdot t\\
\mathbf{else}:\\
\;\;\;\;1 \cdot x\\
\end{array}
\end{array}
if a < -1.81999999999999989e155 or 1.7999999999999999e67 < a Initial program 65.5%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
+-commutativeN/A
times-fracN/A
distribute-rgt-outN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f64N/A
lower-+.f64N/A
lower-/.f6483.5
Applied rewrites83.5%
Taylor expanded in a around inf
Applied rewrites61.3%
if -1.81999999999999989e155 < a < 1.7999999999999999e67Initial program 71.4%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6454.1
Applied rewrites54.1%
Taylor expanded in z around 0
Applied rewrites29.4%
Final simplification40.9%
(FPCore (x y z t a) :precision binary64 (if (<= a -3.3e+100) (* 1.0 x) (if (<= a 32000000000000.0) (+ (- t x) x) (* 1.0 x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.3e+100) {
tmp = 1.0 * x;
} else if (a <= 32000000000000.0) {
tmp = (t - x) + x;
} else {
tmp = 1.0 * x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-3.3d+100)) then
tmp = 1.0d0 * x
else if (a <= 32000000000000.0d0) then
tmp = (t - x) + x
else
tmp = 1.0d0 * x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.3e+100) {
tmp = 1.0 * x;
} else if (a <= 32000000000000.0) {
tmp = (t - x) + x;
} else {
tmp = 1.0 * x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -3.3e+100: tmp = 1.0 * x elif a <= 32000000000000.0: tmp = (t - x) + x else: tmp = 1.0 * x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -3.3e+100) tmp = Float64(1.0 * x); elseif (a <= 32000000000000.0) tmp = Float64(Float64(t - x) + x); else tmp = Float64(1.0 * x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -3.3e+100) tmp = 1.0 * x; elseif (a <= 32000000000000.0) tmp = (t - x) + x; else tmp = 1.0 * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -3.3e+100], N[(1.0 * x), $MachinePrecision], If[LessEqual[a, 32000000000000.0], N[(N[(t - x), $MachinePrecision] + x), $MachinePrecision], N[(1.0 * x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.3 \cdot 10^{+100}:\\
\;\;\;\;1 \cdot x\\
\mathbf{elif}\;a \leq 32000000000000:\\
\;\;\;\;\left(t - x\right) + x\\
\mathbf{else}:\\
\;\;\;\;1 \cdot x\\
\end{array}
\end{array}
if a < -3.3000000000000001e100 or 3.2e13 < a Initial program 66.7%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
+-commutativeN/A
times-fracN/A
distribute-rgt-outN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f64N/A
lower-+.f64N/A
lower-/.f6482.2
Applied rewrites82.2%
Taylor expanded in a around inf
Applied rewrites55.1%
if -3.3000000000000001e100 < a < 3.2e13Initial program 71.1%
Taylor expanded in z around inf
lower--.f6421.6
Applied rewrites21.6%
Final simplification35.7%
(FPCore (x y z t a) :precision binary64 (* 1.0 x))
double code(double x, double y, double z, double t, double a) {
return 1.0 * x;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = 1.0d0 * x
end function
public static double code(double x, double y, double z, double t, double a) {
return 1.0 * x;
}
def code(x, y, z, t, a): return 1.0 * x
function code(x, y, z, t, a) return Float64(1.0 * x) end
function tmp = code(x, y, z, t, a) tmp = 1.0 * x; end
code[x_, y_, z_, t_, a_] := N[(1.0 * x), $MachinePrecision]
\begin{array}{l}
\\
1 \cdot x
\end{array}
Initial program 69.2%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
+-commutativeN/A
times-fracN/A
distribute-rgt-outN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f64N/A
lower-+.f64N/A
lower-/.f6475.3
Applied rewrites75.3%
Taylor expanded in a around inf
Applied rewrites28.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- t (* (/ y z) (- t x)))))
(if (< z -1.2536131056095036e+188)
t_1
(if (< z 4.446702369113811e+64)
(+ x (/ (- y z) (/ (- a z) (- t x))))
t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t - ((y / z) * (t - x));
double tmp;
if (z < -1.2536131056095036e+188) {
tmp = t_1;
} else if (z < 4.446702369113811e+64) {
tmp = x + ((y - z) / ((a - z) / (t - x)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = t - ((y / z) * (t - x))
if (z < (-1.2536131056095036d+188)) then
tmp = t_1
else if (z < 4.446702369113811d+64) then
tmp = x + ((y - z) / ((a - z) / (t - x)))
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 = t - ((y / z) * (t - x));
double tmp;
if (z < -1.2536131056095036e+188) {
tmp = t_1;
} else if (z < 4.446702369113811e+64) {
tmp = x + ((y - z) / ((a - z) / (t - x)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t - ((y / z) * (t - x)) tmp = 0 if z < -1.2536131056095036e+188: tmp = t_1 elif z < 4.446702369113811e+64: tmp = x + ((y - z) / ((a - z) / (t - x))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t - Float64(Float64(y / z) * Float64(t - x))) tmp = 0.0 if (z < -1.2536131056095036e+188) tmp = t_1; elseif (z < 4.446702369113811e+64) tmp = Float64(x + Float64(Float64(y - z) / Float64(Float64(a - z) / Float64(t - x)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t - ((y / z) * (t - x)); tmp = 0.0; if (z < -1.2536131056095036e+188) tmp = t_1; elseif (z < 4.446702369113811e+64) tmp = x + ((y - z) / ((a - z) / (t - x))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t - N[(N[(y / z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[z, -1.2536131056095036e+188], t$95$1, If[Less[z, 4.446702369113811e+64], N[(x + N[(N[(y - z), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t - \frac{y}{z} \cdot \left(t - x\right)\\
\mathbf{if}\;z < -1.2536131056095036 \cdot 10^{+188}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z < 4.446702369113811 \cdot 10^{+64}:\\
\;\;\;\;x + \frac{y - z}{\frac{a - z}{t - x}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
herbie shell --seed 2024255
(FPCore (x y z t a)
:name "Graphics.Rendering.Chart.Axis.Types:invLinMap from Chart-1.5.3"
:precision binary64
:alt
(! :herbie-platform default (if (< z -125361310560950360000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- t (* (/ y z) (- t x))) (if (< z 44467023691138110000000000000000000000000000000000000000000000000) (+ x (/ (- y z) (/ (- a z) (- t x)))) (- t (* (/ y z) (- t x))))))
(+ x (/ (* (- y z) (- t x)) (- a z))))