Here you can find the source of toBinary(final double d)
public static double toBinary(final double d)
//package com.java2s; /**//from w w w.j av a 2 s.c o m * Introduction to Neural Networks with Java, 2nd Edition * Copyright 2008 by Heaton Research, Inc. * http://www.heatonresearch.com/books/java-neural-2/ * * ISBN13: 978-1-60439-008-7 * ISBN: 1-60439-008-5 * * This class is released under the: * GNU Lesser General Public License (LGPL) * http://www.gnu.org/copyleft/lesser.html */ public class Main { public static double toBinary(final double d) { return (d + 1) / 2.0; } }