⚡ Sangsakala Proxy 🏠 Home
Skip to content

Implement the Racket number pyramid #93

Open

Description

@vishesh

Racket numbers are exact, in-exact, complex and can be arbitrarily large as opposed to 64-bit floats in JavaScript.

  • Whalesong and Pyret use Danny Yoo's js-numbers library. IIRC the library itself models the number pyramid, and hence can be used directly.

Activity

  1. vishesh commented on Aug 30, 2017

    @vishesh
    MemberAuthor

    @glebm If you are interested you can take this. A lot of people ask about this.

  2. avelino commented on Aug 14, 2018

    @avelino

    PR merged, I think you can close this issue

  3. vishesh commented on Aug 14, 2018

    @vishesh
    MemberAuthor

    @avelino: The PR references this issue, but not fixes it.

  4. samth commented on Oct 2, 2019

    @samth
    Collaborator
    1. Danny Yoo implemented the full numeric tower, it's part of the wescheme implementation here: https://github.com/bootstrapworld/wescheme2012/blob/master/war-src/js/js-runtime/js-numbers.js
    2. Modern browsers now have bignums, which would make that code a lot faster.
  5. vishesh commented on Oct 2, 2019

    @vishesh
    MemberAuthor

    Native BigInt is great news! Thanks for update!!

  6. sorawee commented on Jul 23, 2021

    @sorawee

    It still doesn't support fractions though, so we probably want to use a library for that instead of reinventing the wheel. https://github.com/infusion/Fraction.js/blob/master/bigfraction.js looks promising to me (it uses BigInt under the hood -- most other libraries implement their own BigInt too).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions