Code Monkey home page Code Monkey logo

Comments (6)

ethanpil avatar ethanpil commented on August 28, 2024 1

Yes for the Round() function but in my little world would also appreciate RoundUp() and RoundDown() like these referenced here https://learn.microsoft.com/en-us/power-platform/power-fx/reference/function-round

from numbr.

antonmedv avatar antonmedv commented on August 28, 2024 1

Will do)

from numbr.

ivanalejandro0 avatar ivanalejandro0 commented on August 28, 2024 1

It may be worth considering using a syntax similar to what Soulver provides, I think it's pretty user friendly, see:

1/3 to 2 dp                                    | 0.33
π to 5 digits                                  | 3.14159

5.5 rounded                                    | 6
5.5 rounded down                               | 5
5.5 rounded up                                 | 6

37 to nearest 10                               | 40
$490 rounded to nearest hundred                | $500
2,100 to nearest thousand                      | 2,000

(copied from https://documentation.soulver.app/functions/number-rounding )

Though they also provide function-like keywords (round(), ceil(), floor()).

Disclaimer: I'm new to this notepad+calculator world and I've never used Soulver, so I'm not sure what's the best approach.

from numbr.

antonmedv avatar antonmedv commented on August 28, 2024

Like this?

=ROUND(2.15, 1) Rounds 2.15 to one decimal place 2.2

from numbr.

ethanpil avatar ethanpil commented on August 28, 2024

This seems like a great fork in the road where @antonmedv must decide the direction of numbr.... Will this steer towards a natural language calculation system or more of a function/expression based system.

from numbr.

antonmedv avatar antonmedv commented on August 28, 2024

I think we can support both: expressions and functions.

Right now thinking about a way to refactor lexer to support complex lex rules needed for parsing datetime strings.

from numbr.

Related Issues (20)

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.