{"id":13792194,"url":"https://github.com/soegaard/racket-cas","last_synced_at":"2026-03-01T20:33:05.500Z","repository":{"id":12981286,"uuid":"15660051","full_name":"soegaard/racket-cas","owner":"soegaard","description":"Simple computer algebra system ","archived":false,"fork":false,"pushed_at":"2024-12-19T11:51:40.000Z","size":536,"stargazers_count":65,"open_issues_count":9,"forks_count":10,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-11-20T21:20:34.537Z","etag":null,"topics":["algebra","cas","math","racket"],"latest_commit_sha":null,"homepage":null,"language":"Racket","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/soegaard.png","metadata":{"files":{"readme":"README.txt","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-01-05T22:35:02.000Z","updated_at":"2025-07-28T20:43:21.000Z","dependencies_parsed_at":"2024-12-19T12:32:28.715Z","dependency_job_id":"27a80d89-ecba-422b-9db3-8aa312bf4308","html_url":"https://github.com/soegaard/racket-cas","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/soegaard/racket-cas","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soegaard%2Fracket-cas","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soegaard%2Fracket-cas/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soegaard%2Fracket-cas/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soegaard%2Fracket-cas/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/soegaard","download_url":"https://codeload.github.com/soegaard/racket-cas/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soegaard%2Fracket-cas/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29983186,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-01T16:35:47.903Z","status":"ssl_error","status_checked_at":"2026-03-01T16:35:44.899Z","response_time":124,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["algebra","cas","math","racket"],"created_at":"2024-08-03T22:01:09.349Z","updated_at":"2026-03-01T20:33:05.473Z","avatar_url":"https://github.com/soegaard.png","language":"Racket","funding_links":[],"categories":["Racket"],"sub_categories":["game"],"readme":"racket-cas\n==========\n\nA Simple Computer Algebra System (CAS) for Racket\n-------------------------------------------------\n\nHere is a short example. Open racket-cas.rkt in DrRacket and run it.\n\nTo begin write:\n    \u003e (require racket-cas/repl)\n\nThis changes the meaning of quote such that automatic simplifier\nwill simplify all quoted and quasi-quoted expressions.\n    \u003e '(+ x 2 a 3 (* 4 x))\n    '(+ 5 a (* 5 x))\n\nAlso, in the repl it can be convenient to write x instead of 'x so,\nwe will turn on auto quoting:\n\n    \u003e (require racket-cas/auto-quote)\n    \u003e x\n    'x\n\nTeX output is available;\n    \u003e (tex (expand '(expt (+ a b) 2)))\n\nThis can also be rendered at the REPL:\n    \u003e (render (expand '(expt (+ a b) 2)))\n\nThe Taylor series of sin(x) around x=2 of degree 3:\n    \u003e (taylor '(sin x) x 2 3)\n    '(+ (* -1/2 (expt (+ -2 x) 2) (sin 2)) (* -1/6 (expt (+ -2 x) 3)\n(cos 2)) (* (+ -2 x) (cos 2)) (sin 2))\n\nSince (sin 2) can not be represented exactly it is not evaluated\nnumerically. Use N (for numeric) to force numeric evaluation:\n    \u003e (N (expand (taylor '(sin x) x 2 3)))\n    '(+  -0.6318662024609201\n       (* 2.2347416901985055         x)\n      (* -0.8707955499599832 (expt x 2))\n      (* 0.0693578060911904  (expt x 3)))\n\nAn alternative is to use 2.0 instead of 2.\n   \u003e (expand (taylor '(sin x) x 2.0 3))\n   \u003csame result\u003e\nThis works since 2.0 is an inexact number, and inexactness is contagious.\n\nWe expect the Taylor series around 2.0 approximates sin(x) for x near 2.0.\nLet's compare the Taylor series in 2.1 with sin(2.1).\n\nFirst we substitute the x in the Taylor series with 2.1.\n    \u003e (subst (expand (N (taylor '(sin x) x 2 3))) x 2.1)\n    0.8632056138429305\nThe we calculate sin(2.1) for comparision:\n    \u003e (sin 2.1)\n    0.8632093666488738\n\nTo show that Racket CAS also supports bigfloats (floating point \nnumbers with an arbitrary number of decimals), let's see what\nthe result is with a precision of 100 binary decimals:\n    \u003e (bf-N (taylor '(sin x) x 2 3) 100 x (bf 2.1))\n    (bf #e0.86320561384293019376447471077597)\n\nWe can use standard plot library to draw a few graphs of the Taylor polynomials.\nThe plot library expects standard Racket functions from number to number.\nThe function  compile  will turn a symbolic expression into a normal Racket function.\n    \u003e (require plot)\n    \u003e (plot (list (function (compile (taylor '(sin x) x 0 5)) #:color \"green\")\n                  (function sin #:color \"red\" -3.14 3.14)))\n    \u003cnice graphs appear in DrRacket\u003e\n\nLet's compare Taylor polynomials of various orders.\n    \u003e (plot (append (for/list ([n 6]) (function (compile (taylor '(cos x) x pi n)) #:color (+ n 1)))\n                    (list (function cos #:color \"red\")))\n            #:x-min (- pi) #:x-max (* 3 pi) #:y-min -2 #:y-max 2)\n     \u003cgraphs appear\u003e\n\nRacket CAS can compute limits for x-\u003ea where a is a real number.\nThe  limit  function will apply l'Hospital's rule if neccessary (upto 10 times).\nStandard high school limits therefore work:\n    \u003e (limit '(/ (sin x) x) x 0)\n   1\n\nFor anyone interested in contributing to the code, the main file is racket-cas/racket-cas.rkt.\nIn that file quote behaves as the standard Racket quote.\nSince +, *, -, / are bound to their standard Racket meaning,\nthe functions ⊕ ⊗ ⊖ ⊘ are used where the arguments are (automatically simplified) \nsymbolic expressions.\n\nFor functions such as expt, sin etc. the corresponding functions that handle symbolic\nexpressions are Expt, Sin, etc.\n\n\nThanks to all for contributing code and sending in bugs.\nIn particular, thanks to the following contributors:\n\nContributors\n------------\n - Bowen Fu  (integrate, complex numbers, together, combine and more)\n\n\nRelated\n-------\nCheck out another CAS for Racket, https://github.com/Metaxal/rascas .\n\n\nEnjoy\n/soegaard\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoegaard%2Fracket-cas","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoegaard%2Fracket-cas","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoegaard%2Fracket-cas/lists"}