Evaluation of e^x with series expansion
General Programming

Using built the built in exponent function from racket/base and referencing Euler's Number from math/base would probably reduce the likelihood of bugs; increase speed; and allow programming at a higher level of abstraction.

An alternative to read is the GUI function get-text-from-user in racket/gui/base.


Example Code
#lang racket

(require (only-in math/base
                  euler.0)
         (only-in racket/gui/base
                  get-text-from-user))

(define (get-power-of-e)
  (define x (string-&gt;number
             (get-text-from-user &quot;Power of e&quot;
                                 &quot;provide exponent&quot;)))
  (expt euler.0 x))