{"size": 1896, "ext": "scrbl", "max_stars_repo_path": "scribblings/rascas.scrbl", "max_stars_repo_name": "Metaxal/rascas", "max_stars_repo_stars_event_min_datetime": "2018-02-11T18:56:06.000Z", "max_stars_repo_stars_event_max_datetime": "2021-12-22T03:44:57.000Z", "max_issues_repo_path": "scribblings/rascas.scrbl", "max_issues_repo_name": "Metaxal/rascas", "max_issues_repo_issues_event_min_datetime": "2018-02-13T18:19:02.000Z", "max_issues_repo_issues_event_max_datetime": "2018-02-17T10:29:10.000Z", "max_forks_repo_path": "scribblings/rascas.scrbl", "max_forks_repo_name": "Metaxal/rascas", "max_forks_repo_forks_event_min_datetime": "2018-08-28T21:57:44.000Z", "max_forks_repo_forks_event_max_datetime": "2018-08-28T21:57:44.000Z"}
{"max_stars_count": 26, "max_issues_count": 1, "max_forks_count": 1, "avg_line_length": 37.92, "max_line_length": 97, "alphanum_fraction": 0.7331223629}
#lang scribble/manual
@require[racket/require]
@require[@for-label[rascas
                    (subtract-in racket/base
                                 rascas)]
         racket/base
         racket/runtime-path]

@title{Rascas}
@author{Laurent Orseau}

@defmodule[rascas]

A Computer Algebra System for Racket.

Initially a port of @hyperlink["https://github.com/dharmatech/mpl"]{dharmatech/mpl},
but now incorporates lots of modifications.

Rascas is still unstable and some behaviours may change without warning,
although normally only to make them more consistent.

@section{Numeric over symbolic}

Rascas implements the @emph{numeric over symbolic} principle:
@nested[#:style 'inset]{
If @racket[f] is a symbolic expression with @emph{n} free variables,
then if for all valid numeric values of these @emph{n} variables
(that do not lead to @racket[+nan.0] or to an exception being raised)
the expression reduces to a constant numeric value @emph{c},
then Rascas @emph{may} choose to eagerly reduce the expression @racket[f]
containing free variables to @emph{c}.}

For example, Rascas reduces @racket[(* 0 'x)] to @racket[0], because
this is correct for all valid values for @racket['x], and
if @racket[x] is infinite the result would be @racket[+nan.0]
(note that Racket actually considers @racket[(* 0 +inf.0)] to be @racket[0],
but Rascas reduces this to @racket[+nan.0]).

By contrast, Rascas does @emph{not} reduce @racket[(* 0.0 'x)] because if @racket['x] is negative
the result would be @racket[-0.0], which may lead to different values since for example
@racket[(/ 1 -0.0)] is @racket[-inf.0].


This principle of numeric over symbolic also
means that the user must be careful about the order in which variables are substituted,
and it is preferable to use @racket[concurrent-substitute] so that the expression is reduced only
after all variables are substituted with their value.


