round(114.414639980025*t - 0.0325406046935314*(5*t/9 - 160/9)^2 - 1963.30142331927)

Percentage Accurate: 100.0% → 100.0%
Time: 4.8s
Alternatives: 4
Speedup: 2.2×

Specification

?
\[25 \leq t \land t \leq 300\]
\[\begin{array}{l} \\ \mathsf{round} \left(\left(114.414639980025 \cdot t - 0.0325406046935314 \cdot {\left(\frac{5 \cdot t}{9} - \frac{160}{9}\right)}^{2}\right) - 1963.30142331927\right) \end{array} \]
(FPCore (t)
 :precision binary64
 (round
  (-
   (-
    (* 114.414639980025 t)
    (* 0.0325406046935314 (pow (- (/ (* 5.0 t) 9.0) (/ 160.0 9.0)) 2.0)))
   1963.30142331927)))
double code(double t) {
	return round((((114.414639980025 * t) - (0.0325406046935314 * pow((((5.0 * t) / 9.0) - (160.0 / 9.0)), 2.0))) - 1963.30142331927));
}
real(8) function code(t)
    real(8), intent (in) :: t
    code = anint((((114.414639980025d0 * t) - (0.0325406046935314d0 * ((((5.0d0 * t) / 9.0d0) - (160.0d0 / 9.0d0)) ** 2.0d0))) - 1963.30142331927d0))
end function
function code(t)
	return round(Float64(Float64(Float64(114.414639980025 * t) - Float64(0.0325406046935314 * (Float64(Float64(Float64(5.0 * t) / 9.0) - Float64(160.0 / 9.0)) ^ 2.0))) - 1963.30142331927))
end
function tmp = code(t)
	tmp = round((((114.414639980025 * t) - (0.0325406046935314 * ((((5.0 * t) / 9.0) - (160.0 / 9.0)) ^ 2.0))) - 1963.30142331927));
