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.
我们都知道,如果我们将 (1.0/0.0) 相除,我们将得到 +Infinity,如果我们将 (-1.0/0.0) 相除,我们将得到 -Infinity!我想知道计算机如何在内部计算这个值??
PS:我想知道为什么我在任何 StackExchange 社区都没有发现任何关于此的问题!
简短回答:它会检测到您除以 0 而不是实际除法。
在这里长答案:https ://softwareengineering.stackexchange.com/questions/311155/will-a-computer-attempt-to-divide-by-zero