diff --git a/docs/matrix.scrbl b/docs/matrix.scrbl index 70bd61e25..f3e01b8aa 100644 --- a/docs/matrix.scrbl +++ b/docs/matrix.scrbl @@ -320,5 +320,4 @@ Multiply a matrix on a column-vector. @section[#:tag "matrix comprehensions"]{Comprehensions} @section{Binary Operators} - - \ No newline at end of file + \ No newline at end of file diff --git a/graphics/graphics.rkt b/graphics/graphics.rkt index 3300bfac9..3ba38fa07 100644 --- a/graphics/graphics.rkt +++ b/graphics/graphics.rkt @@ -1,7 +1,7 @@ #reader(lib"read.ss""wxme")WXME0108 ## #| This file uses the GRacket editor format. - Open this file in DrRacket version 5.3.0.6 or later to read it. + Open this file in DrRacket version 5.3.0.11 or later to read it. Most likely, it was created by saving a program in DrRacket, and it probably contains a program with non-text elements @@ -28,19 +28,19 @@ ( #"((lib \"image-core.ss\" \"mrlib\") (lib \"image-core-wxme.rkt\" \"mr" #"lib\"))\0" -) 1 0 33 #"(lib \"bullet-snip.ss\" \"browser\")\0" -0 0 88 +) 1 0 29 #"drscheme:bindings-snipclass%\0" +1 0 88 ( #"((lib \"pict-snip.rkt\" \"drracket\" \"private\") (lib \"pict-snip.r" #"kt\" \"drracket\" \"private\"))\0" -) 0 0 29 #"drscheme:bindings-snipclass%\0" -1 0 25 #"(lib \"matrix.ss\" \"htdp\")\0" +) 0 0 33 #"(lib \"bullet-snip.ss\" \"browser\")\0" +0 0 25 #"(lib \"matrix.ss\" \"htdp\")\0" 1 0 22 #"drscheme:lambda-snip%\0" 1 0 57 #"(lib \"hrule-snip.rkt\" \"macro-debugger\" \"syntax-browser\")\0" -1 0 45 #"(lib \"image-snipr.ss\" \"slideshow\" \"private\")\0" 1 0 26 #"drscheme:pict-value-snip%\0" -0 0 38 #"(lib \"pict-snipclass.ss\" \"slideshow\")\0" +0 0 45 #"(lib \"image-snipr.ss\" \"slideshow\" \"private\")\0" +1 0 38 #"(lib \"pict-snipclass.ss\" \"slideshow\")\0" 2 0 55 #"(lib \"vertical-separator-snip.ss\" \"stepper\" \"private\")\0" 1 0 18 #"drscheme:xml-snip\0" 1 0 31 #"(lib \"xml-snipclass.ss\" \"xml\")\0" @@ -50,7 +50,7 @@ 1 0 32 #"(lib \"text-snipclass.ss\" \"xml\")\0" 1 0 15 #"test-case-box%\0" 2 0 1 6 #"wxloc\0" - 0 0 61 0 1 #"\0" + 0 0 63 0 1 #"\0" 0 75 1 #"\0" 0 12 90 -1 90 -1 3 -1 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 255 255 255 1 -1 0 9 #"Standard\0" @@ -196,41 +196,47 @@ 1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 176 48 96 0 0 0 -1 -1 2 38 #"plt:module-language:test-coverage-off\0" 0 -1 1 #"\0" -1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 176 48 96 0 0 0 -1 -1 0 1 +1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 176 48 96 0 0 0 -1 -1 4 1 #"\0" -0 75 12 #"Courier New\0" -0.0 16 90 -1 90 -1 3 -1 0 1 0 1 0 0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 0 255 -255 255 1 -1 4 1 #"\0" 0 71 1 #"\0" 1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 1.0 1.0 1.0 1.0 1.0 1.0 0 0 0 0 0 0 -1 -1 4 1 #"\0" 0 -1 1 #"\0" -1.0 0 -1 -1 -1 -1 -1 -1 1 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 0 0 255 0 0 -0 -1 -1 4 1 #"\0" +1.0 0 -1 -1 -1 -1 -1 -1 1 0 0 0 0 0 0 0 0 1.0 1.0 1.0 0 0 255 0 0 0 -1 +-1 4 1 #"\0" 0 71 1 #"\0" -1.0 0 -1 -1 -1 -1 -1 -1 1 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 0 0 255 0 0 -0 -1 -1 4 1 #"\0" +1.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3 -1 0 1 0 1 0 0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 0 255 +255 255 1 -1 47 1 #"\0" 0 -1 1 #"\0" 1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 1 0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 0 255 255 255 -1 -1 49 1 #"\0" 0 -1 1 #"\0" 1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 1 0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 0 255 -255 255 -1 -1 0 4369 0 26 3 12 #"#lang racket" +255 255 -1 -1 2 1 #"\0" +0 71 1 #"\0" +1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 1.0 1.0 1.0 1.0 1.0 1.0 0 0 0 0 0 0 +-1 -1 2 1 #"\0" +0 71 1 #"\0" +1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1.0 1.0 1.0 0 100 0 0 0 0 -1 +-1 0 4352 0 26 3 12 #"#lang racket" 0 0 22 29 1 #"\n" 0 0 22 3 1 #"(" 0 0 14 3 7 #"require" @@ -267,6 +273,9 @@ 0 0 22 29 1 #"\n" 0 0 22 3 9 #" " 0 0 14 3 13 #"current-frame" +0 0 22 29 1 #"\n" +0 0 22 3 9 #" " +0 0 14 3 10 #"find-color" 0 0 22 3 1 #")" 0 0 22 29 1 #"\n" 0 0 22 29 1 #"\n" @@ -2353,8 +2362,7 @@ 0 0 14 3 1 #"r" 0 0 22 3 3 #")) " 0 0 17 3 10 #"; relative" -0 0 17 3 1 #" " -0 0 17 3 23 #"to hor. range " +0 0 17 3 24 #" to hor. range " 0 0 22 29 1 #"\n" 0 0 22 3 13 #" (" 0 0 15 3 12 #"parameterize" @@ -2387,8 +2395,7 @@ 0 0 14 3 1 #"r" 0 0 22 3 3 #")) " 0 0 17 3 10 #"; relative" -0 0 17 3 1 #" " -0 0 17 3 23 #"to hor. range " +0 0 17 3 24 #" to hor. range " 0 0 22 29 1 #"\n" 0 0 22 3 15 #" (" 0 0 15 3 12 #"parameterize" @@ -3212,8 +3219,7 @@ 0 0 22 3 1 #" " 0 0 19 3 1 #"\"" 0 0 19 3 7 #"Unknown" -0 0 19 3 1 #" " -0 0 19 3 8 #"spec ~a\"" +0 0 19 3 9 #" spec ~a\"" 0 0 22 3 2 #" (" 0 0 14 3 5 #"first" 0 0 22 3 1 #" " @@ -3237,8 +3243,7 @@ 0 0 19 3 1 #"\"" 0 0 19 3 8 #"Internal" 0 0 19 3 1 #" " -0 0 19 3 6 #"error:" -0 0 19 3 5 #" ~a \"" +0 0 19 3 11 #"error: ~a \"" 0 0 22 3 1 #" " 0 0 14 3 1 #"p" 0 0 22 3 7 #")])])))" @@ -3387,8 +3392,7 @@ 0 0 22 3 2 #"))" 0 0 22 29 1 #"\n" 0 0 22 3 5 #" " -0 0 17 3 16 #"; (Style (Text \"" -0 0 17 3 13 #"Hello\") 'Red)" +0 0 17 3 29 #"; (Style (Text \"Hello\") 'Red)" 0 0 22 29 1 #"\n" 0 0 22 3 5 #" " 0 0 14 3 4 #"Blue" @@ -3419,8 +3423,7 @@ 0 0 22 3 2 #" (" 0 0 14 3 4 #"Text" 0 0 22 3 1 #" " -0 0 19 3 1 #"\"" -0 0 19 3 6 #"World\"" +0 0 19 3 7 #"\"World\"" 0 0 22 3 2 #" (" 0 0 20 3 3 #"300" 0 0 22 3 1 #" " @@ -4017,8 +4020,7 @@ 0 0 17 3 1 #"," 0 0 17 3 1 #"(" 0 0 17 3 1 #"/" -0 0 17 3 1 #" " -0 0 17 3 12 #"x (* 2 pi)))" +0 0 17 3 13 #" x (* 2 pi)))" 0 0 22 29 1 #"\n" 0 0 22 3 2 #" " 0 0 17 3 1 #";" @@ -4032,12 +4034,10 @@ 0 0 17 3 1 #"1" 0 0 17 3 2 #" (" 0 0 17 3 1 #"/" -0 0 17 3 1 #" " -0 0 17 3 13 #"x (* 2 pi))))" +0 0 17 3 14 #" x (* 2 pi))))" 0 0 22 29 1 #"\n" 0 0 22 3 2 #" " -0 0 17 3 1 #";" -0 0 17 3 49 #" (Rotate (Rectangle) ,x)))" +0 0 17 3 50 #"; (Rotate (Rectangle) ,x)))" 0 0 22 29 1 #"\n" 0 0 22 3 2 #" " 0 0 17 3 1 #";" @@ -4048,8 +4048,7 @@ 0 0 17 3 2 #" (" 0 0 17 3 1 #"*" 0 0 17 3 1 #" " -0 0 17 3 1 #"4" -0 0 17 3 18 #" pi) (* 2/24 pi)))" +0 0 17 3 19 #"4 pi) (* 2/24 pi)))" 0 0 22 29 1 #"\n" 0 0 22 3 2 #" " 0 0 17 3 1 #";" @@ -4057,8 +4056,7 @@ 0 0 17 3 1 #"'" 0 0 17 3 2 #"((" 0 0 17 3 5 #"Range" -0 0 17 3 3 #" ((" -0 0 17 3 16 #"-2 2) (-2 2)))))" +0 0 17 3 19 #" ((-2 2) (-2 2)))))" 0 0 22 29 1 #"\n" 0 0 22 3 2 #" " 0 0 17 3 1 #";" @@ -4268,8 +4266,7 @@ 0 0 17 3 1 #"," 0 0 17 3 1 #" " 0 0 17 3 3 #"1.0" -0 0 17 3 2 #"]>" -0 0 17 3 28 #"; given: -0.0416666666666663" +0 0 17 3 30 #"]>; given: -0.0416666666666663" 0 0 22 29 1 #"\n" 0 0 22 3 2 #" " 0 0 22 29 1 #"\n" @@ -4390,8 +4387,7 @@ 0 0 17 3 2 #" {" 0 0 17 3 1 #"x" 0 0 17 3 2 #", " -0 0 17 3 1 #"0" -0 0 17 3 7 #", 10}]]" +0 0 17 3 8 #"0, 10}]]" 0 0 22 29 1 #"\n" 0 0 22 3 2 #" " 0 0 17 3 2 #"; " @@ -5091,8 +5087,7 @@ 0 0 22 29 1 #"\n" 0 0 22 3 2 #" " 0 0 17 3 1 #";" -0 0 17 3 8 #"Graphics" -0 0 17 3 7 #"[Table[" +0 0 17 3 15 #"Graphics[Table[" 0 0 22 29 1 #"\n" 0 0 22 3 2 #" " 0 0 17 3 1 #";" @@ -5105,8 +5100,7 @@ 0 0 17 3 1 #"," 0 0 17 3 1 #" " 0 0 17 3 3 #"0.5" -0 0 17 3 3 #"]}]" -0 0 17 3 22 #", ; black, opacity 50%" +0 0 17 3 25 #"]}], ; black, opacity 50%" 0 0 22 29 1 #"\n" 0 0 22 3 2 #" " 0 0 17 3 1 #";" @@ -5124,8 +5118,7 @@ 0 0 17 3 1 #"1" 0 0 17 3 1 #"," 0 0 17 3 1 #" " -0 0 17 3 3 #"0.6" -0 0 17 3 3 #"], " +0 0 17 3 6 #"0.6], " 0 0 22 29 1 #"\n" 0 0 22 3 2 #" " 0 0 17 3 1 #";" @@ -5151,8 +5144,7 @@ 0 0 17 3 2 #" (" 0 0 17 3 3 #"8-r" 0 0 17 3 1 #")" -0 0 17 3 2 #"/3" -0 0 17 3 4 #"]}, " +0 0 17 3 6 #"/3]}, " 0 0 22 29 1 #"\n" 0 0 22 3 2 #" " 0 0 17 3 1 #";" @@ -5163,8 +5155,7 @@ ) 0 0 17 3 1 #"r" 0 0 17 3 1 #"," 0 0 17 3 1 #" " -0 0 17 3 1 #"6" -0 0 17 3 3 #"}, " +0 0 17 3 4 #"6}, " 0 0 22 29 1 #"\n" 0 0 22 3 2 #" " 0 0 17 3 1 #";" @@ -5173,8 +5164,7 @@ #" " #" {" ) 0 0 17 3 1 #"q" -0 0 17 3 1 #"," -0 0 17 3 6 #" 12}]]" +0 0 17 3 7 #", 12}]]" 0 0 22 29 1 #"\n" 0 0 22 3 2 #" " 0 0 22 29 1 #"\n" @@ -5454,7 +5444,6 @@ 0 0 17 3 1 #"0" 0 0 17 3 1 #" " 0 0 17 3 1 #"0" -0 0 17 3 2 #") " -0 0 17 3 4 #"5)))" +0 0 17 3 6 #") 5)))" 0 0 22 29 1 #"\n" 0 0 diff --git a/gui/racket-cas.rkt b/gui/racket-cas.rkt index e7c8f681c..39d35357b 100644 --- a/gui/racket-cas.rkt +++ b/gui/racket-cas.rkt @@ -63,6 +63,8 @@ ;; Behaviour when dragging parabolas and lines. ;; http://www.geogebra.org/forum/viewtopic.php?f=22&t=27113 +;; Write API for MathType. +;; Support copy-paste with MathML ? (require racket/gui framework (except-in plot plot points) diff --git a/infix/main.rkt b/infix/main.rkt index 33513d6d4..95b35a039 100644 --- a/infix/main.rkt +++ b/infix/main.rkt @@ -1,4 +1,5 @@ #lang at-exp scheme +;; This is not in the use for the moment. (provide $ $quote $quote-syntax #%infix) (require "parameter.ss" diff --git a/math-scribble/math-scribble.rkt b/math-scribble/math-scribble.rkt index 7a537c432..639f60d6a 100644 --- a/math-scribble/math-scribble.rkt +++ b/math-scribble/math-scribble.rkt @@ -1,4 +1,8 @@ #lang racket +;;; +;;; Support for MathJax and Asymptote. +;;; + (require scribble/manual scribble/core scribble/decode diff --git a/matrix/matrix.rkt b/matrix/matrix.rkt index 239c3ae5d..05055514c 100644 --- a/matrix/matrix.rkt +++ b/matrix/matrix.rkt @@ -1,7 +1,7 @@ #reader(lib"read.ss""wxme")WXME0108 ## #| This file uses the GRacket editor format. - Open this file in DrRacket version 5.3.0.6 or later to read it. + Open this file in DrRacket version 5.3.0.11 or later to read it. Most likely, it was created by saving a program in DrRacket, and it probably contains a program with non-text elements @@ -28,19 +28,19 @@ ( #"((lib \"image-core.ss\" \"mrlib\") (lib \"image-core-wxme.rkt\" \"mr" #"lib\"))\0" -) 1 0 33 #"(lib \"bullet-snip.ss\" \"browser\")\0" -0 0 88 +) 1 0 29 #"drscheme:bindings-snipclass%\0" +1 0 88 ( #"((lib \"pict-snip.rkt\" \"drracket\" \"private\") (lib \"pict-snip.r" #"kt\" \"drracket\" \"private\"))\0" -) 0 0 29 #"drscheme:bindings-snipclass%\0" -1 0 25 #"(lib \"matrix.ss\" \"htdp\")\0" +) 0 0 33 #"(lib \"bullet-snip.ss\" \"browser\")\0" +0 0 25 #"(lib \"matrix.ss\" \"htdp\")\0" 1 0 22 #"drscheme:lambda-snip%\0" 1 0 57 #"(lib \"hrule-snip.rkt\" \"macro-debugger\" \"syntax-browser\")\0" -1 0 45 #"(lib \"image-snipr.ss\" \"slideshow\" \"private\")\0" 1 0 26 #"drscheme:pict-value-snip%\0" -0 0 38 #"(lib \"pict-snipclass.ss\" \"slideshow\")\0" +0 0 45 #"(lib \"image-snipr.ss\" \"slideshow\" \"private\")\0" +1 0 38 #"(lib \"pict-snipclass.ss\" \"slideshow\")\0" 2 0 55 #"(lib \"vertical-separator-snip.ss\" \"stepper\" \"private\")\0" 1 0 18 #"drscheme:xml-snip\0" 1 0 31 #"(lib \"xml-snipclass.ss\" \"xml\")\0" @@ -50,7 +50,7 @@ 1 0 32 #"(lib \"text-snipclass.ss\" \"xml\")\0" 1 0 15 #"test-case-box%\0" 2 0 1 6 #"wxloc\0" - 0 0 63 0 1 #"\0" + 0 0 65 0 1 #"\0" 0 75 1 #"\0" 0 12 90 -1 90 -1 3 -1 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 255 255 255 1 -1 0 9 #"Standard\0" @@ -196,52 +196,59 @@ 1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 176 48 96 0 0 0 -1 -1 2 38 #"plt:module-language:test-coverage-off\0" 0 -1 1 #"\0" -1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 176 48 96 0 0 0 -1 -1 0 1 +1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 176 48 96 0 0 0 -1 -1 4 1 +#"\0" +0 71 1 #"\0" +1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 1.0 1.0 1.0 1.0 1.0 1.0 0 0 0 0 0 0 +-1 -1 4 1 #"\0" +0 -1 1 #"\0" +1.0 0 -1 -1 -1 -1 -1 -1 1 0 0 0 0 0 0 0 0 1.0 1.0 1.0 0 0 255 0 0 0 -1 +-1 4 1 #"\0" +0 71 1 #"\0" +1.0 0 -1 -1 -1 -1 -1 -1 1 0 0 0 0 0 0 0 0 1.0 1.0 1.0 0 0 255 0 0 0 -1 +-1 4 1 #"\0" +0 71 1 #"\0" +1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-1 -1 -1 0 0 0 0 0 0 1.0 1.0 1.0 1.0 1.0 1.0 0 0 0 0 0 0 +-1 -1 45 1 #"\0" +0 -1 1 #"\0" +1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 1.0 1.0 1.0 1.0 1.0 1.0 0 0 0 0 0 0 +-1 -1 0 14714 0 26 3 12 #"#lang racket" 0 0 22 29 1 #"\n" 0 0 22 3 1 #"(" 0 0 14 3 7 #"require" 0 0 22 3 1 #" " -0 0 19 3 13 #"\"for-max.rkt\"" +0 0 19 3 10 #"\"../utils/" +0 0 19 3 12 #"for-max.rkt\"" 0 0 22 3 1 #")" 0 0 22 29 1 #"\n" 0 0 22 29 1 #"\n" @@ -331,8 +338,7 @@ 0 0 22 29 1 #"\n" 0 0 17 3 30 #"; 7. More matrix constructors:" 0 0 22 29 1 #"\n" -0 0 17 3 10 #"; - \"" -0 0 17 3 12 #"famous\" ones" +0 0 17 3 22 #"; - \"famous\" ones" 0 0 22 29 1 #"\n" 0 0 17 3 22 #"; - band matrices" 0 0 22 29 1 #"\n" @@ -389,8 +395,7 @@ 0 0 17 3 6 #"; (" 0 0 17 3 7 #"require" 0 0 17 3 10 #" (submod \"" -0 0 17 3 1 #"." -0 0 17 3 8 #"\" test))" +0 0 17 3 9 #".\" test))" 0 0 22 29 1 #"\n" 0 0 17 3 45 #"; in the interaction window to run the tests." 0 0 22 29 1 #"\n" @@ -402,8 +407,7 @@ 0 0 17 3 1 #" " 0 0 17 3 4 #"list" 0 0 17 3 1 #" " -0 0 17 3 2 #"of" -0 0 17 3 19 #" submodules to run." +0 0 17 3 21 #"of submodules to run." 0 0 22 29 1 #"\n" 0 0 22 29 1 #"\n" 0 0 22 3 1 #"(" @@ -1166,8 +1170,7 @@ 0 0 19 3 2 #"do" 0 0 19 3 1 #" " 0 0 19 3 3 #"not" -0 0 19 3 7 #" match." -0 0 19 3 1 #"\"" +0 0 19 3 8 #" match.\"" 0 0 22 29 1 #"\n" 0 0 22 3 16 #" (" 0 0 14 3 1 #"=" @@ -1646,8 +1649,7 @@ 0 0 17 3 17 #"(for/matrix m n (" 0 0 17 3 6 #"clause" 0 0 17 3 1 #" " -0 0 17 3 3 #"..." -0 0 17 3 15 #") . defs+exprs)" +0 0 17 3 18 #"...) . defs+exprs)" 0 0 22 29 1 #"\n" 0 0 17 3 63 #"; Return an m x n matrix with elements from the last expr." @@ -1811,8 +1813,7 @@ 0 0 22 29 1 #"\n" 0 0 17 3 20 #"; (for*/matrix m n (" 0 0 17 3 6 #"clause" -0 0 17 3 1 #" " -0 0 17 3 18 #"...) . defs+exprs)" +0 0 17 3 19 #" ...) . defs+exprs)" 0 0 22 29 1 #"\n" 0 0 17 3 63 #"; Return an m x n matrix with elements from the last expr." @@ -1824,8 +1825,7 @@ 0 0 17 3 40 #"; The bindings in clauses run nested." 0 0 22 29 1 #"\n" 0 0 17 3 29 #"; (for*/matrix m n #:column (" -0 0 17 3 6 #"clause" -0 0 17 3 19 #" ...) . defs+exprs)" +0 0 17 3 25 #"clause ...) . defs+exprs)" 0 0 22 29 1 #"\n" 0 0 17 3 63 #"; Return an m x n matrix with elements from the last expr." @@ -2168,8 +2168,7 @@ 0 0 17 3 1 #"(" 0 0 17 3 6 #"clause" 0 0 17 3 1 #" " -0 0 17 3 3 #"..." -0 0 17 3 15 #") . defs+exprs)" +0 0 17 3 18 #"...) . defs+exprs)" 0 0 22 29 1 #"\n" 0 0 17 3 69 ( @@ -2342,8 +2341,7 @@ 0 0 17 3 19 #"; (for*/matrix-sum " 0 0 17 3 1 #"(" 0 0 17 3 6 #"clause" -0 0 17 3 1 #" " -0 0 17 3 18 #"...) . defs+exprs)" +0 0 17 3 19 #" ...) . defs+exprs)" 0 0 22 29 1 #"\n" 0 0 17 3 69 ( @@ -2470,8 +2468,7 @@ 0 0 17 3 13 #";;; SEQUENCES" 0 0 22 29 1 #"\n" 0 0 22 29 1 #"\n" -0 0 17 3 2 #"; " -0 0 17 3 13 #"(in-matrix M)" +0 0 17 3 15 #"; (in-matrix M)" 0 0 22 29 1 #"\n" 0 0 17 3 50 #"; Returns a sequence that of all elements of M." 0 0 22 29 1 #"\n" @@ -2641,8 +2638,7 @@ 0 0 19 3 1 #"," 0 0 19 3 1 #" " 0 0 19 3 3 #"got" -0 0 19 3 3 #" ~a" -0 0 19 3 1 #"\"" +0 0 19 3 4 #" ~a\"" 0 0 22 3 1 #" " 0 0 14 3 1 #"M" 0 0 22 3 2 #"))" @@ -2670,8 +2666,7 @@ 0 0 19 3 1 #"," 0 0 19 3 1 #" " 0 0 19 3 3 #"got" -0 0 19 3 3 #" ~a" -0 0 19 3 1 #"\"" +0 0 19 3 4 #" ~a\"" 0 0 22 3 1 #" " 0 0 14 3 1 #"r" 0 0 22 3 3 #")))" @@ -2804,8 +2799,7 @@ 0 0 19 3 1 #"," 0 0 19 3 1 #" " 0 0 19 3 3 #"got" -0 0 19 3 3 #" ~a" -0 0 19 3 1 #"\"" +0 0 19 3 4 #" ~a\"" 0 0 22 3 1 #" " 0 0 14 3 1 #"M" 0 0 22 3 2 #"))" @@ -2833,8 +2827,7 @@ 0 0 19 3 1 #"," 0 0 19 3 1 #" " 0 0 19 3 3 #"got" -0 0 19 3 3 #" ~a" -0 0 19 3 1 #"\"" +0 0 19 3 4 #" ~a\"" 0 0 22 3 1 #" " 0 0 14 3 1 #"r" 0 0 22 3 3 #")))" @@ -3043,8 +3036,7 @@ 0 0 19 3 1 #"," 0 0 19 3 1 #" " 0 0 19 3 3 #"got" -0 0 19 3 3 #" ~a" -0 0 19 3 1 #"\"" +0 0 19 3 4 #" ~a\"" 0 0 22 3 1 #" " 0 0 14 3 1 #"M" 0 0 22 3 2 #"))" @@ -3072,8 +3064,7 @@ 0 0 19 3 1 #"," 0 0 19 3 1 #" " 0 0 19 3 3 #"got" -0 0 19 3 3 #" ~a" -0 0 19 3 1 #"\"" +0 0 19 3 4 #" ~a\"" 0 0 22 3 1 #" " 0 0 14 3 1 #"s" 0 0 22 3 3 #")))" @@ -3210,8 +3201,7 @@ 0 0 19 3 1 #"," 0 0 19 3 1 #" " 0 0 19 3 3 #"got" -0 0 19 3 3 #" ~a" -0 0 19 3 1 #"\"" +0 0 19 3 4 #" ~a\"" 0 0 22 3 1 #" " 0 0 14 3 1 #"M" 0 0 22 3 2 #"))" @@ -3239,8 +3229,7 @@ 0 0 19 3 1 #"," 0 0 19 3 1 #" " 0 0 19 3 3 #"got" -0 0 19 3 3 #" ~a" -0 0 19 3 1 #"\"" +0 0 19 3 4 #" ~a\"" 0 0 22 3 1 #" " 0 0 14 3 1 #"s" 0 0 22 3 3 #")))" @@ -3363,8 +3352,7 @@ 0 0 17 3 1 #"M" 0 0 17 3 1 #" " 0 0 17 3 1 #"i" -0 0 17 3 2 #" j" -0 0 17 3 5 #" m n)" +0 0 17 3 7 #" j m n)" 0 0 22 29 1 #"\n" 0 0 17 3 62 #"; Return the submatrix of M with upper left corner in (i,j)" @@ -3598,8 +3586,7 @@ 0 0 17 3 1 #" " 0 0 17 3 4 #"ones" 0 0 17 3 1 #" " -0 0 17 3 2 #"on" -0 0 17 3 34 #" the diagonal and zeros elsewhere." +0 0 17 3 36 #"on the diagonal and zeros elsewhere." 0 0 22 29 1 #"\n" 0 0 22 3 1 #"(" 0 0 15 3 6 #"define" @@ -3721,8 +3708,7 @@ 0 0 22 3 3 #")])" 0 0 22 29 1 #"\n" 0 0 17 3 3 #"; (" -0 0 17 3 14 #"matrix-augment" -0 0 17 3 5 #" M N)" +0 0 17 3 19 #"matrix-augment M N)" 0 0 22 29 1 #"\n" 0 0 17 3 18 #"; Return [M N]." 0 0 22 29 1 #"\n" @@ -4776,8 +4762,7 @@ 0 0 22 29 1 #"\n" 0 0 17 3 2 #"; " 0 0 17 3 1 #"(" -0 0 17 3 10 #"matrix-add" -0 0 17 3 5 #" M N)" +0 0 17 3 15 #"matrix-add M N)" 0 0 22 29 1 #"\n" 0 0 17 3 16 #"; Return M+N." 0 0 22 29 1 #"\n" @@ -4900,8 +4885,7 @@ 0 0 14 3 7 #"matrix?" 0 0 22 3 3 #")])" 0 0 22 29 1 #"\n" -0 0 17 3 2 #"; " -0 0 17 3 16 #"(matrix-sub M N)" +0 0 17 3 18 #"; (matrix-sub M N)" 0 0 22 29 1 #"\n" 0 0 17 3 16 #"; Return M-N." 0 0 22 29 1 #"\n" @@ -5391,8 +5375,7 @@ 0 0 17 3 1 #"(" 0 0 17 3 17 #"matrix-swap-rows!" 0 0 17 3 1 #" " -0 0 17 3 1 #"M" -0 0 17 3 5 #" r s)" +0 0 17 3 6 #"M r s)" 0 0 22 29 1 #"\n" 0 0 17 3 32 #"; Swap the rows r and s in M." 0 0 22 29 1 #"\n" @@ -5552,8 +5535,7 @@ 0 0 17 3 1 #"(" 0 0 17 3 17 #"matrix-scale-row!" 0 0 17 3 1 #" " -0 0 17 3 1 #"M" -0 0 17 3 5 #" r a)" +0 0 17 3 6 #"M r a)" 0 0 22 29 1 #"\n" 0 0 17 3 43 #"; Multiply all elements in row r with a." 0 0 22 29 1 #"\n" @@ -5702,8 +5684,7 @@ 0 0 17 3 1 #" " 0 0 17 3 1 #"M" 0 0 17 3 1 #" " -0 0 17 3 1 #"r" -0 0 17 3 5 #" a s)" +0 0 17 3 6 #"r a s)" 0 0 22 29 1 #"\n" 0 0 17 3 34 #"; row t becomes row_r + a*row_s" 0 0 22 29 1 #"\n" @@ -5939,8 +5920,7 @@ 0 0 22 3 3 #")])" 0 0 22 29 1 #"\n" 0 0 17 3 2 #"; " -0 0 17 3 1 #"(" -0 0 17 3 16 #"row-vector . xs)" +0 0 17 3 17 #"(row-vector . xs)" 0 0 22 29 1 #"\n" 0 0 17 3 59 #"; Return row vector (1xn matrix) with elements from xs." @@ -6321,8 +6301,7 @@ 0 0 17 3 3 #"; (" 0 0 17 3 23 #"matrix-gauss-eliminate!" 0 0 17 3 1 #" " -0 0 17 3 1 #"M" -0 0 17 3 25 #" [unitize-pivot-row? #f])" +0 0 17 3 26 #"M [unitize-pivot-row? #f])" 0 0 22 29 1 #"\n" 0 0 17 3 38 #"; Transform M to row echelon form." 0 0 22 29 1 #"\n" @@ -7185,8 +7164,7 @@ 0 0 14 3 7 #"matrix?" 0 0 22 3 3 #")])" 0 0 22 29 1 #"\n" -0 0 17 3 20 #"; (row-echelon-form " -0 0 17 3 26 #"M [unitize-pivot-row? #f])" +0 0 17 3 46 #"; (row-echelon-form M [unitize-pivot-row? #f])" 0 0 22 29 1 #"\n" 0 0 17 3 39 #"; Return the row-echelon form of M." 0 0 22 29 1 #"\n" @@ -8678,8 +8656,7 @@ 0 0 19 3 6 #"matrix" 0 0 19 3 1 #" " 0 0 19 3 3 #"not" -0 0 19 3 7 #" square" -0 0 19 3 1 #"\"" +0 0 19 3 8 #" square\"" 0 0 22 3 2 #"))" 0 0 22 29 1 #"\n" 0 0 22 3 3 #" (" @@ -8792,8 +8769,7 @@ 0 0 22 3 2 #"))" 0 0 22 29 1 #"\n" 0 0 22 29 1 #"\n" -0 0 17 3 2 #"; " -0 0 17 3 18 #"(matrix-solve M b)" +0 0 17 3 20 #"; (matrix-solve M b)" 0 0 22 29 1 #"\n" 0 0 17 3 47 #"; Return a column-vector x such that Mx = b." 0 0 22 29 1 #"\n" @@ -8870,8 +8846,7 @@ 0 0 19 3 1 #" " 0 0 19 3 4 #"got:" 0 0 19 3 1 #" " -0 0 19 3 3 #"~a " -0 0 19 3 1 #"\"" +0 0 19 3 4 #"~a \"" 0 0 22 3 1 #" " 0 0 14 3 1 #"b" 0 0 22 3 2 #"))" @@ -8910,8 +8885,7 @@ 0 0 19 3 2 #"as" 0 0 19 3 1 #" " 0 0 19 3 3 #"the" -0 0 19 3 7 #" matrix" -0 0 19 3 1 #"\"" +0 0 19 3 8 #" matrix\"" 0 0 22 3 2 #"))" 0 0 22 29 1 #"\n" 0 0 22 3 3 #" (" @@ -9078,8 +9052,7 @@ 0 0 19 3 1 #" " 0 0 19 3 4 #"got:" 0 0 19 3 1 #" " -0 0 19 3 3 #"~a " -0 0 19 3 1 #"\"" +0 0 19 3 4 #"~a \"" 0 0 22 3 2 #" (" 0 0 14 3 5 #"first" 0 0 22 3 1 #" " @@ -9120,8 +9093,7 @@ 0 0 19 3 2 #"as" 0 0 19 3 1 #" " 0 0 19 3 3 #"the" -0 0 19 3 7 #" matrix" -0 0 19 3 1 #"\"" +0 0 19 3 8 #" matrix\"" 0 0 22 3 2 #"))" 0 0 22 29 1 #"\n" 0 0 22 3 3 #" (" @@ -9757,8 +9729,7 @@ 0 0 22 3 1 #")" 0 0 22 29 1 #"\n" 0 0 22 3 3 #" (" -0 0 15 3 2 #"de" -0 0 15 3 1 #"f" +0 0 15 3 3 #"def" 0 0 22 3 1 #" " 0 0 14 3 1 #"v" 0 0 22 3 2 #" (" @@ -10439,8 +10410,7 @@ 0 0 19 3 1 #"," 0 0 19 3 1 #" " 0 0 19 3 4 #"got:" -0 0 19 3 1 #" " -0 0 19 3 3 #"~a\"" +0 0 19 3 4 #" ~a\"" 0 0 22 3 1 #" " 0 0 14 3 2 #"gv" 0 0 22 3 4 #")]))" @@ -10949,8 +10919,7 @@ 0 0 14 3 7 #"number?" 0 0 22 3 3 #")])" 0 0 22 29 1 #"\n" -0 0 17 3 2 #"; " -0 0 17 3 15 #"(vector-norm v)" +0 0 17 3 17 #"; (vector-norm v)" 0 0 22 29 1 #"\n" 0 0 17 3 46 #"; Return the norm of the genereal vector v." 0 0 22 29 1 #"\n" @@ -11030,8 +10999,7 @@ 0 0 22 3 3 #")])" 0 0 22 29 1 #"\n" 0 0 17 3 3 #"; (" -0 0 17 3 12 #"vector-angle" -0 0 17 3 5 #" v w)" +0 0 17 3 17 #"vector-angle v w)" 0 0 22 29 1 #"\n" 0 0 17 3 47 #"; Return the unsigned angle between v and w." 0 0 22 29 1 #"\n" @@ -11158,8 +11126,7 @@ 0 0 14 3 16 #"general-vector/c" 0 0 22 3 3 #")])" 0 0 22 29 1 #"\n" -0 0 17 3 15 #"; (vector-scale" -0 0 17 3 5 #" s v)" +0 0 17 3 20 #"; (vector-scale s v)" 0 0 22 29 1 #"\n" 0 0 17 3 38 #"; Multiply s on all elements of v." 0 0 22 29 1 #"\n" @@ -11609,8 +11576,7 @@ 0 0 22 3 3 #")])" 0 0 22 29 1 #"\n" 0 0 17 3 3 #"; (" -0 0 17 3 30 #"projection-on-orthogonal-basis" -0 0 17 3 6 #" v bs)" +0 0 17 3 36 #"projection-on-orthogonal-basis v bs)" 0 0 22 29 1 #"\n" 0 0 17 3 64 #"; Project the basis v on the orthogonal basis vectors in bs." @@ -11835,8 +11801,7 @@ 0 0 14 3 15 #"column-vector/c" 0 0 22 3 3 #")])" 0 0 22 29 1 #"\n" -0 0 17 3 3 #"; (" -0 0 17 3 37 #"projection-on-orthonormal-basis v bs)" +0 0 17 3 40 #"; (projection-on-orthonormal-basis v bs)" 0 0 22 29 1 #"\n" 0 0 17 3 65 #"; Project the basis v on the orthonormal basis vectors in bs." @@ -12150,8 +12115,7 @@ 0 0 22 29 1 #"\n" 0 0 17 3 8 #"; an" 0 0 17 3 1 #" " -0 0 17 3 10 #"orthogonal" -0 0 17 3 26 #" basis for the span of the" +0 0 17 3 36 #"orthogonal basis for the span of the" 0 0 22 29 1 #"\n" 0 0 17 3 20 #"; vectors in ws." 0 0 22 29 1 #"\n" @@ -12420,8 +12384,7 @@ 0 0 22 3 3 #")])" 0 0 22 29 1 #"\n" 0 0 17 3 3 #"; (" -0 0 17 3 22 #"projection-on-subspace" -0 0 17 3 6 #" v ws)" +0 0 17 3 28 #"projection-on-subspace v ws)" 0 0 22 29 1 #"\n" 0 0 17 3 57 #"; Returns the projection of v on span{w_i}, w_i in ws." 0 0 22 29 1 #"\n" @@ -14370,8 +14333,7 @@ 0 0 22 3 16 #" (" 0 0 14 3 6 #"format" 0 0 22 3 1 #" " -0 0 19 3 3 #"\"~a" -0 0 19 3 1 #"\"" +0 0 19 3 4 #"\"~a\"" 0 0 22 3 2 #" (" 0 0 14 3 1 #"f" 0 0 22 3 1 #" " @@ -14462,8 +14424,7 @@ 0 0 22 29 1 #"\n" 0 0 22 29 1 #"\n" 0 0 17 3 3 #"; (" -0 0 17 3 6 #"define" -0 0 17 3 37 #" b (column-vector 6.5 8.5 11.0 12.5))" +0 0 17 3 43 #"define b (column-vector 6.5 8.5 11.0 12.5))" 0 0 22 29 1 #"\n" 0 0 17 3 3 #"; (" 0 0 17 3 6 #"define" @@ -14478,8 +14439,7 @@ 0 0 17 3 1 #"1" 0 0 17 3 1 #" " 0 0 17 3 1 #"1" -0 0 17 3 1 #" " -0 0 17 3 28 #"1) (column-vector 2 4 5 6)))" +0 0 17 3 29 #" 1) (column-vector 2 4 5 6)))" 0 0 22 29 1 #"\n" 0 0 17 3 30 #"; (projection-on-subspace b A)" 0 0 22 29 1 #"\n" @@ -14618,11 +14578,9 @@ #"; At that moment, the non-existance of a solution is known." 0 0 22 29 1 #"\n" 0 0 17 3 1 #";" -0 0 17 3 1 #">" -0 0 17 3 39 #" (vector-in-span? (column-vector 7 6 1)" +0 0 17 3 40 #"> (vector-in-span? (column-vector 7 6 1)" 0 0 22 29 1 #"\n" -0 0 17 3 1 #";" -0 0 17 3 46 #" (list (column-vector 1 2 3)" +0 0 17 3 47 #"; (list (column-vector 1 2 3)" 0 0 22 29 1 #"\n" 0 0 17 3 49 #"; (column-vector -2 -5 2)" 0 0 22 29 1 #"\n" @@ -14656,22 +14614,19 @@ 0 0 17 3 2 #" (" 0 0 17 3 13 #"column-vector" 0 0 17 3 1 #" " -0 0 17 3 1 #"1" -0 0 17 3 5 #" 2 3)" +0 0 17 3 6 #"1 2 3)" 0 0 22 29 1 #"\n" 0 0 17 3 1 #";" 0 0 17 3 38 #" (" 0 0 17 3 13 #"column-vector" 0 0 17 3 1 #" " -0 0 17 3 2 #"-2" -0 0 17 3 6 #" -5 2)" +0 0 17 3 8 #"-2 -5 2)" 0 0 22 29 1 #"\n" 0 0 17 3 1 #";" 0 0 17 3 38 #" (" 0 0 17 3 13 #"column-vector" 0 0 17 3 1 #" " -0 0 17 3 1 #"1" -0 0 17 3 8 #" 2 -2)))" +0 0 17 3 9 #"1 2 -2)))" 0 0 22 29 1 #"\n" 0 0 17 3 1 #";" 0 0 17 3 15 #" (" @@ -14700,14 +14655,12 @@ 0 0 17 3 1 #" " 0 0 17 3 1 #"'" 0 0 17 3 2 #"#(" -0 0 17 3 1 #"7" -0 0 17 3 6 #" 6 1))" +0 0 17 3 7 #"7 6 1))" 0 0 22 29 1 #"\n" 0 0 22 29 1 #"\n" 0 0 17 3 1 #";" 0 0 17 3 1 #"(" -0 0 17 3 6 #"define" -0 0 17 3 15 #" (is-basis? vs)" +0 0 17 3 21 #"define (is-basis? vs)" 0 0 22 29 1 #"\n" 0 0 17 3 6 #"; (" 0 0 17 3 5 #"check" @@ -14719,14 +14672,12 @@ 0 0 17 3 3 #"are" 0 0 17 3 1 #" " 0 0 17 3 1 #"a" -0 0 17 3 1 #" " -0 0 17 3 18 #"basis)) p. 122-123" +0 0 17 3 19 #" basis)) p. 122-123" 0 0 22 29 1 #"\n" 0 0 22 29 1 #"\n" 0 0 17 3 1 #";" 0 0 17 3 1 #"(" -0 0 17 3 6 #"define" -0 0 17 3 26 #" (reduce-span-to-basis vs)" +0 0 17 3 32 #"define (reduce-span-to-basis vs)" 0 0 22 29 1 #"\n" 0 0 17 3 18 #"; ...) ; p. 138" 0 0 22 29 1 #"\n" @@ -14747,8 +14698,7 @@ 0 0 17 3 6 #"define" 0 0 17 3 2 #" (" 0 0 17 3 20 #"expand-span-to-basis" -0 0 17 3 1 #" " -0 0 17 3 17 #"vs) ...) ; p. 145" +0 0 17 3 18 #" vs) ...) ; p. 145" 0 0 22 29 1 #"\n" 0 0 17 3 2 #";(" 0 0 17 3 6 #"define" @@ -14756,8 +14706,7 @@ 0 0 17 3 29 #"coordinated-relative-to-basis" 0 0 17 3 1 #" " 0 0 17 3 1 #"v" -0 0 17 3 1 #" " -0 0 17 3 17 #"bs) ...) ; p. 153" +0 0 17 3 18 #" bs) ...) ; p. 153" 0 0 22 29 1 #"\n" 0 0 17 3 2 #";(" 0 0 17 3 6 #"define" @@ -14765,15 +14714,13 @@ 0 0 17 3 22 #"change-of-basis-matrix" 0 0 17 3 1 #" " 0 0 17 3 2 #"bs" -0 0 17 3 1 #" " -0 0 17 3 17 #"cs) ...) ; p. 157" +0 0 17 3 18 #" cs) ...) ; p. 157" 0 0 22 29 1 #"\n" 0 0 17 3 2 #";(" 0 0 17 3 6 #"define" 0 0 17 3 2 #" (" 0 0 17 3 11 #"determinant" -0 0 17 3 1 #" " -0 0 17 3 13 #"M) ...) ; p ?" +0 0 17 3 14 #" M) ...) ; p ?" 0 0 22 29 1 #"\n" 0 0 22 29 1 #"\n" 0 0 17 3 13 #";;; Run tests" @@ -14782,8 +14729,7 @@ 0 0 22 29 1 #"\n" 0 0 17 3 2 #";(" 0 0 17 3 7 #"require" -0 0 17 3 2 #" (" -0 0 17 3 17 #"submod \".\" test))" +0 0 17 3 19 #" (submod \".\" test))" 0 0 22 29 1 #"\n" 0 0 22 29 1 #"\n" 0 0 17 3 91 @@ -14983,13 +14929,11 @@ 0 0 17 3 5 #"-100." 0 0 17 3 1 #" " 0 0 17 3 4 #"200." -0 0 17 3 1 #" " -0 0 17 3 6 #"100.))" +0 0 17 3 7 #" 100.))" 0 0 22 29 1 #"\n" 0 0 17 3 3 #"; (" 0 0 17 3 16 #"row-echelon-form" -0 0 17 3 1 #" " -0 0 17 3 2 #"M)" +0 0 17 3 3 #" M)" 0 0 22 29 1 #"\n" 0 0 22 29 1 #"\n" 0 0 17 3 32 #"; Example from Trefethen and Bau" @@ -15004,15 +14948,13 @@ 0 0 17 3 5 #"-128." 0 0 17 3 1 #" " 0 0 17 3 4 #"128." -0 0 17 3 1 #" " -0 0 17 3 5 #"4.0))" +0 0 17 3 6 #" 4.0))" 0 0 22 29 1 #"\n" 0 0 17 3 2 #";(" 0 0 17 3 6 #"define" 0 0 17 3 1 #" " 0 0 17 3 1 #"A" -0 0 17 3 2 #" (" -0 0 17 3 16 #"matrix-augment* " +0 0 17 3 18 #" (matrix-augment* " 0 0 22 29 1 #"\n" 0 0 17 3 13 #"; (" 0 0 17 3 4 #"list" @@ -15028,8 +14970,7 @@ 0 0 17 3 1 #"x" 0 0 17 3 2 #") " 0 0 17 3 1 #"0" -0 0 17 3 2 #") " -0 0 17 3 4 #"xs))" +0 0 17 3 6 #") xs))" 0 0 22 29 1 #"\n" 0 0 17 3 19 #"; (" 0 0 17 3 5 #"apply" @@ -15043,8 +14984,7 @@ 0 0 17 3 1 #"x" 0 0 17 3 2 #") " 0 0 17 3 1 #"x" -0 0 17 3 2 #") " -0 0 17 3 4 #"xs))" +0 0 17 3 6 #") xs))" 0 0 22 29 1 #"\n" 0 0 17 3 19 #"; (" 0 0 17 3 5 #"apply" @@ -15062,8 +15002,7 @@ 0 0 17 3 1 #"x" 0 0 17 3 1 #" " 0 0 17 3 1 #"x" -0 0 17 3 3 #")) " -0 0 17 3 4 #"xs))" +0 0 17 3 7 #")) xs))" 0 0 22 29 1 #"\n" 0 0 17 3 19 #"; (" 0 0 17 3 5 #"apply" @@ -15083,8 +15022,7 @@ 0 0 17 3 1 #"x" 0 0 17 3 1 #" " 0 0 17 3 1 #"x" -0 0 17 3 3 #")) " -0 0 17 3 7 #"xs)))))" +0 0 17 3 10 #")) xs)))))" 0 0 22 29 1 #"\n" 0 0 17 3 3 #"; (" 0 0 17 3 13 #"define-values" @@ -15094,8 +15032,7 @@ 0 0 17 3 1 #"R" 0 0 17 3 3 #") (" 0 0 17 3 9 #"matrix-QR" -0 0 17 3 1 #" " -0 0 17 3 3 #"A))" +0 0 17 3 4 #" A))" 0 0 22 29 1 #"\n" 0 0 22 29 1 #"\n" 0 0 diff --git a/maxima/maxima.rkt b/maxima/maxima.rkt index 6113ba6c6..c2056f538 100644 --- a/maxima/maxima.rkt +++ b/maxima/maxima.rkt @@ -1,4 +1,8 @@ #lang racket +;;; This is not in use at the moment. +;;; However it would be possible to implement Maxima-boxes +;;; in the GUI and use Maxima as a backend with this. + (require racket/tcp racket/gui/base) ;;; diff --git a/numeric/solve-quadratic.rkt b/numeric/solve-quadratic.rkt index 963909d93..45370b214 100644 --- a/numeric/solve-quadratic.rkt +++ b/numeric/solve-quadratic.rkt @@ -1,5 +1,4 @@ #lang racket - (require (planet williams/science/unsafe-ops-utils) racket/flonum) @@ -39,55 +38,63 @@ ;;; TEST ;;; -(require (planet williams/science/random-source) - (planet williams/science/math)) +#;(module test racket + (require (planet williams/science/random-source) + (planet williams/science/math) + (planet williams/science/unsafe-ops-utils) + racket/flonum) + (define-syntax-rule (fl~ x) + (fl- 0.0 x)) + + (define (test) + (define eps 1e-9) + (define (random-real-between from to) + (real->float (+ from (* (- to from) (random-real))))) + (define (rand) (random-real-between -10 10)) + (let ([a (rand)] [r1 (rand)] [r2 (rand)]) + (let ([r1 (min r1 r2)] [r2 (max r1 r2)]) + (let ([b (fl* a (fl~ (fl+ r1 r2)))] + [c (fl* a (fl* r1 r2))]) + (andmap (λ (x1 x2) + (unless (zero? (fcmp x1 x2 eps)) + (display (list '(a r1 r2) '= (list a r1 r2))) (newline) + (display (list '(a b c) ' = (list a b c))) (newline) + (display (list '(solve-quadratic a b c) '= (solve-quadratic a b c))) (newline) + (display (list `(fcmp ,x1 ,x2 ,eps) '= (fcmp x1 x2 eps))) (newline)) + (zero? (fcmp x1 x2 eps))) + (solve-quadratic a b c) + (list r1 r2)))))) + + ; a r1 r2 ((0.8002497503654915 -0.5820734661704101 4.291708989226137) + ; a b c (0.8002497503654915 -2.968634901272305 -1.999095840595189)) + ;(test) + + ; (solve-quadratic 0.8002497503654915 -2.968634901272305 -1.999095840595189) + + ; (fcmp -0.5820734661704101 -0.5820734661704101 1e-15) + + + ;;; cases to investigate + + ;((a r1 r2) = (3.8566316203631885 -8.106416563069132 -8.032453290827172)) + ;((a b c) = (3.8566316203631885 62.24167579546271 251.12230179873728)) + ;((solve-quadratic a b c) = (-8.106416563068963 -8.03245329082734)) + ;((fcmp -8.106416563068963 -8.106416563069132 1e-14) = 1) + ; + ;((a r1 r2) = (-1.6265548994586378 -9.696396453504093 -9.60199798858156)) + ;((a b c) = (-1.6265548994586378 -31.38989803145976 -151.44003484077456)) + ;((solve-quadratic a b c) = (-9.696396453503917 -9.601997988581735)) + ;((fcmp -9.696396453503917 -9.696396453504093 1e-14) = 1) + ; + ;((a r1 r2) = (8.297284009362357 5.2152202289471905 5.247945289959347)) + ;((a b c) = (8.297284009362357 -86.81585594733481 227.08994615882847)) + ;((solve-quadratic a b c) = (5.215220228947072 5.247945289959466)) + ;((fcmp 5.215220228947072 5.2152202289471905 1e-14) = -1) + ; + ;((a r1 r2) = (8.441076002955395 -4.497852045007335 -4.494381895016747)) + ;((a b c) = (8.441076002955395 75.90413012409832 170.6368983607456)) + ;((solve-quadratic a b c) = (-4.497852045006565 -4.494381895017516)) + ;((fcmp -4.497852045006565 -4.497852045007335 1e-14) = 1) + + ) -(define (test) - (define eps 1e-9) - (define (random-real-between from to) - (real->float (+ from (* (- to from) (random-real))))) - (define (rand) (random-real-between -10 10)) - (let ([a (rand)] [r1 (rand)] [r2 (rand)]) - (let ([r1 (min r1 r2)] [r2 (max r1 r2)]) - (let ([b (fl* a (fl~ (fl+ r1 r2)))] - [c (fl* a (fl* r1 r2))]) - (andmap (λ (x1 x2) - (unless (zero? (fcmp x1 x2 eps)) - (display (list '(a r1 r2) '= (list a r1 r2))) (newline) - (display (list '(a b c) ' = (list a b c))) (newline) - (display (list '(solve-quadratic a b c) '= (solve-quadratic a b c))) (newline) - (display (list `(fcmp ,x1 ,x2 ,eps) '= (fcmp x1 x2 eps))) (newline)) - (zero? (fcmp x1 x2 eps))) - (solve-quadratic a b c) - (list r1 r2)))))) - -; a r1 r2 ((0.8002497503654915 -0.5820734661704101 4.291708989226137) -; a b c (0.8002497503654915 -2.968634901272305 -1.999095840595189)) -;(test) - -; (solve-quadratic 0.8002497503654915 -2.968634901272305 -1.999095840595189) - -; (fcmp -0.5820734661704101 -0.5820734661704101 1e-15) - - -;;; cases to investigate - -;((a r1 r2) = (3.8566316203631885 -8.106416563069132 -8.032453290827172)) -;((a b c) = (3.8566316203631885 62.24167579546271 251.12230179873728)) -;((solve-quadratic a b c) = (-8.106416563068963 -8.03245329082734)) -;((fcmp -8.106416563068963 -8.106416563069132 1e-14) = 1) -; -;((a r1 r2) = (-1.6265548994586378 -9.696396453504093 -9.60199798858156)) -;((a b c) = (-1.6265548994586378 -31.38989803145976 -151.44003484077456)) -;((solve-quadratic a b c) = (-9.696396453503917 -9.601997988581735)) -;((fcmp -9.696396453503917 -9.696396453504093 1e-14) = 1) -; -;((a r1 r2) = (8.297284009362357 5.2152202289471905 5.247945289959347)) -;((a b c) = (8.297284009362357 -86.81585594733481 227.08994615882847)) -;((solve-quadratic a b c) = (5.215220228947072 5.247945289959466)) -;((fcmp 5.215220228947072 5.2152202289471905 1e-14) = -1) -; -;((a r1 r2) = (8.441076002955395 -4.497852045007335 -4.494381895016747)) -;((a b c) = (8.441076002955395 75.90413012409832 170.6368983607456)) -;((solve-quadratic a b c) = (-4.497852045006565 -4.494381895017516)) -;((fcmp -4.497852045006565 -4.497852045007335 1e-14) = 1) diff --git a/plotting/adaptive-plotting.rkt b/plotting/adaptive-plotting.rkt index e3fde31d0..ea50735fd 100644 --- a/plotting/adaptive-plotting.rkt +++ b/plotting/adaptive-plotting.rkt @@ -17,8 +17,11 @@ ;;; an explanation of the algorithm: ;;; http://yacas.sourceforge.net/Algochapter4.html#c4s1 -(define *debug* #t) +;;; See +;;; http://scicomp.stackexchange.com/questions/2377/algorithms-for-adaptive-function-plotting +;;; for discussion on adaptive plotting. +(define *debug* #t) ; These count functions are used to measure the ; number of evaluations of the function to be drawn.