calc merge requestshttps://gitlab.redox-os.org/redox-os/calc/-/merge_requests2024-02-25T16:12:00Zhttps://gitlab.redox-os.org/redox-os/calc/-/merge_requests/31Fix issue https://gitlab.redox-os.org/redox-os/calc/-/issues/29 and version bump2024-02-25T16:12:00ZVinÃcius FranchiniFix issue https://gitlab.redox-os.org/redox-os/calc/-/issues/29 and version bumpFix the issue [29](https://gitlab.redox-os.org/redox-os/calc/-/issues/29).
Version bump into 0.8.0, as previous MR added new arithmetic and logarithmic functions.
The pipeline for the Redoxer is still failing due `undefined reference` r...Fix the issue [29](https://gitlab.redox-os.org/redox-os/calc/-/issues/29).
Version bump into 0.8.0, as previous MR added new arithmetic and logarithmic functions.
The pipeline for the Redoxer is still failing due `undefined reference` related to libredox used by the libtermion. However, the `redoxer build` works locally.https://gitlab.redox-os.org/redox-os/calc/-/merge_requests/30Add-Trigonometric-and-Logarithmic-functions2024-02-19T00:21:31ZVinÃcius FranchiniAdd-Trigonometric-and-Logarithmic-functionsAdd trigonometric and logarithm functions to the calc application.
Unit tests added for all new functions.
The pipeline for the Redoxer is failing due `undefined reference` related to libredox used by the libtermion. However, the `redo...Add trigonometric and logarithm functions to the calc application.
Unit tests added for all new functions.
The pipeline for the Redoxer is failing due `undefined reference` related to libredox used by the libtermion. However, the `redoxer build` works locally.https://gitlab.redox-os.org/redox-os/calc/-/merge_requests/29Update Cargo.lock2021-03-10T10:07:14ZDaniel del CastilloUpdate Cargo.lockThis allows the use of the new version of decimal. The one present now in the Cargo.lock doesn't work because it uses deprecated (and now forbidden) features of rust (see [this](https://github.com/alkis/decimal/issues/59)), which broke t...This allows the use of the new version of decimal. The one present now in the Cargo.lock doesn't work because it uses deprecated (and now forbidden) features of rust (see [this](https://github.com/alkis/decimal/issues/59)), which broke the floating point numbers in calc. The new version works as expected! This also fixes [this issue](https://gitlab.redox-os.org/redox-os/ion/-/issues/996) in ionhttps://gitlab.redox-os.org/redox-os/calc/-/merge_requests/28Remove failure dependency2023-03-06T23:44:23ZMichel Le BihanRemove failure dependencyIt is unmaintained as stated in https://rustsec.org/advisories/RUSTSEC-2020-0036 and doesn't seem to be needed after https://gitlab.redox-os.org/redox-os/calc/-/commit/206ece43011443fc6bb5fca9721d9abee624931e.It is unmaintained as stated in https://rustsec.org/advisories/RUSTSEC-2020-0036 and doesn't seem to be needed after https://gitlab.redox-os.org/redox-os/calc/-/commit/206ece43011443fc6bb5fca9721d9abee624931e.https://gitlab.redox-os.org/redox-os/calc/-/merge_requests/27Fix #292023-03-06T23:53:50ZPhilip RidoutFix #29- Fixes #29
- Updates deps
- Updates README.md- Fixes #29
- Updates deps
- Updates README.mdhttps://gitlab.redox-os.org/redox-os/calc/-/merge_requests/26Update the dependencies2019-10-22T01:43:28ZAdminXVIIUpdate the dependencieshttps://gitlab.redox-os.org/redox-os/calc/-/merge_requests/25apply suggestions from PR #242019-08-01T16:30:52ZJakob Hellermannapply suggestions from PR #24apply suggestions from [MR 24](https://gitlab.redox-os.org/redox-os/calc/merge_requests/24)apply suggestions from [MR 24](https://gitlab.redox-os.org/redox-os/calc/merge_requests/24)https://gitlab.redox-os.org/redox-os/calc/-/merge_requests/24[feature]: remember last result as `ans`2019-07-31T20:02:10ZJakob Hellermann[feature]: remember last result as `ans`## Example usage:
```
> ans
calc: no `ans` from previous computation
> 20+3
23
> ans*5
111## Example usage:
```
> ans
calc: no `ans` from previous computation
> 20+3
23
> ans*5
111https://gitlab.redox-os.org/redox-os/calc/-/merge_requests/23Fix lone zero handling2019-04-11T15:56:47ZAdminXVIIFix lone zero handlingfix `0 + 1` error _et al._
Fix #26fix `0 + 1` error _et al._
Fix #26https://gitlab.redox-os.org/redox-os/calc/-/merge_requests/22Update decimal crate to allow building for AArch642019-04-07T21:48:48ZAdminXVIIUpdate decimal crate to allow building for AArch64https://gitlab.redox-os.org/redox-os/calc/-/merge_requests/21Add support for the dice operator.2018-12-08T14:28:18ZTormod Gjeitnes HellenAdd support for the dice operator.The dice operator is mostly known from boardgames.
Example:
1d6 => Throw a six-sided die once
3d10 => Throw a ten-sided die thriceThe dice operator is mostly known from boardgames.
Example:
1d6 => Throw a six-sided die once
3d10 => Throw a ten-sided die thricehttps://gitlab.redox-os.org/redox-os/calc/-/merge_requests/20Changed the gitlab CI to match the travis CI2018-12-08T14:29:58ZNathaniel Barragancontact@nathanielbarragan.xyzChanged the gitlab CI to match the travis CIThis involved adding the format check to the CI process. I also fixed some formatting issues which was causing Travis CI to fail.This involved adding the format check to the CI process. I also fixed some formatting issues which was causing Travis CI to fail.https://gitlab.redox-os.org/redox-os/calc/-/merge_requests/19Fixed issue #242018-11-04T20:39:10ZNathaniel Barragancontact@nathanielbarragan.xyzFixed issue #24There were changes made to `parse::Environment` and `parse::DefaultEnvironment` to store the recursion level. This may cause issues with any other programs which depend on this crate. Now, in order to initialize the `parse::DefaultEnviro...There were changes made to `parse::Environment` and `parse::DefaultEnvironment` to store the recursion level. This may cause issues with any other programs which depend on this crate. Now, in order to initialize the `parse::DefaultEnvironment` struct, one must use `parse::DefaultEnvironment::new()`. There was also a change to the `parse::Environment` trait. It now requires the functions `add_recursion_level(&self)` `subtract_recursion_level(&mut self)` and `get_recursion_level(&self)`
Finally, a new variant was added in the `error::CalcError` enum. This variant is the `error::CalcError::RecursionLimitReached`https://gitlab.redox-os.org/redox-os/calc/-/merge_requests/18Replace f64 w/ d128: higher accuracy / precision2017-10-09T05:17:06ZMichael Aaron Murphymmstick@pm.meReplace f64 w/ d128: higher accuracy / precisionCloses #17
128-bit decimal floats have significantly higher accuracy and precision than what 64-bit floating point arithmetic can provide. 128-bit decimals provide up to 34 decimal digits of precision, and their calculations are prec...Closes #17
128-bit decimal floats have significantly higher accuracy and precision than what 64-bit floating point arithmetic can provide. 128-bit decimals provide up to 34 decimal digits of precision, and their calculations are precise within that range, due to making these calculations using
ALUs, rather than on a FPU.
This will immediately make calc useful for real world use in any area that requires accurate decimal precision, such as financial calculations. Arbitrary precision decimal math would be more ideal, but the Rust ecosystem does not yet provide support for a `BigDecimal` type at this time.
A downside to this PR, however, is that the `d128` type from the decimal crate does not yet implement the `Float` trait, and thus it doesn't have access to `cos()`, `sin()`, and `tan()` methods. So, this PR disables them for now.https://gitlab.redox-os.org/redox-os/calc/-/merge_requests/16add conversion from CalcError to String2017-08-14T21:45:15ZMichael Aaron Murphymmstick@pm.meadd conversion from CalcError to String*Created by: glowing-chemist*
Implement From<CalcError> for String
Allowing for error messages to be generated from CalcErrors.*Created by: glowing-chemist*
Implement From<CalcError> for String
Allowing for error messages to be generated from CalcErrors.https://gitlab.redox-os.org/redox-os/calc/-/merge_requests/14Implement Polish Notation Support2017-07-23T14:27:50ZMichael Aaron Murphymmstick@pm.meImplement Polish Notation SupportImplements support for polish notation in the library and binary, so calc will now support both prefix and infix modes. It works by temporarily storing operators and values into two separate vectors, and then collecting them together int...Implements support for polish notation in the library and binary, so calc will now support both prefix and infix modes. It works by temporarily storing operators and values into two separate vectors, and then collecting them together into infix order so that it can take advantage of the existing token parser. Parenthesis are also added to disrupt the order of operations rules that infix math has to abide by, but does not apply to prefix math. The binary now also checks for either a `-p` or `--polish` flag, then choosing the corresponding evaluator accordingly.
This will be much more useful in Ion once support for the **<** /**>**/**<=**/**>=**/**==**/**!=** operators are added, which would enable for prefix-based conditional checks.
Closes #4https://gitlab.redox-os.org/redox-os/calc/-/merge_requests/13Add support for hexadecimal inputs / outputs2018-07-13T09:40:41ZMichael Aaron Murphymmstick@pm.meAdd support for hexadecimal inputs / outputs*Created by: huntergoldstein*
- Numbers are now typed according to their format / internal representation
- The type that stores numbers, `Value`, now has operator overloads that performs the correct casting / error handling
- Divisio...*Created by: huntergoldstein*
- Numbers are now typed according to their format / internal representation
- The type that stores numbers, `Value`, now has operator overloads that performs the correct casting / error handling
- Division will not preserve type: for example, `4 / 3` will be `1.3333...` not `1`
Closes #10.https://gitlab.redox-os.org/redox-os/calc/-/merge_requests/8Added extra functions2017-07-09T02:57:56ZMichael Aaron Murphymmstick@pm.meAdded extra functions*Created by: mgmoens*
**Changes introduced by this pull request**:
Added log, sin, cos and tan functions to calc.
**TODOs**: [what is not done yet.]
Fix some crappy code construction I did
**Fixes**: [what issues this fixes.]
https...*Created by: mgmoens*
**Changes introduced by this pull request**:
Added log, sin, cos and tan functions to calc.
**TODOs**: [what is not done yet.]
Fix some crappy code construction I did
**Fixes**: [what issues this fixes.]
https://github.com/redox-os/calc/issues/1