Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server crash on alternatives. #1019

Open
zaneenders opened this issue Oct 21, 2024 · 0 comments
Open

Server crash on alternatives. #1019

zaneenders opened this issue Oct 21, 2024 · 0 comments
Assignees

Comments

@zaneenders
Copy link
Collaborator

The following API call triggers a crash in the server.

const FPCoreCrash1 = '(FPCore (c x y) (if (<= y (- 1.75e+15)) (* c (log1p (* (expm1 x) y))) (if (<= y 1.45e-16) (* (fma (fma (fma (* (pow (expm1 x) 3.0) c) 0.3333333333333333 (* (- 0.25) (* (* (pow (expm1 x) 4.0) y) c))) y (* (- 0.5) (* (pow (expm1 x) 2.0) c))) y (* c (expm1 x))) y) (* c (log1p (* (expm1 x) y))))))'
const crash_sample = await (await fetch(makeEndpoint("/api/sample"), {
  method: 'POST', body: JSON.stringify({
    formula: FPCoreCrash1,  seed: 475472373
  })
})).json()
const altBody = {
  method: 'POST', body: JSON.stringify({
    formula: FPCoreCrash1, sample: crash_sample.points
  })
}
const alternatives = await (await fetch(makeEndpoint("/api/alternatives"), altBody)).json()
dict-set: arity mismatch;
 the expected number of arguments does not match the given number
  expected: 3
  given: 1
  arguments...:
   '((:precision . binary64))
  context...:
   .../match/compiler.rkt:559:40: f565
   /Users/zane/herbie/src/syntax/sugar.rkt:254:2: loop
   .../private/map.rkt:40:19: loop
   [repeats 1 more time]
   .../match/compiler.rkt:559:40: f497
   /Users/zane/herbie/src/syntax/sugar.rkt:254:2: loop
   .../private/map.rkt:40:19: loop
   .../match/compiler.rkt:559:40: f497
   /Users/zane/herbie/src/syntax/sugar.rkt:347:0: prog->fpcore
   /Users/zane/herbie/src/reports/common.rkt:58:0: program->fpcore
   /Users/zane/herbie/src/reports/history.rkt:184:0: render-proof
   .../match/compiler.rkt:559:40: f188
   .../match/compiler.rkt:559:40: f232
   .../match/compiler.rkt:559:40: f217
   /Users/zane/herbie/src/reports/history.rkt:112:0: render-history
   /Applications/Racket v8.14/collects/racket/contract/private/arrow-higher-order.rkt:375:33
@zaneenders zaneenders self-assigned this Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant