Here you can find the source of atof(String s)
public static double atof(String s)
//package com.java2s; //License from project: Open Source License public class Main { public static double atof(String s) { double d = Double.valueOf(s).doubleValue(); if (Double.isNaN(d) || Double.isInfinite(d)) { System.err.print("NaN or Infinity in input\n"); System.exit(1);/* www . j a v a 2s. co m*/ } return (d); } }