I have come across a function when translating some Fortran into a scheme / racket:
; Epsilon (X) is the least positive number added; Returns a number greater than 1 How can I find numbers in the plan?
#long racket / base ;; Http://en.wikipedia.org/wiki/Machine_epsilon ;; Defines the machine epistoline (requires racket / flomen) (define - machine-apicillon) (loop ([n 1.0]) (define the next n (fl / n 2.0)) (if (fl = 1.0 (Fl + 1.0 next-n)) n (loop next-n)))
Comments
Post a Comment