jterrace / js.js

js.js: A JavaScript JavaScript interpreter
Other
1.08k stars 58 forks source link

[Bug] Wired issue about Fibonacci example #11

Closed WMXPY closed 6 years ago

WMXPY commented 6 years ago

First, thanks for this great package!

Introduction

Fibonacci example return wrong result when input greater than 45.

Recurrent

  1. Run example both Native js and js.js with input 45.
  2. Run example both Native js and js.js with input 46.

I tried to fix this issue myself, but source code is too huge to understand quickly, if anyone can give me a hint or idea about this issue, I am more than happy to help fix it!!

jterrace commented 6 years ago

Yeah, this is due to overflow I believe. I'm not sure how to fix it.