Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

convert a fraction to a floating point number

$
0
0
ive been looking around a bit, and this is like my second day with lisp, so a lot of the solutions im finding are way over my head and seem to be solving bigger issues that what I present.

I have the following code that I came up with, it simply converts Fahrenheit to Celsius. The problem is, ill get a fraction, when I need to return a floating point number rounded to the nearest degree
(defun convert (x) 
  (*(- x 32)(/ 5 9)) )

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>