Skip to content

Commit

Permalink
Improve error handling of Steps, Stats, and Step.
Browse files Browse the repository at this point in the history
Fixes #19
  • Loading branch information
halirutan committed Dec 13, 2018
1 parent e3dbbfe commit c3c75bb
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,14 @@ integration step.

## Documentation

The main documentation of the Rubi project can be found under [rulebasedintegration.org](https://rulebasedintegration.org).
Certain development specific information about this Mathematica package will be made available in the [Rubi GitHub Wiki](https://github.com/RuleBasedIntegration/Rubi/wiki).
Since the Wiki is at the moment not complete, please visit the [current Rubi website](http://www.apmaths.uwo.ca/~arich/).

The user documentation of the Rubi project can be found under [rulebasedintegration.org](https://rulebasedintegration.org).
For an installation- and usage-guide, please see the [Mathematica Package](https://rulebasedintegration.org/mathematicaPackage.html) section on [rulebasedintegration.org](https://rulebasedintegration.org).


Certain development specific information about this Mathematica package can be found in the [Rubi GitHub Wiki](https://github.com/RuleBasedIntegration/Rubi/wiki).
There, you will also find how you can contribute to the project.
Since the Wiki is at the moment not complete, please also visit the [current Rubi website](http://www.apmaths.uwo.ca/~arich/).

## Repository structure and development

### General
Expand Down
2 changes: 1 addition & 1 deletion Rubi/PacletInfo.m
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

Paclet[
Name -> "Rubi",
Version -> "4.16.0.4",
Version -> "4.16.0.5",
MathematicaVersion -> "9+",
Description -> "Package for Rule-based Integration",
Creator -> "Albert D. Rich, Patrick Scheibe",
Expand Down
7 changes: 6 additions & 1 deletion Rubi/Rubi.m
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,8 @@
Options[Steps] = {
RubiPrintInformation -> True
};
Steps[expr_Int, opts : OptionsPattern[]] := Steps[expr, $IterationLimit, opts];
Int::wrngUsage = "Wrong usage of the `1` function. Please use `1`[Int[expr, x]].";
Steps[Int[expr_, x_], opts : OptionsPattern[]] := Steps[Int[expr, x], $IterationLimit, opts];
Steps[Int[expr_, x_], n_Integer, OptionsPattern[]] := Module[{result, steps},
If[$LoadShowSteps =!= True,
Message[Int::noShowSteps];
Expand All @@ -341,6 +342,7 @@
{steps, result}
]
] /; Head[x] === Symbol && If[TrueQ[n > 0], True, Message[Steps::negSteps]; False];
Steps[___] := (Message[Int::wrngUsage, Steps]; $Failed);

SetAttributes[Step, {HoldFirst}];
Options[Step] = {
Expand All @@ -362,6 +364,8 @@
{step, result}
]
] /; Head[x] === Symbol;
Step[___] := (Message[Int::wrngUsage, Step]; $Failed);


SetAttributes[Stats, {HoldFirst}];
Options[Stats] = {
Expand All @@ -382,6 +386,7 @@
}
]
]] /; Head[x] === Symbol;
Stats[___] := (Message[Int::wrngUsage, Stats]; $Failed);



Expand Down

0 comments on commit c3c75bb

Please sign in to comment.