Interval arithmetic by Robert Elton Maas: Demonstration of my newly-written general utilities for interval arithmetic with rational endpoints: * (ratio-make-smaller+simpler 160025413/50937671) (float * 1d0) 120748342/38435391 * 3.1415926534999996d0 * (ratio-make-smaller+simpler **) (float * 1d0) 81471271/25933111 * 3.1415926534999987d0 * (ratio-make-smaller+simpler **) (float * 1d0) 42194200/13430831 * 3.1415926534999956d0 * (ratio-make-smaller+simpler **) (float * 1d0) 2917129/928551 * 3.1415926534999157d0 * (ratio-make-smaller+simpler **) (float * 1d0) 1562735/497434 * 3.1415926534977503d0 * (ratio-make-smaller+simpler **) (float * 1d0) 208341/66317 * 3.1415926534674368d0 * (ratio-make-smaller+simpler **) (float * 1d0) 103993/33102 * 3.1415926530119025d0 * (ratio-make-larger+simpler 160025413/50937671) (float * 1d0) 39277071/12502280 * 3.1415926535000014d0 * (ratio-make-larger+simpler **) (float * 1d0) 36359942/11573729 * 3.1415926535000085d0 * (ratio-make-larger+simpler **) (float * 1d0) 33442813/10645178 * 3.1415926535000165d0 * (ratio-make-larger+simpler **) (float * 1d0) 30525684/9716627 * 3.1415926535000263d0 * (ratio-make-larger+simpler **) (float * 1d0) 27608555/8788076 * 3.141592653500038d0 * (ratio-make-larger+simpler **) (float * 1d0) 24691426/7859525 * 3.1415926535000525d0 * (setq rat 160025413/50937671) 160025413/50937671 * (setq rats (ratio-to-simpler-interval rat)) (120748342/38435391 39277071/12502280) * (< (car rats) rat (cadr rats)) T ;rats left over from above: * (loop for rat in rats collect (float rat 1d0)) (3.1415926534999996d0 3.1415926535000014d0) * (setq rats (ratio-interval-make-wider+simpler rats)) (81471271/25933111 39277071/12502280) * (loop for rat in rats collect (float rat 1d0)) (3.1415926534999987d0 3.1415926535000014d0) * (setq rats (ratio-interval-make-wider+simpler rats)) (42194200/13430831 39277071/12502280) * (loop for rat in rats collect (float rat 1d0)) (3.1415926534999956d0 3.1415926535000014d0) ;rats left over from above: * (ratio-interval-simplify-expand-to-threshold rats 50000000) (2917129/928551 36359942/11573729) * (loop for rat in * collect (float rat 1d0)) (3.1415926534999157d0 3.1415926535000085d0) * (ratio-interval-simplify-expand-to-threshold rats 1000000) (208341/66317 729371/232166) * (loop for rat in * collect (float rat 1d0)) (3.1415926534674368d0 3.141592653532386d0) * (ratio-interval-simplify-expand-to-threshold rats 100000) (75593/24062 355/113) * (loop for rat in * collect (float rat 1d0)) (3.141592552572521d0 3.1415929203539825d0) * (ratio-interval-simplify-expand-to-threshold rats 10000) (7433/2366 355/113) * (loop for rat in * collect (float rat 1d0)) (3.1415891800507185d0 3.1415929203539825d0) * (ratio-interval-simplify-expand-to-threshold rats 1000) (688/219 355/113) * (loop for rat in * collect (float rat 1d0)) (3.141552511415525d0 3.1415929203539825d0) * (ratio-interval-simplify-expand-to-threshold rats 100) (69/22 22/7) * (loop for rat in * collect (float rat 1d0)) (3.1363636363636362d0 3.142857142857143d0) * (ratio-interval-simplify-expand-to-threshold rats 50) (25/8 22/7) * (loop for rat in * collect (float rat 1d0)) (3.125d0 3.142857142857143d0) * (ratio-interval-simplify-expand-to-threshold rats 30) (3 22/7) * (loop for rat in * collect (float rat 1d0)) (3.0d0 3.142857142857143d0) * (intervals-divide '(3/4 4/5) '(1 11/10)) (15/22 4/5) (ratio-interval-to-simplest-ratio-within (list (rational 3.14) (rational 3.15))) 22/7 * (ratio-interval-format-f (list (rational 1.234275) (rational 1.234657))) "1.234[2..7]" * (ratio-interval-format-f (list (rational 1.234567) (rational 1.234657))) "1.2345[6..G]" * (ratio-interval-format-f '(15/22 4/5)) "0.6[8..K]" * (ratio-interval-format-f '(208341/66317 729371/232166)) "3.1415926534[6..E]" * (ratio-interval-format-f '(75593/24062 355/113)) "3.141592[5..A]" * (setq oldint (list 0 1)) (0 1) * (setq newint (list (rational 0.37) (rational 0.48))) (3103785/8388608 16106127/33554432) * (show-interval-refinement oldint newint) [-------------------------!!!!!!!!!------------------------------------] (3103785/8388608 16106127/33554432) * (setq oldint (list 75593/24062 355/113)) (75593/24062 355/113) * (setq newint (list 208341/66317 729371/232166)) (208341/66317 729371/232166) * (show-interval-refinement oldint newint) [-------------------!--------------------------------------------------] (208341/66317 729371/232166) * (setq oldint (list 1/2 3/2)) (1/2 3/2) * (setq newint (list 2/3 2)) (2/3 2) * (show-interval-refinement oldint newint) ** WARNING: New interval not included within old interval, ** so I'll have to intersect the two to get a valid interval refinement. [-----------!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!] (2/3 3/2) Would you like me to set up this software as a Web-server-side application so that you-all can play with it? Urgent note: I'm in desperate financial circumstances. I desperately need a source of income to avoid becoming homeless. Please refer me to somebody who has money to hire me for writing software.