Giter Club home page Giter Club logo

rclc_lib's Introduction

What is it

Mathematical expression evaluation library with big integers, floats, common fractions, and complex numbers support. The library is used by the project RionaCalc

Features

  • Automatic selection of more appropriate argument type for a function: e.g, sqrt(-4) converts float number -4 into complex one -4+0i and then calculates the result 0+2i. The same is true for calculating logarithm for negative float numbers, and acos and asin for argument greater than 1.0
  • Automatic adding multiplication sign where it is omitted: e.g, (1+2)(2+9) is calculated as (1+2)*(2+9)
  • Functions with a single-value argument do not require to enclose its argument into brackets: e.g, sin cos 2 is calculated as sin(cos(2))
  • The final closing brackets can be omitted: e.g, (1+2)*(2+9 is the same as (1+2)*(2+9)
  • Trigonometric functions work with radians and degrees. Bare numbers are treated as radians, degrees requires one or three suffixes. Two degrees formats: 20d30m50s or 20°30'50". Minutes and seconds can be omitted, in this case degrees can be float number like 30.25d. So, sin(pi/2) == sin(90°)
  • Every number can include group separator _ for readability - it is very useful when using big integers. 3_000.90_23 == 3000.9023
  • Both . and , are treated as decimal separators
  • Function argument separator is ;. If a function receives more arguments than it requires, the trailing arguments are dropped: e.g, sqrt(11;12;13) is the same as sqrt(11)
  • Regular fractions use \ to separate its parts. They can be written with integer part or only with numerator and denominator, e.g 1\1\10 == 11\10
  • Two complex numbers formats: with marker at the end or in the middle. E.g, 1+2i == 1+i2. In addition, j can be used instead of i - but the calculator outputs always with i
  • Hexadecimal(starts with 0x), octal(starts with 0o), and binary(starts with 0b) numbers
  • Character % can be either a modulo or a percentage operator. It depends on the character position: if % is right before the expression end or before closing bracket or before another operator and previous operator is one of +, -, *, or /, the character is considered a percentage operator

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.