Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PMArbitraryPrecisionFloat one returns a Float #198

Open
SergeStinckwich opened this issue Feb 28, 2021 · 5 comments
Open

PMArbitraryPrecisionFloat one returns a Float #198

SergeStinckwich opened this issue Feb 28, 2021 · 5 comments

Comments

@SergeStinckwich
Copy link
Member

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

@nicolas-cellier-aka-nice
Copy link
Contributor

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

one
^self class 
	mantissa: 1
	exponent: 0
	nBits: nBits

@SergeStinckwich
Copy link
Member Author

SergeStinckwich commented Feb 28, 2021

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

@nicolas-cellier-aka-nice
Copy link
Contributor

nicolas-cellier-aka-nice commented Feb 28, 2021

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.

@SergeStinckwich
Copy link
Member Author

SergeStinckwich commented Feb 28, 2021

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?

@SergeStinckwich
Copy link
Member Author

SergeStinckwich commented Feb 28, 2021

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

@SergeStinckwich SergeStinckwich changed the title PMArbitraryPrecisionFloat one returns a Float PMArbitraryPrecisionFloat one returns a Float Aug 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants