Skip to content

PMArbitraryPrecisionFloat one returns a Float #198

Open

Description

@SergeStinckwich

@nicolas-cellier-aka-nice why PMArbitraryPrecisionFloat one returns a SmallInteger and not a PMArbitraryPrecisionFloat?

Activity

  1. nicolas-cellier-aka-nice commented on Feb 28, 2021

    @nicolas-cellier-aka-nice
    Contributor

    I don't know. In the original repo, I have this:

    one
    ^self class 
    	mantissa: 1
    	exponent: 0
    	nBits: nBits
    
  2. SergeStinckwich commented on Feb 28, 2021

    @SergeStinckwich
    MemberAuthor

    yes on instance side, I was talking about class side.
    When I try: PMArbitraryPrecisionFloat new one, I have an error.

  3. nicolas-cellier-aka-nice commented on Feb 28, 2021

    @nicolas-cellier-aka-nice
    Contributor

    Ah, there's no such thing in original repository.
    I don't think that it's a good idea to have one on class side because we can't specify precision.
    Unless you pick some arbitrary arbitraryPrecision...
    Probably, we should forbid new too, that's not how instances shall be created.

  4. SergeStinckwich commented on Feb 28, 2021

    @SergeStinckwich
    MemberAuthor

    There is no method on the class side, but one in defined in Number on class side in fact.
    BTW, how instances should be created. Do you have tests that illustrate how to create instances?

  5. SergeStinckwich commented on Feb 28, 2021

    @SergeStinckwich
    MemberAuthor

    It would be interesting to have a default precision I think.

  6. changed the title [-]PMArbitraryPrecisionFloat one returns a Float[/-] [+]``PMArbitraryPrecisionFloat one`` returns a Float[/+] on Aug 9, 2021
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