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

lambert-w changes and fix #142 #145

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

1231234md5
Copy link

No description provided.

Now, lambert-w has 200 iterations to get more accurate results.
Also, converting BigInts to Decimals is now possible! (new Decimal(12345n**12345n).toString() outputs 2.867865225007882e50509)
@Patashu
Copy link
Owner

Patashu commented Jan 13, 2023

Can you make your changes to the typescript version, please?

https://github.com/Patashu/break_eternity.js/blob/master/src/index.ts

Then you can run yarn bili src/index.ts to compile break_eternity.js and the other three files.

(Or if you can't figure out how to install bili, it took me a while, I can do that part once you're done. I had to update npm so I could update node so I can install yarn so I can install bili. I hate Javascript, lol.)

@1231234md5
Copy link
Author

Wait, is there bigint in typescript?
I only know expressions like 123456n is valid in javascript.

@Patashu
Copy link
Owner

Patashu commented Jan 14, 2023

...I have no idea!

Is typescript just not compatible with bigint, then?

@1231234md5
Copy link
Author

I just don't know whether bigint is compatitible in typescript.

@Naruyoko
Copy link
Contributor

BigInt is available is TypeScript since 3.2. I'm not sure if it works with whatever ECMAScipt version is targeted though.

https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-2.html#bigint

@1231234md5
Copy link
Author

So I must do 25% more work than before(doing typescript)?

@jakub791
Copy link

jakub791 commented Feb 10, 2023

compatible

Typescript is a superset of JavaScript, it is compatible. But because you set target to es6 typescript only includes declarations for <= ES6 APIs but bigint is a ES2020 feature.

@jakub791
Copy link

jakub791 commented Feb 10, 2023

BigInt is available is TypeScript since 3.2. I'm not sure if it works with whatever ECMAScipt version is targeted though.

https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-2.html#bigint

We are targetting ES6 (AKA ES2015) while bigint is a ES2020 feature

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants