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

A problem occurs in TNCO env #94

Open
spicywei opened this issue Apr 3, 2023 · 3 comments
Open

A problem occurs in TNCO env #94

spicywei opened this issue Apr 3, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@spicywei
Copy link
Contributor

spicywei commented Apr 3, 2023

37e3892a88c604e78c8305f7ee71222

When N>1500, the existing code overflows and results in inf Tried to fix it by increasing the temp_power variable so that it can calculate a larger range of floating point numbers, but it didn't work.
@spicywei spicywei added the bug Something isn't working label Apr 3, 2023
@spicywei
Copy link
Contributor Author

spicywei commented Apr 3, 2023

Thank you @Yonv1943 for the help!
The original limit of N is 1024, and the maximum maxpower is automatically set with max - 96 by max_tmp_power = int(mult_pow_timess.max().item() - 960), 90 being a value slightly less than the limit of 1024. The problem was then solved by computing the large number with Python's native math.log10(int). Currently can support N up to 20,000.

@Yonv1943
Copy link
Collaborator

Yonv1943 commented Apr 7, 2023

如果有时间,请帮忙把标题加上方便以后搜索的信息。例如: Computing large numbers dynamically and adaptively。

我没有修改标题的权限 @spicywei

@spicywei
Copy link
Contributor Author

spicywei commented Apr 7, 2023

Ok, thanks for the advice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants