Plaster

common-lisp
;this is the original text I am searching for which has been edited in the file in github below "\\code ;;;; Combining rationals with floats. ;;; This example assumes an implementation in which ;;; (float-radix 0.5) is 2 (as in IEEE) or 16 (as in IBM/360), ;;; or else some other implementation in which 1/2 has an exact ;;; representation in floating point. (+ 1/2 0.5) *→* 1.0 (- 1/2 0.5d0) *→* 0.0d0 (+ 0.5 -0.5 1/2) *→* 0.5 ;;;; Comparing rationals with floats. ;;; This example assumes an implementation in which the default float ;;; format is IEEE single-float, IEEE double-float, or some other format ;;; in which 5/7 is rounded upwards by FLOAT. (< 5/7 (float 5/7)) *→ true* (< 5/7 (rational (float 5/7))) *→ true* (< (float 5/7) (float 5/7)) *→ false* \\endcode" ;; this is the regex to search for the text above ";;;;[\\n\\s]*Combining[\\n\\s]*rationals[\\n\\s]*with[\\n\\s]*floats\\.[\\n\\s]*[\\n\\s]*;;;[\\n\\s]*This[\\n\\s]*example[\\n\\s]*assumes[\\n\\s]*an[\\n\\s]*implementation[\\n\\s]*in[\\n\\s]*which[\\n\\s]*[\\n\\s]*[\\n\\s]*;;;[\\n\\s]*\\(float-radix[\\n\\s]*0\\.5\\)[\\n\\s]*is[\\n\\s]*2[\\n\\s]*\\(as[\\n\\s]*in[\\n\\s]*IEEE\\)[\\n\\s]*or[\\n\\s]*16[\\n\\s]*\\(as[\\n\\s]*in[\\n\\s]*IBM/360\\),[\\n\\s]*[\\n\\s]*;;;[\\n\\s]*or[\\n\\s]*else[\\n\\s]*some[\\n\\s]*other[\\n\\s]*implementation[\\n\\s]*in[\\n\\s]*which[\\n\\s]*1/2[\\n\\s]*has[\\n\\s]*an[\\n\\s]*exact[\\n\\s]*[\\n\\s]*[\\n\\s]*;;;[\\n\\s]*[\\n\\s]*representation[\\n\\s]*in[\\n\\s]*floating[\\n\\s]*point\\.[\\n\\s]*[\\n\\s]*\\(\\+[\\n\\s]*1/2[\\n\\s]*0\\.5\\)[\\n\\s]*\\*\\→\\*[\\n\\s]*1\\.0[\\n\\s]*[\\n\\s]*\\(-[\\n\\s]*1/2[\\n\\s]*0\\.5d0\\)[\\n\\s]*\\*\\→\\*[\\n\\s]*0\\.0d0[\\n\\s]*[\\n\\s]*\\(\\+[\\n\\s]*0\\.5[\\n\\s]*-0\\.5[\\n\\s]*1/2\\)[\\n\\s]*\\*\\→\\*[\\n\\s]*0\\.5[\\n\\s]*[\\n\\s]*[\\n\\s]*;;;;[\\n\\s]*Comparing[\\n\\s]*rationals[\\n\\s]*with[\\n\\s]*floats\\.[\\n\\s]*[\\n\\s]*;;;[\\n\\s]*This[\\n\\s]*example[\\n\\s]*assumes[\\n\\s]*an[\\n\\s]*implementation[\\n\\s]*in[\\n\\s]*which[\\n\\s]*the[\\n\\s]*default[\\n\\s]*float[\\n\\s]*[\\n\\s]*[\\n\\s]*;;;[\\n\\s]*format[\\n\\s]*is[\\n\\s]*IEEE[\\n\\s]*single-float,[\\n\\s]*IEEE[\\n\\s]*double-float,[\\n\\s]*or[\\n\\s]*some[\\n\\s]*other[\\n\\s]*format[\\n\\s]*[\\n\\s]*;;;[\\n\\s]*in[\\n\\s]*which[\\n\\s]*5/7[\\n\\s]*is[\\n\\s]*rounded[\\n\\s]*upwards[\\n\\s]*by[\\n\\s]*FLOAT\\.[\\n\\s]*[\\n\\s]*\\(<[\\n\\s]*5/7[\\n\\s]*\\(float[\\n\\s]*5/7\\)\\)[\\n\\s]*\\*\\→[\\n\\s]*true\\*[\\n\\s]*[\\n\\s]*\\(<[\\n\\s]*5/7[\\n\\s]*\\(rational[\\n\\s]*\\(float[\\n\\s]*5/7\\)\\)\\)[\\n\\s]*\\*\\→[\\n\\s]*true\\*[\\n\\s]*[\\n\\s]*\\(<[\\n\\s]*\\(float[\\n\\s]*5/7\\)[\\n\\s]*\\(float[\\n\\s]*5/7\\)\\)[\\n\\s]*\\*\\→[\\n\\s]*false\\*" ; this is the file https://github.com/lisp-docs/process-dpans3r/blob/master/md-files/chap-12.md?plain=1 ; see line 201