
(FPCore (x y z t) :precision binary64 (+ x (* (- y x) (/ z t))))
double code(double x, double y, double z, double t) {
return x + ((y - x) * (z / t));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x + ((y - x) * (z / t))
end function
public static double code(double x, double y, double z, double t) {
return x + ((y - x) * (z / t));
}
def code(x, y, z, t): return x + ((y - x) * (z / t))
function code(x, y, z, t) return Float64(x + Float64(Float64(y - x) * Float64(z / t))) end
function tmp = code(x, y, z, t) tmp = x + ((y - x) * (z / t)); end
code[x_, y_, z_, t_] := N[(x + N[(N[(y - x), $MachinePrecision] * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y - x\right) \cdot \frac{z}{t}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 12 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (+ x (* (- y x) (/ z t))))
double code(double x, double y, double z, double t) {
return x + ((y - x) * (z / t));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x + ((y - x) * (z / t))
end function
public static double code(double x, double y, double z, double t) {
return x + ((y - x) * (z / t));
}
def code(x, y, z, t): return x + ((y - x) * (z / t))
function code(x, y, z, t) return Float64(x + Float64(Float64(y - x) * Float64(z / t))) end
function tmp = code(x, y, z, t) tmp = x + ((y - x) * (z / t)); end
code[x_, y_, z_, t_] := N[(x + N[(N[(y - x), $MachinePrecision] * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y - x\right) \cdot \frac{z}{t}
\end{array}
(FPCore (x y z t) :precision binary64 (if (<= (/ z t) -500000000000.0) (/ (- y x) (/ t z)) (if (<= (/ z t) 10.0) (+ x (* y (/ z t))) (* z (/ (- y x) t)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z / t) <= -500000000000.0) {
tmp = (y - x) / (t / z);
} else if ((z / t) <= 10.0) {
tmp = x + (y * (z / t));
} else {
tmp = z * ((y - x) / t);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((z / t) <= (-500000000000.0d0)) then
tmp = (y - x) / (t / z)
else if ((z / t) <= 10.0d0) then
tmp = x + (y * (z / t))
else
tmp = z * ((y - x) / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z / t) <= -500000000000.0) {
tmp = (y - x) / (t / z);
} else if ((z / t) <= 10.0) {
tmp = x + (y * (z / t));
} else {
tmp = z * ((y - x) / t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z / t) <= -500000000000.0: tmp = (y - x) / (t / z) elif (z / t) <= 10.0: tmp = x + (y * (z / t)) else: tmp = z * ((y - x) / t) return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(z / t) <= -500000000000.0) tmp = Float64(Float64(y - x) / Float64(t / z)); elseif (Float64(z / t) <= 10.0) tmp = Float64(x + Float64(y * Float64(z / t))); else tmp = Float64(z * Float64(Float64(y - x) / t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z / t) <= -500000000000.0) tmp = (y - x) / (t / z); elseif ((z / t) <= 10.0) tmp = x + (y * (z / t)); else tmp = z * ((y - x) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[N[(z / t), $MachinePrecision], -500000000000.0], N[(N[(y - x), $MachinePrecision] / N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(z / t), $MachinePrecision], 10.0], N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z * N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{z}{t} \leq -500000000000:\\
\;\;\;\;\frac{y - x}{\frac{t}{z}}\\
\mathbf{elif}\;\frac{z}{t} \leq 10:\\
\;\;\;\;x + y \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;z \cdot \frac{y - x}{t}\\
\end{array}
\end{array}
if (/.f64 z t) < -5e11Initial program 97.2%
Taylor expanded in z around inf 94.2%
*-commutative94.2%
sub-div95.6%
associate-/r/97.4%
frac-2neg97.4%
frac-2neg97.4%
sub-neg97.4%
distribute-neg-in97.4%
add-sqr-sqrt52.7%
sqrt-unprod69.0%
sqr-neg69.0%
sqrt-unprod18.7%
add-sqr-sqrt50.1%
add-sqr-sqrt31.4%
sqrt-unprod69.4%
sqr-neg69.4%
sqrt-unprod44.6%
add-sqr-sqrt97.4%
distribute-neg-frac97.4%
Applied egg-rr97.4%
distribute-neg-in97.4%
remove-double-neg97.4%
sub-neg97.4%
distribute-neg-frac97.4%
remove-double-neg97.4%
Simplified97.4%
if -5e11 < (/.f64 z t) < 10Initial program 98.8%
Taylor expanded in y around inf 93.2%
associate-*r/97.8%
Simplified97.8%
if 10 < (/.f64 z t) Initial program 95.2%
Taylor expanded in z around inf 95.2%
Taylor expanded in y around 0 95.2%
+-commutative95.2%
mul-1-neg95.2%
sub-neg95.2%
div-sub98.5%
Simplified98.5%
Final simplification97.9%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ (* y z) t)) (t_2 (* (/ z t) (- x))))
(if (<= (/ z t) -2e+176)
(* y (/ z t))
(if (<= (/ z t) -5e+116)
t_2
(if (<= (/ z t) -4e+51)
t_1
(if (<= (/ z t) -0.5)
t_2
(if (<= (/ z t) 5e-87)
x
(if (<= (/ z t) 4e+150)
(/ y (/ t z))
(if (<= (/ z t) 1e+184) t_2 t_1)))))))))
double code(double x, double y, double z, double t) {
double t_1 = (y * z) / t;
double t_2 = (z / t) * -x;
double tmp;
if ((z / t) <= -2e+176) {
tmp = y * (z / t);
} else if ((z / t) <= -5e+116) {
tmp = t_2;
} else if ((z / t) <= -4e+51) {
tmp = t_1;
} else if ((z / t) <= -0.5) {
tmp = t_2;
} else if ((z / t) <= 5e-87) {
tmp = x;
} else if ((z / t) <= 4e+150) {
tmp = y / (t / z);
} else if ((z / t) <= 1e+184) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (y * z) / t
t_2 = (z / t) * -x
if ((z / t) <= (-2d+176)) then
tmp = y * (z / t)
else if ((z / t) <= (-5d+116)) then
tmp = t_2
else if ((z / t) <= (-4d+51)) then
tmp = t_1
else if ((z / t) <= (-0.5d0)) then
tmp = t_2
else if ((z / t) <= 5d-87) then
tmp = x
else if ((z / t) <= 4d+150) then
tmp = y / (t / z)
else if ((z / t) <= 1d+184) then
tmp = t_2
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (y * z) / t;
double t_2 = (z / t) * -x;
double tmp;
if ((z / t) <= -2e+176) {
tmp = y * (z / t);
} else if ((z / t) <= -5e+116) {
tmp = t_2;
} else if ((z / t) <= -4e+51) {
tmp = t_1;
} else if ((z / t) <= -0.5) {
tmp = t_2;
} else if ((z / t) <= 5e-87) {
tmp = x;
} else if ((z / t) <= 4e+150) {
tmp = y / (t / z);
} else if ((z / t) <= 1e+184) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = (y * z) / t t_2 = (z / t) * -x tmp = 0 if (z / t) <= -2e+176: tmp = y * (z / t) elif (z / t) <= -5e+116: tmp = t_2 elif (z / t) <= -4e+51: tmp = t_1 elif (z / t) <= -0.5: tmp = t_2 elif (z / t) <= 5e-87: tmp = x elif (z / t) <= 4e+150: tmp = y / (t / z) elif (z / t) <= 1e+184: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(y * z) / t) t_2 = Float64(Float64(z / t) * Float64(-x)) tmp = 0.0 if (Float64(z / t) <= -2e+176) tmp = Float64(y * Float64(z / t)); elseif (Float64(z / t) <= -5e+116) tmp = t_2; elseif (Float64(z / t) <= -4e+51) tmp = t_1; elseif (Float64(z / t) <= -0.5) tmp = t_2; elseif (Float64(z / t) <= 5e-87) tmp = x; elseif (Float64(z / t) <= 4e+150) tmp = Float64(y / Float64(t / z)); elseif (Float64(z / t) <= 1e+184) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (y * z) / t; t_2 = (z / t) * -x; tmp = 0.0; if ((z / t) <= -2e+176) tmp = y * (z / t); elseif ((z / t) <= -5e+116) tmp = t_2; elseif ((z / t) <= -4e+51) tmp = t_1; elseif ((z / t) <= -0.5) tmp = t_2; elseif ((z / t) <= 5e-87) tmp = x; elseif ((z / t) <= 4e+150) tmp = y / (t / z); elseif ((z / t) <= 1e+184) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]}, Block[{t$95$2 = N[(N[(z / t), $MachinePrecision] * (-x)), $MachinePrecision]}, If[LessEqual[N[(z / t), $MachinePrecision], -2e+176], N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(z / t), $MachinePrecision], -5e+116], t$95$2, If[LessEqual[N[(z / t), $MachinePrecision], -4e+51], t$95$1, If[LessEqual[N[(z / t), $MachinePrecision], -0.5], t$95$2, If[LessEqual[N[(z / t), $MachinePrecision], 5e-87], x, If[LessEqual[N[(z / t), $MachinePrecision], 4e+150], N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(z / t), $MachinePrecision], 1e+184], t$95$2, t$95$1]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot z}{t}\\
t_2 := \frac{z}{t} \cdot \left(-x\right)\\
\mathbf{if}\;\frac{z}{t} \leq -2 \cdot 10^{+176}:\\
\;\;\;\;y \cdot \frac{z}{t}\\
\mathbf{elif}\;\frac{z}{t} \leq -5 \cdot 10^{+116}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;\frac{z}{t} \leq -4 \cdot 10^{+51}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;\frac{z}{t} \leq -0.5:\\
\;\;\;\;t_2\\
\mathbf{elif}\;\frac{z}{t} \leq 5 \cdot 10^{-87}:\\
\;\;\;\;x\\
\mathbf{elif}\;\frac{z}{t} \leq 4 \cdot 10^{+150}:\\
\;\;\;\;\frac{y}{\frac{t}{z}}\\
\mathbf{elif}\;\frac{z}{t} \leq 10^{+184}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if (/.f64 z t) < -2e176Initial program 94.4%
Taylor expanded in z around inf 97.3%
Taylor expanded in y around inf 70.7%
associate-*r/67.8%
associate-*l/79.4%
*-commutative79.4%
clear-num79.4%
un-div-inv79.3%
Applied egg-rr79.3%
*-un-lft-identity79.3%
associate-*l/79.4%
clear-num79.4%
Applied egg-rr79.4%
if -2e176 < (/.f64 z t) < -5.00000000000000025e116 or -4e51 < (/.f64 z t) < -0.5 or 3.99999999999999992e150 < (/.f64 z t) < 1.00000000000000002e184Initial program 99.8%
Taylor expanded in z around inf 96.1%
Taylor expanded in y around 0 75.5%
associate-*r/75.5%
mul-1-neg75.5%
Simplified75.5%
*-commutative75.5%
distribute-frac-neg75.5%
distribute-lft-neg-out75.5%
add-sqr-sqrt42.1%
sqrt-unprod34.9%
sqr-neg34.9%
sqrt-unprod0.5%
add-sqr-sqrt0.9%
div-inv0.9%
associate-*l*1.0%
associate-/r/1.0%
clear-num1.0%
add-sqr-sqrt0.5%
sqrt-unprod35.0%
sqr-neg35.0%
sqrt-unprod42.1%
add-sqr-sqrt75.8%
Applied egg-rr75.8%
if -5.00000000000000025e116 < (/.f64 z t) < -4e51 or 1.00000000000000002e184 < (/.f64 z t) Initial program 93.3%
Taylor expanded in z around inf 91.0%
Taylor expanded in y around inf 58.9%
associate-*r/65.3%
Applied egg-rr65.3%
if -0.5 < (/.f64 z t) < 5.00000000000000042e-87Initial program 98.7%
Taylor expanded in z around 0 73.9%
if 5.00000000000000042e-87 < (/.f64 z t) < 3.99999999999999992e150Initial program 99.6%
Taylor expanded in z around inf 72.5%
Taylor expanded in y around inf 59.7%
associate-*r/60.5%
associate-*l/71.0%
*-commutative71.0%
clear-num70.9%
un-div-inv71.1%
Applied egg-rr71.1%
Final simplification72.9%
(FPCore (x y z t)
:precision binary64
(if (<= (/ z t) -2e+176)
(* y (/ z t))
(if (<= (/ z t) -0.5)
(* z (/ (- x) t))
(if (<= (/ z t) 5e-87)
x
(if (<= (/ z t) 4e+150)
(/ y (/ t z))
(if (<= (/ z t) 1e+184) (* (/ z t) (- x)) (/ (* y z) t)))))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z / t) <= -2e+176) {
tmp = y * (z / t);
} else if ((z / t) <= -0.5) {
tmp = z * (-x / t);
} else if ((z / t) <= 5e-87) {
tmp = x;
} else if ((z / t) <= 4e+150) {
tmp = y / (t / z);
} else if ((z / t) <= 1e+184) {
tmp = (z / t) * -x;
} else {
tmp = (y * z) / t;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((z / t) <= (-2d+176)) then
tmp = y * (z / t)
else if ((z / t) <= (-0.5d0)) then
tmp = z * (-x / t)
else if ((z / t) <= 5d-87) then
tmp = x
else if ((z / t) <= 4d+150) then
tmp = y / (t / z)
else if ((z / t) <= 1d+184) then
tmp = (z / t) * -x
else
tmp = (y * z) / t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z / t) <= -2e+176) {
tmp = y * (z / t);
} else if ((z / t) <= -0.5) {
tmp = z * (-x / t);
} else if ((z / t) <= 5e-87) {
tmp = x;
} else if ((z / t) <= 4e+150) {
tmp = y / (t / z);
} else if ((z / t) <= 1e+184) {
tmp = (z / t) * -x;
} else {
tmp = (y * z) / t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z / t) <= -2e+176: tmp = y * (z / t) elif (z / t) <= -0.5: tmp = z * (-x / t) elif (z / t) <= 5e-87: tmp = x elif (z / t) <= 4e+150: tmp = y / (t / z) elif (z / t) <= 1e+184: tmp = (z / t) * -x else: tmp = (y * z) / t return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(z / t) <= -2e+176) tmp = Float64(y * Float64(z / t)); elseif (Float64(z / t) <= -0.5) tmp = Float64(z * Float64(Float64(-x) / t)); elseif (Float64(z / t) <= 5e-87) tmp = x; elseif (Float64(z / t) <= 4e+150) tmp = Float64(y / Float64(t / z)); elseif (Float64(z / t) <= 1e+184) tmp = Float64(Float64(z / t) * Float64(-x)); else tmp = Float64(Float64(y * z) / t); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z / t) <= -2e+176) tmp = y * (z / t); elseif ((z / t) <= -0.5) tmp = z * (-x / t); elseif ((z / t) <= 5e-87) tmp = x; elseif ((z / t) <= 4e+150) tmp = y / (t / z); elseif ((z / t) <= 1e+184) tmp = (z / t) * -x; else tmp = (y * z) / t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[N[(z / t), $MachinePrecision], -2e+176], N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(z / t), $MachinePrecision], -0.5], N[(z * N[((-x) / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(z / t), $MachinePrecision], 5e-87], x, If[LessEqual[N[(z / t), $MachinePrecision], 4e+150], N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(z / t), $MachinePrecision], 1e+184], N[(N[(z / t), $MachinePrecision] * (-x)), $MachinePrecision], N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{z}{t} \leq -2 \cdot 10^{+176}:\\
\;\;\;\;y \cdot \frac{z}{t}\\
\mathbf{elif}\;\frac{z}{t} \leq -0.5:\\
\;\;\;\;z \cdot \frac{-x}{t}\\
\mathbf{elif}\;\frac{z}{t} \leq 5 \cdot 10^{-87}:\\
\;\;\;\;x\\
\mathbf{elif}\;\frac{z}{t} \leq 4 \cdot 10^{+150}:\\
\;\;\;\;\frac{y}{\frac{t}{z}}\\
\mathbf{elif}\;\frac{z}{t} \leq 10^{+184}:\\
\;\;\;\;\frac{z}{t} \cdot \left(-x\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot z}{t}\\
\end{array}
\end{array}
if (/.f64 z t) < -2e176Initial program 94.4%
Taylor expanded in z around inf 97.3%
Taylor expanded in y around inf 70.7%
associate-*r/67.8%
associate-*l/79.4%
*-commutative79.4%
clear-num79.4%
un-div-inv79.3%
Applied egg-rr79.3%
*-un-lft-identity79.3%
associate-*l/79.4%
clear-num79.4%
Applied egg-rr79.4%
if -2e176 < (/.f64 z t) < -0.5Initial program 99.7%
Taylor expanded in z around inf 91.6%
Taylor expanded in y around 0 65.7%
associate-*r/65.7%
mul-1-neg65.7%
Simplified65.7%
if -0.5 < (/.f64 z t) < 5.00000000000000042e-87Initial program 98.7%
Taylor expanded in z around 0 73.9%
if 5.00000000000000042e-87 < (/.f64 z t) < 3.99999999999999992e150Initial program 99.6%
Taylor expanded in z around inf 72.5%
Taylor expanded in y around inf 59.7%
associate-*r/60.5%
associate-*l/71.0%
*-commutative71.0%
clear-num70.9%
un-div-inv71.1%
Applied egg-rr71.1%
if 3.99999999999999992e150 < (/.f64 z t) < 1.00000000000000002e184Initial program 100.0%
Taylor expanded in z around inf 99.5%
Taylor expanded in y around 0 73.3%
associate-*r/73.3%
mul-1-neg73.3%
Simplified73.3%
*-commutative73.3%
distribute-frac-neg73.3%
distribute-lft-neg-out73.3%
add-sqr-sqrt44.4%
sqrt-unprod45.1%
sqr-neg45.1%
sqrt-unprod0.7%
add-sqr-sqrt0.8%
div-inv0.8%
associate-*l*0.8%
associate-/r/0.8%
clear-num0.8%
add-sqr-sqrt0.7%
sqrt-unprod45.3%
sqr-neg45.3%
sqrt-unprod44.4%
add-sqr-sqrt73.8%
Applied egg-rr73.8%
if 1.00000000000000002e184 < (/.f64 z t) Initial program 91.0%
Taylor expanded in z around inf 93.6%
Taylor expanded in y around inf 61.4%
associate-*r/61.5%
Applied egg-rr61.5%
Final simplification71.4%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* z (/ (- y x) t))))
(if (<= (/ z t) -5e-14)
t_1
(if (<= (/ z t) 5e-87)
(* x (- 1.0 (/ z t)))
(if (<= (/ z t) 5e-43) (* y (/ z t)) (if (<= (/ z t) 2e-29) x t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = z * ((y - x) / t);
double tmp;
if ((z / t) <= -5e-14) {
tmp = t_1;
} else if ((z / t) <= 5e-87) {
tmp = x * (1.0 - (z / t));
} else if ((z / t) <= 5e-43) {
tmp = y * (z / t);
} else if ((z / t) <= 2e-29) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = z * ((y - x) / t)
if ((z / t) <= (-5d-14)) then
tmp = t_1
else if ((z / t) <= 5d-87) then
tmp = x * (1.0d0 - (z / t))
else if ((z / t) <= 5d-43) then
tmp = y * (z / t)
else if ((z / t) <= 2d-29) then
tmp = x
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = z * ((y - x) / t);
double tmp;
if ((z / t) <= -5e-14) {
tmp = t_1;
} else if ((z / t) <= 5e-87) {
tmp = x * (1.0 - (z / t));
} else if ((z / t) <= 5e-43) {
tmp = y * (z / t);
} else if ((z / t) <= 2e-29) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = z * ((y - x) / t) tmp = 0 if (z / t) <= -5e-14: tmp = t_1 elif (z / t) <= 5e-87: tmp = x * (1.0 - (z / t)) elif (z / t) <= 5e-43: tmp = y * (z / t) elif (z / t) <= 2e-29: tmp = x else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(z * Float64(Float64(y - x) / t)) tmp = 0.0 if (Float64(z / t) <= -5e-14) tmp = t_1; elseif (Float64(z / t) <= 5e-87) tmp = Float64(x * Float64(1.0 - Float64(z / t))); elseif (Float64(z / t) <= 5e-43) tmp = Float64(y * Float64(z / t)); elseif (Float64(z / t) <= 2e-29) tmp = x; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = z * ((y - x) / t); tmp = 0.0; if ((z / t) <= -5e-14) tmp = t_1; elseif ((z / t) <= 5e-87) tmp = x * (1.0 - (z / t)); elseif ((z / t) <= 5e-43) tmp = y * (z / t); elseif ((z / t) <= 2e-29) tmp = x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(z * N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(z / t), $MachinePrecision], -5e-14], t$95$1, If[LessEqual[N[(z / t), $MachinePrecision], 5e-87], N[(x * N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(z / t), $MachinePrecision], 5e-43], N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(z / t), $MachinePrecision], 2e-29], x, t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \frac{y - x}{t}\\
\mathbf{if}\;\frac{z}{t} \leq -5 \cdot 10^{-14}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;\frac{z}{t} \leq 5 \cdot 10^{-87}:\\
\;\;\;\;x \cdot \left(1 - \frac{z}{t}\right)\\
\mathbf{elif}\;\frac{z}{t} \leq 5 \cdot 10^{-43}:\\
\;\;\;\;y \cdot \frac{z}{t}\\
\mathbf{elif}\;\frac{z}{t} \leq 2 \cdot 10^{-29}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if (/.f64 z t) < -5.0000000000000002e-14 or 1.99999999999999989e-29 < (/.f64 z t) Initial program 96.5%
Taylor expanded in z around inf 91.8%
Taylor expanded in y around 0 91.8%
+-commutative91.8%
mul-1-neg91.8%
sub-neg91.8%
div-sub93.9%
Simplified93.9%
if -5.0000000000000002e-14 < (/.f64 z t) < 5.00000000000000042e-87Initial program 98.7%
Taylor expanded in x around inf 76.4%
mul-1-neg76.4%
unsub-neg76.4%
Simplified76.4%
if 5.00000000000000042e-87 < (/.f64 z t) < 5.00000000000000019e-43Initial program 99.5%
Taylor expanded in z around inf 62.0%
Taylor expanded in y around inf 62.7%
associate-*r/63.1%
associate-*l/83.5%
*-commutative83.5%
clear-num83.5%
un-div-inv83.5%
Applied egg-rr83.5%
*-un-lft-identity83.5%
associate-*l/83.5%
clear-num83.5%
Applied egg-rr83.5%
if 5.00000000000000019e-43 < (/.f64 z t) < 1.99999999999999989e-29Initial program 100.0%
Taylor expanded in z around 0 100.0%
Final simplification86.8%
(FPCore (x y z t)
:precision binary64
(if (or (<= x -8.2e-26)
(not (or (<= x 1.04e-103) (and (not (<= x 1.2e-8)) (<= x 4e+28)))))
(* x (- 1.0 (/ z t)))
(/ y (/ t z))))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -8.2e-26) || !((x <= 1.04e-103) || (!(x <= 1.2e-8) && (x <= 4e+28)))) {
tmp = x * (1.0 - (z / t));
} else {
tmp = y / (t / z);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((x <= (-8.2d-26)) .or. (.not. (x <= 1.04d-103) .or. (.not. (x <= 1.2d-8)) .and. (x <= 4d+28))) then
tmp = x * (1.0d0 - (z / t))
else
tmp = y / (t / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -8.2e-26) || !((x <= 1.04e-103) || (!(x <= 1.2e-8) && (x <= 4e+28)))) {
tmp = x * (1.0 - (z / t));
} else {
tmp = y / (t / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -8.2e-26) or not ((x <= 1.04e-103) or (not (x <= 1.2e-8) and (x <= 4e+28))): tmp = x * (1.0 - (z / t)) else: tmp = y / (t / z) return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -8.2e-26) || !((x <= 1.04e-103) || (!(x <= 1.2e-8) && (x <= 4e+28)))) tmp = Float64(x * Float64(1.0 - Float64(z / t))); else tmp = Float64(y / Float64(t / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((x <= -8.2e-26) || ~(((x <= 1.04e-103) || (~((x <= 1.2e-8)) && (x <= 4e+28))))) tmp = x * (1.0 - (z / t)); else tmp = y / (t / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -8.2e-26], N[Not[Or[LessEqual[x, 1.04e-103], And[N[Not[LessEqual[x, 1.2e-8]], $MachinePrecision], LessEqual[x, 4e+28]]]], $MachinePrecision]], N[(x * N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -8.2 \cdot 10^{-26} \lor \neg \left(x \leq 1.04 \cdot 10^{-103} \lor \neg \left(x \leq 1.2 \cdot 10^{-8}\right) \land x \leq 4 \cdot 10^{+28}\right):\\
\;\;\;\;x \cdot \left(1 - \frac{z}{t}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{\frac{t}{z}}\\
\end{array}
\end{array}
if x < -8.1999999999999997e-26 or 1.04000000000000001e-103 < x < 1.19999999999999999e-8 or 3.99999999999999983e28 < x Initial program 99.2%
Taylor expanded in x around inf 87.3%
mul-1-neg87.3%
unsub-neg87.3%
Simplified87.3%
if -8.1999999999999997e-26 < x < 1.04000000000000001e-103 or 1.19999999999999999e-8 < x < 3.99999999999999983e28Initial program 95.4%
Taylor expanded in z around inf 75.9%
Taylor expanded in y around inf 70.9%
associate-*r/68.8%
associate-*l/75.3%
*-commutative75.3%
clear-num75.3%
un-div-inv75.5%
Applied egg-rr75.5%
Final simplification82.0%
(FPCore (x y z t) :precision binary64 (if (or (<= (/ z t) -500000000000.0) (not (<= (/ z t) 10.0))) (* z (/ (- y x) t)) (+ x (* y (/ z t)))))
double code(double x, double y, double z, double t) {
double tmp;
if (((z / t) <= -500000000000.0) || !((z / t) <= 10.0)) {
tmp = z * ((y - x) / t);
} else {
tmp = x + (y * (z / t));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (((z / t) <= (-500000000000.0d0)) .or. (.not. ((z / t) <= 10.0d0))) then
tmp = z * ((y - x) / t)
else
tmp = x + (y * (z / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (((z / t) <= -500000000000.0) || !((z / t) <= 10.0)) {
tmp = z * ((y - x) / t);
} else {
tmp = x + (y * (z / t));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if ((z / t) <= -500000000000.0) or not ((z / t) <= 10.0): tmp = z * ((y - x) / t) else: tmp = x + (y * (z / t)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((Float64(z / t) <= -500000000000.0) || !(Float64(z / t) <= 10.0)) tmp = Float64(z * Float64(Float64(y - x) / t)); else tmp = Float64(x + Float64(y * Float64(z / t))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (((z / t) <= -500000000000.0) || ~(((z / t) <= 10.0))) tmp = z * ((y - x) / t); else tmp = x + (y * (z / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[N[(z / t), $MachinePrecision], -500000000000.0], N[Not[LessEqual[N[(z / t), $MachinePrecision], 10.0]], $MachinePrecision]], N[(z * N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{z}{t} \leq -500000000000 \lor \neg \left(\frac{z}{t} \leq 10\right):\\
\;\;\;\;z \cdot \frac{y - x}{t}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{t}\\
\end{array}
\end{array}
if (/.f64 z t) < -5e11 or 10 < (/.f64 z t) Initial program 96.3%
Taylor expanded in z around inf 94.6%
Taylor expanded in y around 0 94.6%
+-commutative94.6%
mul-1-neg94.6%
sub-neg94.6%
div-sub96.9%
Simplified96.9%
if -5e11 < (/.f64 z t) < 10Initial program 98.8%
Taylor expanded in y around inf 93.2%
associate-*r/97.8%
Simplified97.8%
Final simplification97.4%
(FPCore (x y z t) :precision binary64 (if (or (<= (/ z t) -5e-14) (not (<= (/ z t) 5e-87))) (* y (/ z t)) x))
double code(double x, double y, double z, double t) {
double tmp;
if (((z / t) <= -5e-14) || !((z / t) <= 5e-87)) {
tmp = y * (z / t);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (((z / t) <= (-5d-14)) .or. (.not. ((z / t) <= 5d-87))) then
tmp = y * (z / t)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (((z / t) <= -5e-14) || !((z / t) <= 5e-87)) {
tmp = y * (z / t);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if ((z / t) <= -5e-14) or not ((z / t) <= 5e-87): tmp = y * (z / t) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if ((Float64(z / t) <= -5e-14) || !(Float64(z / t) <= 5e-87)) tmp = Float64(y * Float64(z / t)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (((z / t) <= -5e-14) || ~(((z / t) <= 5e-87))) tmp = y * (z / t); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[N[(z / t), $MachinePrecision], -5e-14], N[Not[LessEqual[N[(z / t), $MachinePrecision], 5e-87]], $MachinePrecision]], N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{z}{t} \leq -5 \cdot 10^{-14} \lor \neg \left(\frac{z}{t} \leq 5 \cdot 10^{-87}\right):\\
\;\;\;\;y \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if (/.f64 z t) < -5.0000000000000002e-14 or 5.00000000000000042e-87 < (/.f64 z t) Initial program 96.8%
Taylor expanded in z around inf 87.8%
Taylor expanded in y around inf 54.3%
associate-*r/53.9%
associate-*l/60.5%
*-commutative60.5%
clear-num60.5%
un-div-inv60.6%
Applied egg-rr60.6%
*-un-lft-identity60.6%
associate-*l/60.5%
clear-num60.5%
Applied egg-rr60.5%
if -5.0000000000000002e-14 < (/.f64 z t) < 5.00000000000000042e-87Initial program 98.7%
Taylor expanded in z around 0 76.3%
Final simplification66.7%
(FPCore (x y z t) :precision binary64 (if (or (<= (/ z t) -5e-14) (not (<= (/ z t) 5e-87))) (/ y (/ t z)) x))
double code(double x, double y, double z, double t) {
double tmp;
if (((z / t) <= -5e-14) || !((z / t) <= 5e-87)) {
tmp = y / (t / z);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (((z / t) <= (-5d-14)) .or. (.not. ((z / t) <= 5d-87))) then
tmp = y / (t / z)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (((z / t) <= -5e-14) || !((z / t) <= 5e-87)) {
tmp = y / (t / z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if ((z / t) <= -5e-14) or not ((z / t) <= 5e-87): tmp = y / (t / z) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if ((Float64(z / t) <= -5e-14) || !(Float64(z / t) <= 5e-87)) tmp = Float64(y / Float64(t / z)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (((z / t) <= -5e-14) || ~(((z / t) <= 5e-87))) tmp = y / (t / z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[N[(z / t), $MachinePrecision], -5e-14], N[Not[LessEqual[N[(z / t), $MachinePrecision], 5e-87]], $MachinePrecision]], N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{z}{t} \leq -5 \cdot 10^{-14} \lor \neg \left(\frac{z}{t} \leq 5 \cdot 10^{-87}\right):\\
\;\;\;\;\frac{y}{\frac{t}{z}}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if (/.f64 z t) < -5.0000000000000002e-14 or 5.00000000000000042e-87 < (/.f64 z t) Initial program 96.8%
Taylor expanded in z around inf 87.8%
Taylor expanded in y around inf 54.3%
associate-*r/53.9%
associate-*l/60.5%
*-commutative60.5%
clear-num60.5%
un-div-inv60.6%
Applied egg-rr60.6%
if -5.0000000000000002e-14 < (/.f64 z t) < 5.00000000000000042e-87Initial program 98.7%
Taylor expanded in z around 0 76.3%
Final simplification66.7%
(FPCore (x y z t) :precision binary64 (if (or (<= z -1.7e-155) (not (<= z 2.22e+30))) (* z (/ y t)) x))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.7e-155) || !(z <= 2.22e+30)) {
tmp = z * (y / t);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((z <= (-1.7d-155)) .or. (.not. (z <= 2.22d+30))) then
tmp = z * (y / t)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.7e-155) || !(z <= 2.22e+30)) {
tmp = z * (y / t);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -1.7e-155) or not (z <= 2.22e+30): tmp = z * (y / t) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -1.7e-155) || !(z <= 2.22e+30)) tmp = Float64(z * Float64(y / t)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -1.7e-155) || ~((z <= 2.22e+30))) tmp = z * (y / t); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -1.7e-155], N[Not[LessEqual[z, 2.22e+30]], $MachinePrecision]], N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.7 \cdot 10^{-155} \lor \neg \left(z \leq 2.22 \cdot 10^{+30}\right):\\
\;\;\;\;z \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1.7e-155 or 2.22e30 < z Initial program 96.9%
Taylor expanded in z around inf 81.5%
Taylor expanded in y around inf 53.3%
if -1.7e-155 < z < 2.22e30Initial program 98.6%
Taylor expanded in z around 0 62.4%
Final simplification56.6%
(FPCore (x y z t) :precision binary64 (+ x (/ (- y x) (/ t z))))
double code(double x, double y, double z, double t) {
return x + ((y - x) / (t / z));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x + ((y - x) / (t / z))
end function
public static double code(double x, double y, double z, double t) {
return x + ((y - x) / (t / z));
}
def code(x, y, z, t): return x + ((y - x) / (t / z))
function code(x, y, z, t) return Float64(x + Float64(Float64(y - x) / Float64(t / z))) end
function tmp = code(x, y, z, t) tmp = x + ((y - x) / (t / z)); end
code[x_, y_, z_, t_] := N[(x + N[(N[(y - x), $MachinePrecision] / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y - x}{\frac{t}{z}}
\end{array}
Initial program 97.5%
Taylor expanded in y around 0 87.7%
+-commutative87.7%
mul-1-neg87.7%
sub-neg87.7%
associate-/l*88.9%
associate-/l*91.8%
div-sub97.7%
Simplified97.7%
Final simplification97.7%
(FPCore (x y z t) :precision binary64 (+ x (* (- y x) (/ z t))))
double code(double x, double y, double z, double t) {
return x + ((y - x) * (z / t));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x + ((y - x) * (z / t))
end function
public static double code(double x, double y, double z, double t) {
return x + ((y - x) * (z / t));
}
def code(x, y, z, t): return x + ((y - x) * (z / t))
function code(x, y, z, t) return Float64(x + Float64(Float64(y - x) * Float64(z / t))) end
function tmp = code(x, y, z, t) tmp = x + ((y - x) * (z / t)); end
code[x_, y_, z_, t_] := N[(x + N[(N[(y - x), $MachinePrecision] * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y - x\right) \cdot \frac{z}{t}
\end{array}
Initial program 97.5%
Final simplification97.5%
(FPCore (x y z t) :precision binary64 x)
double code(double x, double y, double z, double t) {
return x;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x
end function
public static double code(double x, double y, double z, double t) {
return x;
}
def code(x, y, z, t): return x
function code(x, y, z, t) return x end
function tmp = code(x, y, z, t) tmp = x; end
code[x_, y_, z_, t_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 97.5%
Taylor expanded in z around 0 33.9%
Final simplification33.9%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* (- y x) (/ z t))) (t_2 (+ x (/ (- y x) (/ t z)))))
(if (< t_1 -1013646692435.8867)
t_2
(if (< t_1 0.0) (+ x (/ (* (- y x) z) t)) t_2))))
double code(double x, double y, double z, double t) {
double t_1 = (y - x) * (z / t);
double t_2 = x + ((y - x) / (t / z));
double tmp;
if (t_1 < -1013646692435.8867) {
tmp = t_2;
} else if (t_1 < 0.0) {
tmp = x + (((y - x) * z) / t);
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (y - x) * (z / t)
t_2 = x + ((y - x) / (t / z))
if (t_1 < (-1013646692435.8867d0)) then
tmp = t_2
else if (t_1 < 0.0d0) then
tmp = x + (((y - x) * z) / t)
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (y - x) * (z / t);
double t_2 = x + ((y - x) / (t / z));
double tmp;
if (t_1 < -1013646692435.8867) {
tmp = t_2;
} else if (t_1 < 0.0) {
tmp = x + (((y - x) * z) / t);
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = (y - x) * (z / t) t_2 = x + ((y - x) / (t / z)) tmp = 0 if t_1 < -1013646692435.8867: tmp = t_2 elif t_1 < 0.0: tmp = x + (((y - x) * z) / t) else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(y - x) * Float64(z / t)) t_2 = Float64(x + Float64(Float64(y - x) / Float64(t / z))) tmp = 0.0 if (t_1 < -1013646692435.8867) tmp = t_2; elseif (t_1 < 0.0) tmp = Float64(x + Float64(Float64(Float64(y - x) * z) / t)); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (y - x) * (z / t); t_2 = x + ((y - x) / (t / z)); tmp = 0.0; if (t_1 < -1013646692435.8867) tmp = t_2; elseif (t_1 < 0.0) tmp = x + (((y - x) * z) / t); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y - x), $MachinePrecision] * N[(z / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(y - x), $MachinePrecision] / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t$95$1, -1013646692435.8867], t$95$2, If[Less[t$95$1, 0.0], N[(x + N[(N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y - x\right) \cdot \frac{z}{t}\\
t_2 := x + \frac{y - x}{\frac{t}{z}}\\
\mathbf{if}\;t_1 < -1013646692435.8867:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t_1 < 0:\\
\;\;\;\;x + \frac{\left(y - x\right) \cdot z}{t}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
herbie shell --seed 2023308
(FPCore (x y z t)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:tickPosition from plot-0.2.3.4"
:precision binary64
:herbie-target
(if (< (* (- y x) (/ z t)) -1013646692435.8867) (+ x (/ (- y x) (/ t z))) (if (< (* (- y x) (/ z t)) 0.0) (+ x (/ (* (- y x) z) t)) (+ x (/ (- y x) (/ t z)))))
(+ x (* (- y x) (/ z t))))