Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
CL-USER>(exp 1) 2.7182817
なんで?2.7182818である必要があります(2.7182818284590452353602874713526624977572470936999595749669から丸められます...)
SBCL 1.0.29.11.debian
これは、IEEE単精度浮動小数点形式に固有の丸め誤差です。
CL-USER> (exp 1.0d0) 2.718281828459045d0
この古典的な論文(PDF)で、浮動小数点演算とその「問題」について詳しく学んでください。
すべてのコンピューター科学者が浮動小数点演算について知っておくべきこと