use algorithmatic.com's in-browser integrated-development-environment here. The IDE offers syntax-highlighting, realtime validation, syntax-autocompletion, autocompletion for external-calls, interpreter and basic debugging.
Account
signin
algorithmatic.com uses OpenID - that means you don't need to register, probably you already have an OpenID, you just need to enable it. Click here to sign in
The results are wrong. Your generator generates the series 0, 1, 2, … but the Fibonacci series is defined as 1, 1, 2, 3, 5 … Furthermore, you don’t actually need to consider all those special cases. This comes automatically because the loop won’t be executed for small `n`.
I assume you updated this version after madrat's comment. But still, why are we restricting our range to double (1476 in your code)? We can use BigInteger which will allow arbitrary length/size.