end
code[t_] := N[With[{TMP1 = N[(N[(N[(114.414639980025 * t), $MachinePrecision] - N[(0.0325406046935314 * N[Power[N[(N[(N[(5.0 * t), $MachinePrecision] / 9.0), $MachinePrecision] - N[(160.0 / 9.0), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 1963.30142331927), $MachinePrecision]}, If[Abs[TMP1] - Floor[Abs[TMP1]] < 1/2, Floor[Abs[TMP1]] * Sign[TMP1], Ceiling[Abs[TMP1]] * Sign[TMP1]]], $MachinePrecision]
\begin{array}{l}

\\
\mathsf{round} \left(\left(114.414639980025 \cdot t - 0.0325406046935314 \cdot {\left(\frac{5 \cdot t}{9} - \frac{160}{9}\right)}^{2}\right) - 1963.30142331927\right)
\end{array}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 4 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 100.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \mathsf{round} \left(\left(114.414639980025 \cdot t - 0.0325406046935314 \cdot {\left(\frac{5 \cdot t}{9} - \frac{160}{9}\right)}^{2}\right) - 1963.30142331927\right) \end{array} \]
(FPCore (t)
 :precision binary64
 (round
  (-
   (-
    (* 114.414639980025 t)
    (* 0.0325406046935314 (pow (- (/ (* 5.0 t) 9.0) (/ 160.0 9.0)) 2.0)))
   1963.30142331927)))
double code(double t) {
	return round((((114.414639980025 * t) - (0.0325406046935314 * pow((((5.0 * t) / 9.0) - (160.0 / 9.0)), 2.0))) - 1963.30142331927));
}
real(8) function code(t)
    real(8), intent (in) :: t
    code = anint((((114.414639980025d0 * t) - (0.0325406046935314d0 * ((((5.0d0 * t) / 9.0d0) - (160.0d0 / 9.0d0)) ** 2.0d0))) - 1963.30142331927d0))
end function
function code(t)
	return round(Float64(Float64(Float64(114.414639980025 * t) - Float64(0.0325406046935314 * (Float64(Float64(Float64(5.0 * t) / 9.0) - Float64(160.0 / 9.0)) ^ 2.0))) - 1963.30142331927))
end
function tmp = code(t)
	tmp = round((((114.414639980025 * t) - (0.0325406046935314 * ((((5.0 * t) / 9.0) - (160.0 / 9.0)) ^ 2.0))) - 1963.30142331927));
end
code[t_] := N[With[{TMP1 = N[(N[(N[(114.414639980025 * t), $MachinePrecision] - N[(0.0325406046935314 * N[Power[N[(N[(N[(5.0 * t), $MachinePrecision] / 9.0), $MachinePrecision] - N[(160.0 / 9.0), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 1963.30142331927), $MachinePrecision]}, If[Abs[TMP1] - Floor[Abs[TMP1]] < 1/2, Floor[Abs[TMP1]] * Sign[TMP1], Ceiling[Abs[TMP1]] * Sign[TMP1]]], $MachinePrecision]
\begin{array}{l}

\\
\mathsf{round} \left(\left(114.414639980025 \cdot t - 0.0325406046935314 \cdot {\left(\frac{5 \cdot t}{9} - \frac{160}{9}\right)}^{2}\right) - 1963.30142331927\right)
\end{array}

Alternative 1: 100.0% accurate, 2.2× speedup?

\[\begin{array}{l} \\ \mathsf{round} \left(\mathsf{fma}\left(\mathsf{fma}\left(-0.010043396510349198, t, 115.05741735668735\right), t, -1973.5858613458677\right)\right) \end{array} \]
(FPCore (t)
 :precision binary64
 (round
  (fma
   (fma -0.010043396510349198 t 115.05741735668735)
   t
   -1973.5858613458677)))
double code(double t) {
	return round(fma(fma(-0.010043396510349198, t, 115.05741735668735), t, -1973.5858613458677));
}
function code(t)
	return round(fma(fma(-0.010043396510349198, t, 115.05741735668735), t, -1973.5858613458677))
end
code[t_] := N[With[{TMP1 = N[(N[(-0.010043396510349198 * t + 115.05741735668735), $MachinePrecision] * t + -1973.5858613458677), $MachinePrecision]}, If[Abs[TMP1] - Floor[Abs[TMP1]] < 1/2, Floor[Abs[TMP1]] * Sign[TMP1], Ceiling[Abs[TMP1]] * Sign[TMP1]]], $MachinePrecision]
\begin{array}{l}

\\
\mathsf{round} \left(\mathsf{fma}\left(\mathsf{fma}\left(-0.010043396510349198, t, 115.05741735668735\right), t, -1973.5858613458677\right)\right)
\end{array}
Derivation
  1. Initial program 100.0%

    \[\mathsf{round} \left(\left(114.414639980025 \cdot t - 0.0325406046935314 \cdot {\left(\frac{5 \cdot t}{9} - \frac{160}{9}\right)}^{2}\right) - 1963.30142331927\right) \]
  2. Add Preprocessing
  3. Taylor expanded in t around 0

    \[\leadsto \mathsf{round} \color{blue}{\left(t \cdot \left(\frac{5246496987079611461}{45598946227126272} + \frac{-29309971034439725}{2918332558536081408} \cdot t\right) - \frac{5624589722882931509}{2849934139195392}\right)} \]
  4. Applied rewrites100.0%

    \[\leadsto \mathsf{round} \color{blue}{\left(\mathsf{fma}\left(\mathsf{fma}\left(-0.010043396510349198, t, 115.05741735668735\right), t, -1973.5858613458677\right)\right)} \]
  5. Add Preprocessing

Alternative 2: 28.2% accurate, 2.3× speedup?

\[\begin{array}{l} \\ \mathsf{round} \left(\mathsf{fma}\left(115.05741735668735, t, -1973.5858613458677\right)\right) \end{array} \]
(FPCore (t)
 :precision binary64
 (round (fma 115.05741735668735 t -1973.5858613458677)))
double code(double t) {
	return round(fma(115.05741735668735, t, -1973.5858613458677));
}
function code(t)
	return round(fma(115.05741735668735, t, -1973.5858613458677))
end
code[t_] := N[With[{TMP1 = N[(115.05741735668735 * t + -1973.5858613458677), $MachinePrecision]}, If[Abs[TMP1] - Floor[Abs[TMP1]] < 1/2, Floor[Abs[TMP1]] * Sign[TMP1], Ceiling[Abs[TMP1]] * Sign[TMP1]]], $MachinePrecision]
\begin{array}{l}

\\
\mathsf{round} \left(\mathsf{fma}\left(115.05741735668735, t, -1973.5858613458677\right)\right)
\end{array}
Derivation
  1. Initial program 100.0%

    \[\mathsf{round} \left(\left(114.414639980025 \cdot t - 0.0325406046935314 \cdot {\left(\frac{5 \cdot t}{9} - \frac{160}{9}\right)}^{2}\right) - 1963.30142331927\right) \]
  2. Add Preprocessing
  3. Taylor expanded in t around 0

    \[\leadsto \mathsf{round} \color{blue}{\left(\frac{5246496987079611461}{45598946227126272} \cdot t - \frac{5624589722882931509}{2849934139195392}\right)} \]
  4. Step-by-step derivation
    1. sub-negN/A

      \[\leadsto \mathsf{round} \color{blue}{\left(\frac{5246496987079611461}{45598946227126272} \cdot t + \left(\mathsf{neg}\left(\frac{5624589722882931509}{2849934139195392}\right)\right)\right)} \]
    2. metadata-evalN/A

      \[\leadsto \mathsf{round} \left(\frac{5246496987079611461}{45598946227126272} \cdot t + \color{blue}{\frac{-5624589722882931509}{2849934139195392}}\right) \]
    3. metadata-evalN/A

      \[\leadsto \mathsf{round} \left(\frac{5246496987079611461}{45598946227126272} \cdot t + \color{blue}{1 \cdot \frac{-5624589722882931509}{2849934139195392}}\right) \]
    4. lft-mult-inverseN/A

      \[\leadsto \mathsf{round} \left(\frac{5246496987079611461}{45598946227126272} \cdot t + \color{blue}{\left(\frac{1}{{t}^{2}} \cdot {t}^{2}\right)} \cdot \frac{-5624589722882931509}{2849934139195392}\right) \]
    5. associate-*l/N/A

      \[\leadsto \mathsf{round} \left(\frac{5246496987079611461}{45598946227126272} \cdot t + \color{blue}{\frac{1 \cdot {t}^{2}}{{t}^{2}}} \cdot \frac{-5624589722882931509}{2849934139195392}\right) \]
    6. *-lft-identityN/A

      \[\leadsto \mathsf{round} \left(\frac{5246496987079611461}{45598946227126272} \cdot t + \frac{\color{blue}{{t}^{2}}}{{t}^{2}} \cdot \frac{-5624589722882931509}{2849934139195392}\right) \]
    7. metadata-evalN/A

      \[\leadsto \mathsf{round} \left(\frac{5246496987079611461}{45598946227126272} \cdot t + \frac{{t}^{2}}{{t}^{2}} \cdot \color{blue}{\frac{\frac{5624589722882931509}{2849934139195392}}{-1}}\right) \]
    8. times-fracN/A

      \[\leadsto \mathsf{round} \left(\frac{5246496987079611461}{45598946227126272} \cdot t + \color{blue}{\frac{{t}^{2} \cdot \frac{5624589722882931509}{2849934139195392}}{{t}^{2} \cdot -1}}\right) \]
    9. associate-*r/N/A

      \[\leadsto \mathsf{round} \left(\frac{5246496987079611461}{45598946227126272} \cdot t + \color{blue}{{t}^{2} \cdot \frac{\frac{5624589722882931509}{2849934139195392}}{{t}^{2} \cdot -1}}\right) \]
    10. *-commutativeN/A

      \[\leadsto \mathsf{round} \left(\frac{5246496987079611461}{45598946227126272} \cdot t + {t}^{2} \cdot \frac{\frac{5624589722882931509}{2849934139195392}}{\color{blue}{-1 \cdot {t}^{2}}}\right) \]
    11. mul-1-negN/A

      \[\leadsto \mathsf{round} \left(\frac{5246496987079611461}{45598946227126272} \cdot t + {t}^{2} \cdot \frac{\frac{5624589722882931509}{2849934139195392}}{\color{blue}{\mathsf{neg}\left({t}^{2}\right)}}\right) \]
    12. distribute-neg-frac2N/A

      \[\leadsto \mathsf{round} \left(\frac{5246496987079611461}{45598946227126272} \cdot t + {t}^{2} \cdot \color{blue}{\left(\mathsf{neg}\left(\frac{\frac{5624589722882931509}{2849934139195392}}{{t}^{2}}\right)\right)}\right) \]
    13. lower-fma.f64N/A

      \[\leadsto \mathsf{round} \color{blue}{\left(\mathsf{fma}\left(\frac{5246496987079611461}{45598946227126272}, t, {t}^{2} \cdot \left(\mathsf{neg}\left(\frac{\frac{5624589722882931509}{2849934139195392}}{{t}^{2}}\right)\right)\right)\right)} \]
    14. distribute-neg-frac2N/A

      \[\leadsto \mathsf{round} \left(\mathsf{fma}\left(\frac{5246496987079611461}{45598946227126272}, t, {t}^{2} \cdot \color{blue}{\frac{\frac{5624589722882931509}{2849934139195392}}{\mathsf{neg}\left({t}^{2}\right)}}\right)\right) \]
    15. mul-1-negN/A

      \[\leadsto \mathsf{round} \left(\mathsf{fma}\left(\frac{5246496987079611461}{45598946227126272}, t, {t}^{2} \cdot \frac{\frac{5624589722882931509}{2849934139195392}}{\color{blue}{-1 \cdot {t}^{2}}}\right)\right) \]
    16. *-commutativeN/A

      \[\leadsto \mathsf{round} \left(\mathsf{fma}\left(\frac{5246496987079611461}{45598946227126272}, t, {t}^{2} \cdot \frac{\frac{5624589722882931509}{2849934139195392}}{\color{blue}{{t}^{2} \cdot -1}}\right)\right) \]
    17. associate-*r/N/A

      \[\leadsto \mathsf{round} \left(\mathsf{fma}\left(\frac{5246496987079611461}{45598946227126272}, t, \color{blue}{\frac{{t}^{2} \cdot \frac{5624589722882931509}{2849934139195392}}{{t}^{2} \cdot -1}}\right)\right) \]
    18. times-fracN/A

      \[\leadsto \mathsf{round} \left(\mathsf{fma}\left(\frac{5246496987079611461}{45598946227126272}, t, \color{blue}{\frac{{t}^{2}}{{t}^{2}} \cdot \frac{\frac{5624589722882931509}{2849934139195392}}{-1}}\right)\right) \]
    19. *-lft-identityN/A

      \[\leadsto \mathsf{round} \left(\mathsf{fma}\left(\frac{5246496987079611461}{45598946227126272}, t, \frac{\color{blue}{1 \cdot {t}^{2}}}{{t}^{2}} \cdot \frac{\frac{5624589722882931509}{2849934139195392}}{-1}\right)\right) \]
    20. associate-*l/N/A

      \[\leadsto \mathsf{round} \left(\mathsf{fma}\left(\frac{5246496987079611461}{45598946227126272}, t, \color{blue}{\left(\frac{1}{{t}^{2}} \cdot {t}^{2}\right)} \cdot \frac{\frac{5624589722882931509}{2849934139195392}}{-1}\right)\right) \]
    21. lft-mult-inverseN/A

      \[\leadsto \mathsf{round} \left(\mathsf{fma}\left(\frac{5246496987079611461}{45598946227126272}, t, \color{blue}{1} \cdot \frac{\frac{5624589722882931509}{2849934139195392}}{-1}\right)\right) \]
    22. metadata-evalN/A

      \[\leadsto \mathsf{round} \left(\mathsf{fma}\left(\frac{5246496987079611461}{45598946227126272}, t, 1 \cdot \color{blue}{\frac{-5624589722882931509}{2849934139195392}}\right)\right) \]
    23. metadata-eval28.2

      \[\leadsto \mathsf{round} \left(\mathsf{fma}\left(115.05741735668735, t, \color{blue}{-1973.5858613458677}\right)\right) \]
  5. Applied rewrites28.2%

    \[\leadsto \mathsf{round} \color{blue}{\left(\mathsf{fma}\left(115.05741735668735, t, -1973.5858613458677\right)\right)} \]
  6. Add Preprocessing

Alternative 3: 21.0% accurate, 2.3× speedup?

\[\begin{array}{l} \\ \mathsf{round} \left(115.05741735668735 \cdot t\right) \end{array} \]
(FPCore (t) :precision binary64 (round (* 115.05741735668735 t)))
double code(double t) {
	return round((115.05741735668735 * t));
}
real(8) function code(t)
    real(8), intent (in) :: t
    code = anint((115.05741735668735d0 * t))
end function
function code(t)
	return round(Float64(115.05741735668735 * t))
end
function tmp = code(t)
	tmp = round((115.05741735668735 * t));
end
code[t_] := N[With[{TMP1 = N[(115.05741735668735 * t), $MachinePrecision]}, If[Abs[TMP1] - Floor[Abs[TMP1]] < 1/2, Floor[Abs[TMP1]] * Sign[TMP1], Ceiling[Abs[TMP1]] * Sign[TMP1]]], $MachinePrecision]
\begin{array}{l}

\\
\mathsf{round} \left(115.05741735668735 \cdot t\right)
\end{array}
Derivation
  1. Initial program 100.0%

    \[\mathsf{round} \left(\left(114.414639980025 \cdot t - 0.0325406046935314 \cdot {\left(\frac{5 \cdot t}{9} - \frac{160}{9}\right)}^{2}\right) - 1963.30142331927\right) \]
  2. Add Preprocessing
  3. Taylor expanded in t around 0

    \[\leadsto \mathsf{round} \color{blue}{\left(\frac{5246496987079611461}{45598946227126272} \cdot t - \frac{5624589722882931509}{2849934139195392}\right)} \]
  4. Step-by-step derivation
    1. sub-negN/A

      \[\leadsto \mathsf{round} \color{blue}{\left(\frac{5246496987079611461}{45598946227126272} \cdot t + \left(\mathsf{neg}\left(\frac{5624589722882931509}{2849934139195392}\right)\right)\right)} \]
    2. metadata-evalN/A

      \[\leadsto \mathsf{round} \left(\frac{5246496987079611461}{45598946227126272} \cdot t + \color{blue}{\frac{-5624589722882931509}{2849934139195392}}\right) \]
    3. metadata-evalN/A

      \[\leadsto \mathsf{round} \left(\frac{5246496987079611461}{45598946227126272} \cdot t + \color{blue}{1 \cdot \frac{-5624589722882931509}{2849934139195392}}\right) \]
    4. lft-mult-inverseN/A

      \[\leadsto \mathsf{round} \left(\frac{5246496987079611461}{45598946227126272} \cdot t + \color{blue}{\left(\frac{1}{{t}^{2}} \cdot {t}^{2}\right)} \cdot \frac{-5624589722882931509}{2849934139195392}\right) \]
    5. associate-*l/N/A

      \[\leadsto \mathsf{round} \left(\frac{5246496987079611461}{45598946227126272} \cdot t + \color{blue}{\frac{1 \cdot {t}^{2}}{{t}^{2}}} \cdot \frac{-5624589722882931509}{2849934139195392}\right) \]
    6. *-lft-identityN/A

      \[\leadsto \mathsf{round} \left(\frac{5246496987079611461}{45598946227126272} \cdot t + \frac{\color{blue}{{t}^{2}}}{{t}^{2}} \cdot \frac{-5624589722882931509}{2849934139195392}\right) \]
    7. metadata-evalN/A

      \[\leadsto \mathsf{round} \left(\frac{5246496987079611461}{45598946227126272} \cdot t + \frac{{t}^{2}}{{t}^{2}} \cdot \color{blue}{\frac{\frac{5624589722882931509}{2849934139195392}}{-1}}\right) \]
    8. times-fracN/A

      \[\leadsto \mathsf{round} \left(\frac{5246496987079611461}{45598946227126272} \cdot t + \color{blue}{\frac{{t}^{2} \cdot \frac{5624589722882931509}{2849934139195392}}{{t}^{2} \cdot -1}}\right) \]
    9. associate-*r/N/A

      \[\leadsto \mathsf{round} \left(\frac{5246496987079611461}{45598946227126272} \cdot t + \color{blue}{{t}^{2} \cdot \frac{\frac{5624589722882931509}{2849934139195392}}{{t}^{2} \cdot -1}}\right) \]
    10. *-commutativeN/A

      \[\leadsto \mathsf{round} \left(\frac{5246496987079611461}{45598946227126272} \cdot t + {t}^{2} \cdot \frac{\frac{5624589722882931509}{2849934139195392}}{\color{blue}{-1 \cdot {t}^{2}}}\right) \]
    11. mul-1-negN/A

      \[\leadsto \mathsf{round} \left(\frac{5246496987079611461}{45598946227126272} \cdot t + {t}^{2} \cdot \frac{\frac{5624589722882931509}{2849934139195392}}{\color{blue}{\mathsf{neg}\left({t}^{2}\right)}}\right) \]
    12. distribute-neg-frac2N/A

      \[\leadsto \mathsf{round} \left(\frac{5246496987079611461}{45598946227126272} \cdot t + {t}^{2} \cdot \color{blue}{\left(\mathsf{neg}\left(\frac{\frac{5624589722882931509}{2849934139195392}}{{t}^{2}}\right)\right)}\right) \]
    13. lower-fma.f64N/A

      \[\leadsto \mathsf{round} \color{blue}{\left(\mathsf{fma}\left(\frac{5246496987079611461}{45598946227126272}, t, {t}^{2} \cdot \left(\mathsf{neg}\left(\frac{\frac{5624589722882931509}{2849934139195392}}{{t}^{2}}\right)\right)\right)\right)} \]
    14. distribute-neg-frac2N/A

      \[\leadsto \mathsf{round} \left(\mathsf{fma}\left(\frac{5246496987079611461}{45598946227126272}, t, {t}^{2} \cdot \color{blue}{\frac{\frac{5624589722882931509}{2849934139195392}}{\mathsf{neg}\left({t}^{2}\right)}}\right)\right) \]
    15. mul-1-negN/A

      \[\leadsto \mathsf{round} \left(\mathsf{fma}\left(\frac{5246496987079611461}{45598946227126272}, t, {t}^{2} \cdot \frac{\frac{5624589722882931509}{2849934139195392}}{\color{blue}{-1 \cdot {t}^{2}}}\right)\right) \]
    16. *-commutativeN/A

      \[\leadsto \mathsf{round} \left(\mathsf{fma}\left(\frac{5246496987079611461}{45598946227126272}, t, {t}^{2} \cdot \frac{\frac{5624589722882931509}{2849934139195392}}{\color{blue}{{t}^{2} \cdot -1}}\right)\right) \]
    17. associate-*r/N/A

      \[\leadsto \mathsf{round} \left(\mathsf{fma}\left(\frac{5246496987079611461}{45598946227126272}, t, \color{blue}{\frac{{t}^{2} \cdot \frac{5624589722882931509}{2849934139195392}}{{t}^{2} \cdot -1}}\right)\right) \]
    18. times-fracN/A

      \[\leadsto \mathsf{round} \left(\mathsf{fma}\left(\frac{5246496987079611461}{45598946227126272}, t, \color{blue}{\frac{{t}^{2}}{{t}^{2}} \cdot \frac{\frac{5624589722882931509}{2849934139195392}}{-1}}\right)\right) \]
    19. *-lft-identityN/A

      \[\leadsto \mathsf{round} \left(\mathsf{fma}\left(\frac{5246496987079611461}{45598946227126272}, t, \frac{\color{blue}{1 \cdot {t}^{2}}}{{t}^{2}} \cdot \frac{\frac{5624589722882931509}{2849934139195392}}{-1}\right)\right) \]
    20. associate-*l/N/A

      \[\leadsto \mathsf{round} \left(\mathsf{fma}\left(\frac{5246496987079611461}{45598946227126272}, t, \color{blue}{\left(\frac{1}{{t}^{2}} \cdot {t}^{2}\right)} \cdot \frac{\frac{5624589722882931509}{2849934139195392}}{-1}\right)\right) \]
    21. lft-mult-inverseN/A

      \[\leadsto \mathsf{round} \left(\mathsf{fma}\left(\frac{5246496987079611461}{45598946227126272}, t, \color{blue}{1} \cdot \frac{\frac{5624589722882931509}{2849934139195392}}{-1}\right)\right) \]
    22. metadata-evalN/A

      \[\leadsto \mathsf{round} \left(\mathsf{fma}\left(\frac{5246496987079611461}{45598946227126272}, t, 1 \cdot \color{blue}{\frac{-5624589722882931509}{2849934139195392}}\right)\right) \]
    23. metadata-eval28.2

      \[\leadsto \mathsf{round} \left(\mathsf{fma}\left(115.05741735668735, t, \color{blue}{-1973.5858613458677}\right)\right) \]
  5. Applied rewrites28.2%

    \[\leadsto \mathsf{round} \color{blue}{\left(\mathsf{fma}\left(115.05741735668735, t, -1973.5858613458677\right)\right)} \]
  6. Taylor expanded in t around inf

    \[\leadsto \mathsf{round} \left(\frac{5246496987079611461}{45598946227126272} \cdot \color{blue}{t}\right) \]
  7. Step-by-step derivation
    1. Applied rewrites21.1%

      \[\leadsto \mathsf{round} \left(115.05741735668735 \cdot \color{blue}{t}\right) \]
    2. Add Preprocessing

    Alternative 4: 1.5% accurate, 2.5× speedup?

    \[\begin{array}{l} \\ \mathsf{round} -1973.5858613458677 \end{array} \]
    (FPCore (t) :precision binary64 (round -1973.5858613458677))
    double code(double t) {
    	return round(-1973.5858613458677);
    }
    
    real(8) function code(t)
        real(8), intent (in) :: t
        code = anint((-1973.5858613458677d0))
    end function
    
    function code(t)
    	return round(-1973.5858613458677)
    end
    
    function tmp = code(t)
    	tmp = round(-1973.5858613458677);
    end
    
    code[t_] := N[With[{TMP1 = -1973.5858613458677}, If[Abs[TMP1] - Floor[Abs[TMP1]] < 1/2, Floor[Abs[TMP1]] * Sign[TMP1], Ceiling[Abs[TMP1]] * Sign[TMP1]]], $MachinePrecision]
    
    \begin{array}{l}
    
    \\
    \mathsf{round} -1973.5858613458677
    \end{array}
    
    Derivation
    1. Initial program 100.0%

      \[\mathsf{round} \left(\left(114.414639980025 \cdot t - 0.0325406046935314 \cdot {\left(\frac{5 \cdot t}{9} - \frac{160}{9}\right)}^{2}\right) - 1963.30142331927\right) \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0

      \[\leadsto \mathsf{round} \color{blue}{\frac{-5624589722882931509}{2849934139195392}} \]
    4. Step-by-step derivation
      1. Applied rewrites1.5%

        \[\leadsto \mathsf{round} \color{blue}{-1973.5858613458677} \]
      2. Add Preprocessing

      Reproduce

      ?
      herbie shell --seed 1 
      (FPCore (t)
        :name "round(114.414639980025*t - 0.0325406046935314*(5*t/9 - 160/9)^2 - 1963.30142331927)"
        :precision binary64
        :pre (and (<= 25.0 t) (<= t 300.0))
        (round (- (- (* 114.414639980025 t) (* 0.0325406046935314 (pow (- (/ (* 5.0 t) 9.0) (/ 160.0 9.0)) 2.0))) 1963.30142331927)))