
(FPCore (x y z t a) :precision binary64 (+ x (* (- y z) (/ (- t x) (- a z)))))
double code(double x, double y, double z, double t, double a) {
return x + ((y - z) * ((t - x) / (a - z)));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + ((y - z) * ((t - x) / (a - z)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y - z) * ((t - x) / (a - z)));
}
def code(x, y, z, t, a): return x + ((y - z) * ((t - x) / (a - z)))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y - z) * ((t - x) / (a - z))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y - z\right) \cdot \frac{t - x}{a - z}
\end{array}
herbie shell --seed 2024277
(FPCore (x y z t a)
:name "Numeric.Signal:interpolate from hsignal-0.2.7.1"
:precision binary64
(+ x (* (- y z) (/ (- t x) (- a z)))))
Please file a bug report with this information.
| rival-apply: contract violation expected: (or/c ^TYPE? boolean?) given: 0 in: an element of the 2nd argument of (-> rival-machine? (vectorof (or/c ^TYPE? boolean?)) (vectorof any/c)) contract from: <pkgs>/rival/main.rkt blaming: <pkgs>/herbie/core/rival.rkt (assuming the contract is correct) at: <pkgs>/rival/main.rkt:95:24 | L | C | |
|---|---|---|---|
| raise-blame-error | /usr/share/racket/collects/racket/contract/private/blame.rkt | 346 | 0 |
| loop | .../private/map.rkt | 40 | 19 |
| vector-map/update | /usr/share/racket/collects/racket/vector.rkt | 62 | 0 |
| vector-map | /usr/share/racket/collects/racket/vector.rkt | 106 | 0 |
| rival-apply | /home/nightlies/.local/share/racket/8.10/pkgs/rival/eval/main.rkt | 65 | 0 |
| (unnamed) | /usr/share/racket/collects/racket/contract/private/arrow-val-first.rkt | 486 | 18 |
| (unnamed) | /home/nightlies/herbie/zane-concrete-values/src/core/rival.rkt | 76 | 4 |
| real-apply | /home/nightlies/herbie/zane-concrete-values/src/core/rival.rkt | 67 | 0 |
| (unnamed) | .../private/arrow-val-first.rkt | 486 | 18 |
| <eval-prog-real> | /home/nightlies/herbie/zane-concrete-values/src/core/sampling.rkt | 136 | 2 |
| compute-local-errors | /home/nightlies/herbie/zane-concrete-values/src/core/localize.rkt | 216 | 0 |
| actual-errors | /home/nightlies/herbie/zane-concrete-values/src/core/explain.rkt | 35 | 0 |
| generate-timelines | /home/nightlies/herbie/zane-concrete-values/src/core/explain.rkt | 498 | 0 |
| explain! | /home/nightlies/herbie/zane-concrete-values/src/core/mainloop.rkt | 323 | 0 |
| run-improve! | /home/nightlies/herbie/zane-concrete-values/src/core/mainloop.rkt | 45 | 0 |
| get-alternatives/report | /home/nightlies/herbie/zane-concrete-values/src/api/sandbox.rkt | 186 | 0 |
| (unnamed) | /home/nightlies/herbie/zane-concrete-values/src/api/sandbox.rkt | 282 | 6 |
| (unnamed) | /usr/share/racket/pkgs/profile-lib/main.rkt | 40 | 10 |
| profile-thunk | /usr/share/racket/pkgs/profile-lib/main.rkt | 9 | 0 |
| (unnamed) | /usr/share/racket/collects/racket/engine.rkt | 42 | 24 |