
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y x) (- z t)) (- a t))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - x) * (z - t)) / (a - t));
}
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 - x) * (z - t)) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - x) * (z - t)) / (a - t));
}
def code(x, y, z, t, a): return x + (((y - x) * (z - t)) / (a - t))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - x) * (z - t)) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y x) (- z t)) (- a t))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - x) * (z - t)) / (a - t));
}
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 - x) * (z - t)) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - x) * (z - t)) / (a - t));
}
def code(x, y, z, t, a): return x + (((y - x) * (z - t)) / (a - t))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - x) * (z - t)) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}
\end{array}
(FPCore (x y z t a)
:precision binary64
(if (<= t -2e+129)
(fma (- x y) (/ (- z a) t) y)
(if (<= t 6.3e+160)
(+ (/ (- y x) (/ (- a t) (- z t))) x)
(fma (/ (- x y) t) (- z a) y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2e+129) {
tmp = fma((x - y), ((z - a) / t), y);
} else if (t <= 6.3e+160) {
tmp = ((y - x) / ((a - t) / (z - t))) + x;
} else {
tmp = fma(((x - y) / t), (z - a), y);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (t <= -2e+129) tmp = fma(Float64(x - y), Float64(Float64(z - a) / t), y); elseif (t <= 6.3e+160) tmp = Float64(Float64(Float64(y - x) / Float64(Float64(a - t) / Float64(z - t))) + x); else tmp = fma(Float64(Float64(x - y) / t), Float64(z - a), y); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -2e+129], N[(N[(x - y), $MachinePrecision] * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision], If[LessEqual[t, 6.3e+160], N[(N[(N[(y - x), $MachinePrecision] / N[(N[(a - t), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] * N[(z - a), $MachinePrecision] + y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2 \cdot 10^{+129}:\\
\;\;\;\;\mathsf{fma}\left(x - y, \frac{z - a}{t}, y\right)\\
\mathbf{elif}\;t \leq 6.3 \cdot 10^{+160}:\\
\;\;\;\;\frac{y - x}{\frac{a - t}{z - t}} + x\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x - y}{t}, z - a, y\right)\\
\end{array}
\end{array}
if t < -2e129Initial program 37.9%
Taylor expanded in t 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 rewrites86.6%
Applied rewrites90.5%
if -2e129 < t < 6.2999999999999996e160Initial program 81.7%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6491.7
Applied rewrites91.7%
if 6.2999999999999996e160 < t Initial program 15.7%
Taylor expanded in t 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 rewrites91.5%
Final simplification91.5%
(FPCore (x y z t a)
:precision binary64
(if (<= t -3.1e+104)
(fma (- x y) (/ (- z a) t) y)
(if (<= t 3.2e+51)
(+ (/ (* (- z t) (- y x)) (- a t)) x)
(fma (/ (- x y) t) (- z a) y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -3.1e+104) {
tmp = fma((x - y), ((z - a) / t), y);
} else if (t <= 3.2e+51) {
tmp = (((z - t) * (y - x)) / (a - t)) + x;
} else {
tmp = fma(((x - y) / t), (z - a), y);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (t <= -3.1e+104) tmp = fma(Float64(x - y), Float64(Float64(z - a) / t), y); elseif (t <= 3.2e+51) tmp = Float64(Float64(Float64(Float64(z - t) * Float64(y - x)) / Float64(a - t)) + x); else tmp = fma(Float64(Float64(x - y) / t), Float64(z - a), y); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -3.1e+104], N[(N[(x - y), $MachinePrecision] * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision], If[LessEqual[t, 3.2e+51], N[(N[(N[(N[(z - t), $MachinePrecision] * N[(y - x), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] * N[(z - a), $MachinePrecision] + y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.1 \cdot 10^{+104}:\\
\;\;\;\;\mathsf{fma}\left(x - y, \frac{z - a}{t}, y\right)\\
\mathbf{elif}\;t \leq 3.2 \cdot 10^{+51}:\\
\;\;\;\;\frac{\left(z - t\right) \cdot \left(y - x\right)}{a - t} + x\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x - y}{t}, z - a, y\right)\\
\end{array}
\end{array}
if t < -3.10000000000000017e104Initial program 38.5%
Taylor expanded in t 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 rewrites83.7%
Applied rewrites87.2%
if -3.10000000000000017e104 < t < 3.2000000000000002e51Initial program 86.2%
if 3.2000000000000002e51 < t Initial program 30.9%
Taylor expanded in t 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 rewrites83.9%
Final simplification85.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (- x y) (/ z t) y)))
(if (<= t -1.02e+93)
t_1
(if (<= t 1.1e-76)
(fma (/ (- y x) a) z x)
(if (<= t 1e+159) t_1 (fma (/ x t) (- z a) y))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((x - y), (z / t), y);
double tmp;
if (t <= -1.02e+93) {
tmp = t_1;
} else if (t <= 1.1e-76) {
tmp = fma(((y - x) / a), z, x);
} else if (t <= 1e+159) {
tmp = t_1;
} else {
tmp = fma((x / t), (z - a), y);
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(x - y), Float64(z / t), y) tmp = 0.0 if (t <= -1.02e+93) tmp = t_1; elseif (t <= 1.1e-76) tmp = fma(Float64(Float64(y - x) / a), z, x); elseif (t <= 1e+159) tmp = t_1; else tmp = fma(Float64(x / t), Float64(z - a), y); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x - y), $MachinePrecision] * N[(z / t), $MachinePrecision] + y), $MachinePrecision]}, If[LessEqual[t, -1.02e+93], t$95$1, If[LessEqual[t, 1.1e-76], N[(N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision] * z + x), $MachinePrecision], If[LessEqual[t, 1e+159], t$95$1, N[(N[(x / t), $MachinePrecision] * N[(z - a), $MachinePrecision] + y), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(x - y, \frac{z}{t}, y\right)\\
\mathbf{if}\;t \leq -1.02 \cdot 10^{+93}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.1 \cdot 10^{-76}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y - x}{a}, z, x\right)\\
\mathbf{elif}\;t \leq 10^{+159}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x}{t}, z - a, y\right)\\
\end{array}
\end{array}
if t < -1.0200000000000001e93 or 1.1e-76 < t < 9.9999999999999993e158Initial program 61.1%
Taylor expanded in t 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 rewrites72.8%
Applied rewrites76.2%
Taylor expanded in a around 0
Applied rewrites74.7%
if -1.0200000000000001e93 < t < 1.1e-76Initial program 84.7%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6470.2
Applied rewrites70.2%
if 9.9999999999999993e158 < t Initial program 15.7%
Taylor expanded in t 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 rewrites91.5%
Taylor expanded in y around 0
Applied rewrites86.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (- x y) (/ z t) y)))
(if (<= t -1.6e-105)
t_1
(if (<= t 4.2e-98)
(* (/ (- z t) a) y)
(if (<= t 1e+159) t_1 (fma (/ x t) (- z a) y))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((x - y), (z / t), y);
double tmp;
if (t <= -1.6e-105) {
tmp = t_1;
} else if (t <= 4.2e-98) {
tmp = ((z - t) / a) * y;
} else if (t <= 1e+159) {
tmp = t_1;
} else {
tmp = fma((x / t), (z - a), y);
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(x - y), Float64(z / t), y) tmp = 0.0 if (t <= -1.6e-105) tmp = t_1; elseif (t <= 4.2e-98) tmp = Float64(Float64(Float64(z - t) / a) * y); elseif (t <= 1e+159) tmp = t_1; else tmp = fma(Float64(x / t), Float64(z - a), y); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x - y), $MachinePrecision] * N[(z / t), $MachinePrecision] + y), $MachinePrecision]}, If[LessEqual[t, -1.6e-105], t$95$1, If[LessEqual[t, 4.2e-98], N[(N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[t, 1e+159], t$95$1, N[(N[(x / t), $MachinePrecision] * N[(z - a), $MachinePrecision] + y), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(x - y, \frac{z}{t}, y\right)\\
\mathbf{if}\;t \leq -1.6 \cdot 10^{-105}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 4.2 \cdot 10^{-98}:\\
\;\;\;\;\frac{z - t}{a} \cdot y\\
\mathbf{elif}\;t \leq 10^{+159}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x}{t}, z - a, y\right)\\
\end{array}
\end{array}
if t < -1.59999999999999991e-105 or 4.19999999999999984e-98 < t < 9.9999999999999993e158Initial program 67.1%
Taylor expanded in t 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 rewrites64.7%
Applied rewrites67.1%
Taylor expanded in a around 0
Applied rewrites64.9%
if -1.59999999999999991e-105 < t < 4.19999999999999984e-98Initial program 85.6%
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--.f6452.3
Applied rewrites52.3%
Applied rewrites54.8%
Taylor expanded in a around inf
Applied rewrites48.3%
if 9.9999999999999993e158 < t Initial program 15.7%
Taylor expanded in t 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 rewrites91.5%
Taylor expanded in y around 0
Applied rewrites86.0%
Final simplification63.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (/ (- x y) t) z y)))
(if (<= t -1.6e-105)
t_1
(if (<= t 4.2e-98)
(* (/ (- z t) a) y)
(if (<= t 8.2e+157) t_1 (fma (/ x t) (- z a) y))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(((x - y) / t), z, y);
double tmp;
if (t <= -1.6e-105) {
tmp = t_1;
} else if (t <= 4.2e-98) {
tmp = ((z - t) / a) * y;
} else if (t <= 8.2e+157) {
tmp = t_1;
} else {
tmp = fma((x / t), (z - a), y);
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(Float64(x - y) / t), z, y) tmp = 0.0 if (t <= -1.6e-105) tmp = t_1; elseif (t <= 4.2e-98) tmp = Float64(Float64(Float64(z - t) / a) * y); elseif (t <= 8.2e+157) tmp = t_1; else tmp = fma(Float64(x / t), Float64(z - a), y); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] * z + y), $MachinePrecision]}, If[LessEqual[t, -1.6e-105], t$95$1, If[LessEqual[t, 4.2e-98], N[(N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[t, 8.2e+157], t$95$1, N[(N[(x / t), $MachinePrecision] * N[(z - a), $MachinePrecision] + y), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{x - y}{t}, z, y\right)\\
\mathbf{if}\;t \leq -1.6 \cdot 10^{-105}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 4.2 \cdot 10^{-98}:\\
\;\;\;\;\frac{z - t}{a} \cdot y\\
\mathbf{elif}\;t \leq 8.2 \cdot 10^{+157}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x}{t}, z - a, y\right)\\
\end{array}
\end{array}
if t < -1.59999999999999991e-105 or 4.19999999999999984e-98 < t < 8.20000000000000032e157Initial program 67.1%
Taylor expanded in t 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 rewrites64.7%
Taylor expanded in a around 0
Applied rewrites62.5%
if -1.59999999999999991e-105 < t < 4.19999999999999984e-98Initial program 85.6%
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--.f6452.3
Applied rewrites52.3%
Applied rewrites54.8%
Taylor expanded in a around inf
Applied rewrites48.3%
if 8.20000000000000032e157 < t Initial program 15.7%
Taylor expanded in t 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 rewrites91.5%
Taylor expanded in y around 0
Applied rewrites86.0%
Final simplification62.4%
(FPCore (x y z t a)
:precision binary64
(if (<= t -3e+94)
(* 1.0 y)
(if (<= t 7.5e-98)
(* (/ z (- a t)) y)
(if (<= t 5.2e+77) (/ (* (- x y) z) t) (* 1.0 y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -3e+94) {
tmp = 1.0 * y;
} else if (t <= 7.5e-98) {
tmp = (z / (a - t)) * y;
} else if (t <= 5.2e+77) {
tmp = ((x - y) * z) / t;
} else {
tmp = 1.0 * y;
}
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 (t <= (-3d+94)) then
tmp = 1.0d0 * y
else if (t <= 7.5d-98) then
tmp = (z / (a - t)) * y
else if (t <= 5.2d+77) then
tmp = ((x - y) * z) / t
else
tmp = 1.0d0 * y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -3e+94) {
tmp = 1.0 * y;
} else if (t <= 7.5e-98) {
tmp = (z / (a - t)) * y;
} else if (t <= 5.2e+77) {
tmp = ((x - y) * z) / t;
} else {
tmp = 1.0 * y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -3e+94: tmp = 1.0 * y elif t <= 7.5e-98: tmp = (z / (a - t)) * y elif t <= 5.2e+77: tmp = ((x - y) * z) / t else: tmp = 1.0 * y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -3e+94) tmp = Float64(1.0 * y); elseif (t <= 7.5e-98) tmp = Float64(Float64(z / Float64(a - t)) * y); elseif (t <= 5.2e+77) tmp = Float64(Float64(Float64(x - y) * z) / t); else tmp = Float64(1.0 * y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -3e+94) tmp = 1.0 * y; elseif (t <= 7.5e-98) tmp = (z / (a - t)) * y; elseif (t <= 5.2e+77) tmp = ((x - y) * z) / t; else tmp = 1.0 * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -3e+94], N[(1.0 * y), $MachinePrecision], If[LessEqual[t, 7.5e-98], N[(N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[t, 5.2e+77], N[(N[(N[(x - y), $MachinePrecision] * z), $MachinePrecision] / t), $MachinePrecision], N[(1.0 * y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3 \cdot 10^{+94}:\\
\;\;\;\;1 \cdot y\\
\mathbf{elif}\;t \leq 7.5 \cdot 10^{-98}:\\
\;\;\;\;\frac{z}{a - t} \cdot y\\
\mathbf{elif}\;t \leq 5.2 \cdot 10^{+77}:\\
\;\;\;\;\frac{\left(x - y\right) \cdot z}{t}\\
\mathbf{else}:\\
\;\;\;\;1 \cdot y\\
\end{array}
\end{array}
if t < -3.0000000000000001e94 or 5.2000000000000004e77 < t Initial program 32.8%
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--.f6450.3
Applied rewrites50.3%
Applied rewrites67.9%
Taylor expanded in t around inf
Applied rewrites62.3%
if -3.0000000000000001e94 < t < 7.5000000000000006e-98Initial program 84.1%
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--.f6448.7
Applied rewrites48.7%
Applied rewrites51.3%
Taylor expanded in z around inf
Applied rewrites41.9%
if 7.5000000000000006e-98 < t < 5.2000000000000004e77Initial program 88.4%
Taylor expanded in t 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 rewrites57.9%
Taylor expanded in z around inf
Applied rewrites53.9%
Final simplification52.3%
(FPCore (x y z t a)
:precision binary64
(if (<= t -3e+94)
(* 1.0 y)
(if (<= t 7.5e-98)
(* (/ y (- a t)) z)
(if (<= t 5.2e+77) (/ (* (- x y) z) t) (* 1.0 y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -3e+94) {
tmp = 1.0 * y;
} else if (t <= 7.5e-98) {
tmp = (y / (a - t)) * z;
} else if (t <= 5.2e+77) {
tmp = ((x - y) * z) / t;
} else {
tmp = 1.0 * y;
}
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 (t <= (-3d+94)) then
tmp = 1.0d0 * y
else if (t <= 7.5d-98) then
tmp = (y / (a - t)) * z
else if (t <= 5.2d+77) then
tmp = ((x - y) * z) / t
else
tmp = 1.0d0 * y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -3e+94) {
tmp = 1.0 * y;
} else if (t <= 7.5e-98) {
tmp = (y / (a - t)) * z;
} else if (t <= 5.2e+77) {
tmp = ((x - y) * z) / t;
} else {
tmp = 1.0 * y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -3e+94: tmp = 1.0 * y elif t <= 7.5e-98: tmp = (y / (a - t)) * z elif t <= 5.2e+77: tmp = ((x - y) * z) / t else: tmp = 1.0 * y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -3e+94) tmp = Float64(1.0 * y); elseif (t <= 7.5e-98) tmp = Float64(Float64(y / Float64(a - t)) * z); elseif (t <= 5.2e+77) tmp = Float64(Float64(Float64(x - y) * z) / t); else tmp = Float64(1.0 * y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -3e+94) tmp = 1.0 * y; elseif (t <= 7.5e-98) tmp = (y / (a - t)) * z; elseif (t <= 5.2e+77) tmp = ((x - y) * z) / t; else tmp = 1.0 * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -3e+94], N[(1.0 * y), $MachinePrecision], If[LessEqual[t, 7.5e-98], N[(N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[t, 5.2e+77], N[(N[(N[(x - y), $MachinePrecision] * z), $MachinePrecision] / t), $MachinePrecision], N[(1.0 * y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3 \cdot 10^{+94}:\\
\;\;\;\;1 \cdot y\\
\mathbf{elif}\;t \leq 7.5 \cdot 10^{-98}:\\
\;\;\;\;\frac{y}{a - t} \cdot z\\
\mathbf{elif}\;t \leq 5.2 \cdot 10^{+77}:\\
\;\;\;\;\frac{\left(x - y\right) \cdot z}{t}\\
\mathbf{else}:\\
\;\;\;\;1 \cdot y\\
\end{array}
\end{array}
if t < -3.0000000000000001e94 or 5.2000000000000004e77 < t Initial program 32.8%
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--.f6450.3
Applied rewrites50.3%
Applied rewrites67.9%
Taylor expanded in t around inf
Applied rewrites62.3%
if -3.0000000000000001e94 < t < 7.5000000000000006e-98Initial program 84.1%
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--.f6448.7
Applied rewrites48.7%
Taylor expanded in z around inf
Applied rewrites39.3%
if 7.5000000000000006e-98 < t < 5.2000000000000004e77Initial program 88.4%
Taylor expanded in t 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 rewrites57.9%
Taylor expanded in z around inf
Applied rewrites53.9%
Final simplification51.2%
(FPCore (x y z t a)
:precision binary64
(if (<= t -5.6e+98)
(fma (- x y) (/ (- z a) t) y)
(if (<= t 5.8e+42)
(+ (/ (* (- z t) y) (- a t)) x)
(fma (/ (- x y) t) (- z a) y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -5.6e+98) {
tmp = fma((x - y), ((z - a) / t), y);
} else if (t <= 5.8e+42) {
tmp = (((z - t) * y) / (a - t)) + x;
} else {
tmp = fma(((x - y) / t), (z - a), y);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (t <= -5.6e+98) tmp = fma(Float64(x - y), Float64(Float64(z - a) / t), y); elseif (t <= 5.8e+42) tmp = Float64(Float64(Float64(Float64(z - t) * y) / Float64(a - t)) + x); else tmp = fma(Float64(Float64(x - y) / t), Float64(z - a), y); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -5.6e+98], N[(N[(x - y), $MachinePrecision] * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision], If[LessEqual[t, 5.8e+42], N[(N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] * N[(z - a), $MachinePrecision] + y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.6 \cdot 10^{+98}:\\
\;\;\;\;\mathsf{fma}\left(x - y, \frac{z - a}{t}, y\right)\\
\mathbf{elif}\;t \leq 5.8 \cdot 10^{+42}:\\
\;\;\;\;\frac{\left(z - t\right) \cdot y}{a - t} + x\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x - y}{t}, z - a, y\right)\\
\end{array}
\end{array}
if t < -5.6000000000000001e98Initial program 41.1%
Taylor expanded in t 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 rewrites84.4%
Applied rewrites87.7%
if -5.6000000000000001e98 < t < 5.79999999999999961e42Initial program 85.8%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6476.8
Applied rewrites76.8%
if 5.79999999999999961e42 < t Initial program 33.9%
Taylor expanded in t 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 rewrites83.1%
Final simplification80.5%
(FPCore (x y z t a)
:precision binary64
(if (<= t -7e+82)
(fma (- x y) (/ (- z a) t) y)
(if (<= t 8.5e+47)
(+ (/ (* (- y x) z) (- a t)) x)
(fma (/ (- x y) t) (- z a) y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -7e+82) {
tmp = fma((x - y), ((z - a) / t), y);
} else if (t <= 8.5e+47) {
tmp = (((y - x) * z) / (a - t)) + x;
} else {
tmp = fma(((x - y) / t), (z - a), y);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (t <= -7e+82) tmp = fma(Float64(x - y), Float64(Float64(z - a) / t), y); elseif (t <= 8.5e+47) tmp = Float64(Float64(Float64(Float64(y - x) * z) / Float64(a - t)) + x); else tmp = fma(Float64(Float64(x - y) / t), Float64(z - a), y); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -7e+82], N[(N[(x - y), $MachinePrecision] * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision], If[LessEqual[t, 8.5e+47], N[(N[(N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] * N[(z - a), $MachinePrecision] + y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -7 \cdot 10^{+82}:\\
\;\;\;\;\mathsf{fma}\left(x - y, \frac{z - a}{t}, y\right)\\
\mathbf{elif}\;t \leq 8.5 \cdot 10^{+47}:\\
\;\;\;\;\frac{\left(y - x\right) \cdot z}{a - t} + x\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x - y}{t}, z - a, y\right)\\
\end{array}
\end{array}
if t < -7.0000000000000001e82Initial program 42.7%
Taylor expanded in t 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 rewrites81.4%
Applied rewrites84.5%
if -7.0000000000000001e82 < t < 8.5000000000000008e47Initial program 86.5%
Taylor expanded in t around 0
lower-*.f64N/A
lower--.f6474.1
Applied rewrites74.1%
if 8.5000000000000008e47 < t Initial program 30.9%
Taylor expanded in t 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 rewrites83.9%
Final simplification78.7%
(FPCore (x y z t a)
:precision binary64
(if (<= t -4.05e-54)
(* 1.0 y)
(if (<= t 2.1e-95)
(* (/ z a) y)
(if (<= t 3.7e+47) (* (/ y a) (- t)) (* 1.0 y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -4.05e-54) {
tmp = 1.0 * y;
} else if (t <= 2.1e-95) {
tmp = (z / a) * y;
} else if (t <= 3.7e+47) {
tmp = (y / a) * -t;
} else {
tmp = 1.0 * y;
}
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 (t <= (-4.05d-54)) then
tmp = 1.0d0 * y
else if (t <= 2.1d-95) then
tmp = (z / a) * y
else if (t <= 3.7d+47) then
tmp = (y / a) * -t
else
tmp = 1.0d0 * y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -4.05e-54) {
tmp = 1.0 * y;
} else if (t <= 2.1e-95) {
tmp = (z / a) * y;
} else if (t <= 3.7e+47) {
tmp = (y / a) * -t;
} else {
tmp = 1.0 * y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -4.05e-54: tmp = 1.0 * y elif t <= 2.1e-95: tmp = (z / a) * y elif t <= 3.7e+47: tmp = (y / a) * -t else: tmp = 1.0 * y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -4.05e-54) tmp = Float64(1.0 * y); elseif (t <= 2.1e-95) tmp = Float64(Float64(z / a) * y); elseif (t <= 3.7e+47) tmp = Float64(Float64(y / a) * Float64(-t)); else tmp = Float64(1.0 * y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -4.05e-54) tmp = 1.0 * y; elseif (t <= 2.1e-95) tmp = (z / a) * y; elseif (t <= 3.7e+47) tmp = (y / a) * -t; else tmp = 1.0 * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -4.05e-54], N[(1.0 * y), $MachinePrecision], If[LessEqual[t, 2.1e-95], N[(N[(z / a), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[t, 3.7e+47], N[(N[(y / a), $MachinePrecision] * (-t)), $MachinePrecision], N[(1.0 * y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.05 \cdot 10^{-54}:\\
\;\;\;\;1 \cdot y\\
\mathbf{elif}\;t \leq 2.1 \cdot 10^{-95}:\\
\;\;\;\;\frac{z}{a} \cdot y\\
\mathbf{elif}\;t \leq 3.7 \cdot 10^{+47}:\\
\;\;\;\;\frac{y}{a} \cdot \left(-t\right)\\
\mathbf{else}:\\
\;\;\;\;1 \cdot y\\
\end{array}
\end{array}
if t < -4.0500000000000001e-54 or 3.70000000000000041e47 < t Initial program 45.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--.f6450.4
Applied rewrites50.4%
Applied rewrites63.7%
Taylor expanded in t around inf
Applied rewrites51.7%
if -4.0500000000000001e-54 < t < 2.1e-95Initial program 82.9%
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--.f6448.8
Applied rewrites48.8%
Applied rewrites52.1%
Taylor expanded in t around 0
Applied rewrites40.4%
if 2.1e-95 < t < 3.70000000000000041e47Initial program 91.3%
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--.f6457.1
Applied rewrites57.1%
Taylor expanded in a around inf
Applied rewrites26.1%
Taylor expanded in t around inf
Applied rewrites25.6%
Final simplification44.5%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma (- x y) (/ (- z a) t) y))) (if (<= t -2.75e-45) t_1 (if (<= t 1.1e-76) (fma (/ (- y x) a) z x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((x - y), ((z - a) / t), y);
double tmp;
if (t <= -2.75e-45) {
tmp = t_1;
} else if (t <= 1.1e-76) {
tmp = fma(((y - x) / a), z, x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(x - y), Float64(Float64(z - a) / t), y) tmp = 0.0 if (t <= -2.75e-45) tmp = t_1; elseif (t <= 1.1e-76) tmp = fma(Float64(Float64(y - x) / a), z, x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x - y), $MachinePrecision] * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision]}, If[LessEqual[t, -2.75e-45], t$95$1, If[LessEqual[t, 1.1e-76], N[(N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision] * z + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(x - y, \frac{z - a}{t}, y\right)\\
\mathbf{if}\;t \leq -2.75 \cdot 10^{-45}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.1 \cdot 10^{-76}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y - x}{a}, z, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -2.75000000000000015e-45 or 1.1e-76 < t Initial program 52.7%
Taylor expanded in t 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 rewrites75.0%
Applied rewrites76.9%
if -2.75000000000000015e-45 < t < 1.1e-76Initial program 83.9%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6475.9
Applied rewrites75.9%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma (/ (- x y) t) z y))) (if (<= t -1.6e-105) t_1 (if (<= t 4.2e-98) (* (/ (- z t) a) y) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(((x - y) / t), z, y);
double tmp;
if (t <= -1.6e-105) {
tmp = t_1;
} else if (t <= 4.2e-98) {
tmp = ((z - t) / a) * y;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(Float64(x - y) / t), z, y) tmp = 0.0 if (t <= -1.6e-105) tmp = t_1; elseif (t <= 4.2e-98) tmp = Float64(Float64(Float64(z - t) / a) * y); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] * z + y), $MachinePrecision]}, If[LessEqual[t, -1.6e-105], t$95$1, If[LessEqual[t, 4.2e-98], N[(N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision] * y), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{x - y}{t}, z, y\right)\\
\mathbf{if}\;t \leq -1.6 \cdot 10^{-105}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 4.2 \cdot 10^{-98}:\\
\;\;\;\;\frac{z - t}{a} \cdot y\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.59999999999999991e-105 or 4.19999999999999984e-98 < t Initial program 54.9%
Taylor expanded in t 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 rewrites71.0%
Taylor expanded in a around 0
Applied rewrites65.4%
if -1.59999999999999991e-105 < t < 4.19999999999999984e-98Initial program 85.6%
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--.f6452.3
Applied rewrites52.3%
Applied rewrites54.8%
Taylor expanded in a around inf
Applied rewrites48.3%
Final simplification60.5%
(FPCore (x y z t a) :precision binary64 (if (<= t -3e+94) (* 1.0 y) (if (<= t 1e+77) (* (/ y (- a t)) z) (* 1.0 y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -3e+94) {
tmp = 1.0 * y;
} else if (t <= 1e+77) {
tmp = (y / (a - t)) * z;
} else {
tmp = 1.0 * y;
}
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 (t <= (-3d+94)) then
tmp = 1.0d0 * y
else if (t <= 1d+77) then
tmp = (y / (a - t)) * z
else
tmp = 1.0d0 * y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -3e+94) {
tmp = 1.0 * y;
} else if (t <= 1e+77) {
tmp = (y / (a - t)) * z;
} else {
tmp = 1.0 * y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -3e+94: tmp = 1.0 * y elif t <= 1e+77: tmp = (y / (a - t)) * z else: tmp = 1.0 * y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -3e+94) tmp = Float64(1.0 * y); elseif (t <= 1e+77) tmp = Float64(Float64(y / Float64(a - t)) * z); else tmp = Float64(1.0 * y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -3e+94) tmp = 1.0 * y; elseif (t <= 1e+77) tmp = (y / (a - t)) * z; else tmp = 1.0 * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -3e+94], N[(1.0 * y), $MachinePrecision], If[LessEqual[t, 1e+77], N[(N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision], N[(1.0 * y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3 \cdot 10^{+94}:\\
\;\;\;\;1 \cdot y\\
\mathbf{elif}\;t \leq 10^{+77}:\\
\;\;\;\;\frac{y}{a - t} \cdot z\\
\mathbf{else}:\\
\;\;\;\;1 \cdot y\\
\end{array}
\end{array}
if t < -3.0000000000000001e94 or 9.99999999999999983e76 < t Initial program 32.8%
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--.f6450.3
Applied rewrites50.3%
Applied rewrites67.9%
Taylor expanded in t around inf
Applied rewrites62.3%
if -3.0000000000000001e94 < t < 9.99999999999999983e76Initial program 85.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--.f6451.1
Applied rewrites51.1%
Taylor expanded in z around inf
Applied rewrites38.7%
Final simplification48.4%
(FPCore (x y z t a) :precision binary64 (if (<= t -4.05e-54) (* 1.0 y) (if (<= t 1.2e+43) (* (/ z a) y) (* 1.0 y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -4.05e-54) {
tmp = 1.0 * y;
} else if (t <= 1.2e+43) {
tmp = (z / a) * y;
} else {
tmp = 1.0 * y;
}
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 (t <= (-4.05d-54)) then
tmp = 1.0d0 * y
else if (t <= 1.2d+43) then
tmp = (z / a) * y
else
tmp = 1.0d0 * y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -4.05e-54) {
tmp = 1.0 * y;
} else if (t <= 1.2e+43) {
tmp = (z / a) * y;
} else {
tmp = 1.0 * y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -4.05e-54: tmp = 1.0 * y elif t <= 1.2e+43: tmp = (z / a) * y else: tmp = 1.0 * y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -4.05e-54) tmp = Float64(1.0 * y); elseif (t <= 1.2e+43) tmp = Float64(Float64(z / a) * y); else tmp = Float64(1.0 * y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -4.05e-54) tmp = 1.0 * y; elseif (t <= 1.2e+43) tmp = (z / a) * y; else tmp = 1.0 * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -4.05e-54], N[(1.0 * y), $MachinePrecision], If[LessEqual[t, 1.2e+43], N[(N[(z / a), $MachinePrecision] * y), $MachinePrecision], N[(1.0 * y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.05 \cdot 10^{-54}:\\
\;\;\;\;1 \cdot y\\
\mathbf{elif}\;t \leq 1.2 \cdot 10^{+43}:\\
\;\;\;\;\frac{z}{a} \cdot y\\
\mathbf{else}:\\
\;\;\;\;1 \cdot y\\
\end{array}
\end{array}
if t < -4.0500000000000001e-54 or 1.20000000000000012e43 < t Initial program 46.2%
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--.f6450.4
Applied rewrites50.4%
Applied rewrites63.5%
Taylor expanded in t around inf
Applied rewrites51.0%
if -4.0500000000000001e-54 < t < 1.20000000000000012e43Initial program 85.1%
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--.f6451.2
Applied rewrites51.2%
Applied rewrites54.4%
Taylor expanded in t around 0
Applied rewrites32.8%
Final simplification42.8%
(FPCore (x y z t a) :precision binary64 (if (<= t -3.9e-54) (* 1.0 y) (if (<= t 1.2e+43) (/ (* z y) a) (* 1.0 y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -3.9e-54) {
tmp = 1.0 * y;
} else if (t <= 1.2e+43) {
tmp = (z * y) / a;
} else {
tmp = 1.0 * y;
}
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 (t <= (-3.9d-54)) then
tmp = 1.0d0 * y
else if (t <= 1.2d+43) then
tmp = (z * y) / a
else
tmp = 1.0d0 * y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -3.9e-54) {
tmp = 1.0 * y;
} else if (t <= 1.2e+43) {
tmp = (z * y) / a;
} else {
tmp = 1.0 * y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -3.9e-54: tmp = 1.0 * y elif t <= 1.2e+43: tmp = (z * y) / a else: tmp = 1.0 * y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -3.9e-54) tmp = Float64(1.0 * y); elseif (t <= 1.2e+43) tmp = Float64(Float64(z * y) / a); else tmp = Float64(1.0 * y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -3.9e-54) tmp = 1.0 * y; elseif (t <= 1.2e+43) tmp = (z * y) / a; else tmp = 1.0 * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -3.9e-54], N[(1.0 * y), $MachinePrecision], If[LessEqual[t, 1.2e+43], N[(N[(z * y), $MachinePrecision] / a), $MachinePrecision], N[(1.0 * y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.9 \cdot 10^{-54}:\\
\;\;\;\;1 \cdot y\\
\mathbf{elif}\;t \leq 1.2 \cdot 10^{+43}:\\
\;\;\;\;\frac{z \cdot y}{a}\\
\mathbf{else}:\\
\;\;\;\;1 \cdot y\\
\end{array}
\end{array}
if t < -3.9e-54 or 1.20000000000000012e43 < t Initial program 46.2%
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--.f6450.4
Applied rewrites50.4%
Applied rewrites63.5%
Taylor expanded in t around inf
Applied rewrites51.0%
if -3.9e-54 < t < 1.20000000000000012e43Initial program 85.1%
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--.f6451.2
Applied rewrites51.2%
Taylor expanded in t around 0
Applied rewrites27.3%
Final simplification40.2%
(FPCore (x y z t a) :precision binary64 (* 1.0 y))
double code(double x, double y, double z, double t, double a) {
return 1.0 * y;
}
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 * y
end function
public static double code(double x, double y, double z, double t, double a) {
return 1.0 * y;
}
def code(x, y, z, t, a): return 1.0 * y
function code(x, y, z, t, a) return Float64(1.0 * y) end
function tmp = code(x, y, z, t, a) tmp = 1.0 * y; end
code[x_, y_, z_, t_, a_] := N[(1.0 * y), $MachinePrecision]
\begin{array}{l}
\\
1 \cdot y
\end{array}
Initial program 63.8%
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--.f6450.8
Applied rewrites50.8%
Applied rewrites59.4%
Taylor expanded in t around inf
Applied rewrites30.7%
Final simplification30.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (/ (- y x) 1.0) (/ (- z t) (- a t))))))
(if (< a -1.6153062845442575e-142)
t_1
(if (< a 3.774403170083174e-182) (- y (* (/ z t) (- y x))) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((y - x) / 1.0) * ((z - t) / (a - t)));
double tmp;
if (a < -1.6153062845442575e-142) {
tmp = t_1;
} else if (a < 3.774403170083174e-182) {
tmp = y - ((z / t) * (y - 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 = x + (((y - x) / 1.0d0) * ((z - t) / (a - t)))
if (a < (-1.6153062845442575d-142)) then
tmp = t_1
else if (a < 3.774403170083174d-182) then
tmp = y - ((z / t) * (y - 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 = x + (((y - x) / 1.0) * ((z - t) / (a - t)));
double tmp;
if (a < -1.6153062845442575e-142) {
tmp = t_1;
} else if (a < 3.774403170083174e-182) {
tmp = y - ((z / t) * (y - x));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (((y - x) / 1.0) * ((z - t) / (a - t))) tmp = 0 if a < -1.6153062845442575e-142: tmp = t_1 elif a < 3.774403170083174e-182: tmp = y - ((z / t) * (y - x)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(Float64(y - x) / 1.0) * Float64(Float64(z - t) / Float64(a - t)))) tmp = 0.0 if (a < -1.6153062845442575e-142) tmp = t_1; elseif (a < 3.774403170083174e-182) tmp = Float64(y - Float64(Float64(z / t) * Float64(y - x))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (((y - x) / 1.0) * ((z - t) / (a - t))); tmp = 0.0; if (a < -1.6153062845442575e-142) tmp = t_1; elseif (a < 3.774403170083174e-182) tmp = y - ((z / t) * (y - x)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(y - x), $MachinePrecision] / 1.0), $MachinePrecision] * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[a, -1.6153062845442575e-142], t$95$1, If[Less[a, 3.774403170083174e-182], N[(y - N[(N[(z / t), $MachinePrecision] * N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y - x}{1} \cdot \frac{z - t}{a - t}\\
\mathbf{if}\;a < -1.6153062845442575 \cdot 10^{-142}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a < 3.774403170083174 \cdot 10^{-182}:\\
\;\;\;\;y - \frac{z}{t} \cdot \left(y - x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
herbie shell --seed 2024249
(FPCore (x y z t a)
:name "Graphics.Rendering.Chart.Axis.Types:linMap from Chart-1.5.3"
:precision binary64
:alt
(! :herbie-platform default (if (< a -646122513817703/4000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ x (* (/ (- y x) 1) (/ (- z t) (- a t)))) (if (< a 1887201585041587/50000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- y (* (/ z t) (- y x))) (+ x (* (/ (- y x) 1) (/ (- z t) (- a t)))))))
(+ x (/ (* (- y x) (- z t)) (- a t))))