Math Domain Error Python Log