001package de.hdm_stuttgart.sd1.math; 002 003/** 004 * {@link Math#exp(double)} usage example. 005 * 006 */ 007public class Driver { 008 009 /** 010 * @param args Unused 011 */ 012 public static void main(String[] args) { 013 014 Math.setSeriesLimit(6); 015 016 double byPowerSeries = Math.exp(1.); 017 System.out.println("e=" + byPowerSeries + ", diff=" + (byPowerSeries - java.lang.Math.exp(1.))); 018 019 byPowerSeries = Math.exp(2.); 020 System.out.println("e=" + byPowerSeries + ", diff=" + (byPowerSeries - java.lang.Math.exp(2.))); 021 022 byPowerSeries = Math.exp(3.); 023 System.out.println("e=" + byPowerSeries + ", diff=" + (byPowerSeries - java.lang.Math.exp(3.))); 024 025 } 026}