Fixes $(0.0/0.0) giving `-nan` on some systems.
Fixes $(0.0/0.0) giving `-nan` on some systems.

Squashed commit of the following:

commit c7fc086b663f4d4003ccd5831a0ca508cf9badc7
Author: Dominik Picheta <dominikpicheta@gmail.com>
Date:   Sat Sep 17 21:09:48 2016 +0200

    Another attempt at fix.

commit 67b7fb67cda08d945e480a6a01fb0fee797add00
Author: Dominik Picheta <dominikpicheta@gmail.com>
Date:   Sat Sep 17 20:47:41 2016 +0200

    Fixes $(0.0/0.0) giving `-nan` on some systems.

russpowers/Nim,russpowers/Nim,singularperturbation/Nim,jfhg/Nim,russpowers/Nim,jfhg/Nim,tulayang/Nim,dom96/Nim,haiodo/Nim,dom96/Nim,haiodo/Nim,haiodo/Nim,singularperturbation/Nim,jfhg/Nim,tulayang/Nim,singularperturbation/Nim,singularperturbation/Nim,jfhg/Nim,dom96/Nim,haiodo/Nim,tulayang/Nim,dom96/Nim,haiodo/Nim,russpowers/Nim,russpowers/Nim,jfhg/Nim,singularperturbation/Nim,dom96/Nim,singularperturbation/Nim,singularperturbation/Nim,haiodo/Nim,tulayang/Nim,haiodo/Nim,dom96/Nim,russpowers/Nim,tulayang/Nim,russpowers/Nim,tulayang/Nim,dom96/Nim,jfhg/Nim,jfhg/Nim