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

Division Of (Hex) Big Integer のテストケース追加 #1117

Merged
merged 1 commit into from
Mar 23, 2024

Conversation

kzrnm
Copy link
Contributor

@kzrnm kzrnm commented Mar 20, 2024

テストケースの追加

#1105 の考慮漏れ

Burnikel-Ziegler 法で 3n 桁 / 2n 桁の除算のときの実装が漏れていました。
商が(基数の冪乗-1)のようになるときの実装です。

テストケースも追加しています。
基数は Division of Hex Big Integer を想定した $2^{32}$ と Division of Big Integer を想定した $10^9$ としました。

base.hpp を共通化

加算、乗算、除算で base.hpp がそれぞれ置いてあって同期が面倒なのでシンボリックリンクに差し替えました。

@kzrnm kzrnm changed the title Hex Big Integer Division Of (Hex) Big Integer のテストケース追加 Mar 21, 2024
@maspypy
Copy link
Collaborator

maspypy commented Mar 23, 2024

@yosupo06
シンボリックリンクというのをよく知らないのですが、それは大丈夫そうですか?
例えば LC はローカルで問題ごとに独立に生成して使うことを想定していると思うのですが、その辺も大丈夫ですか?

@kzrnm
Copy link
Contributor Author

kzrnm commented Mar 23, 2024

Windows だと別途設定しないと扱えないのでまずそうですね

@kzrnm kzrnm force-pushed the BurnikelZieglerBound branch from 903cc09 to d3176bf Compare March 23, 2024 16:29
@kzrnm
Copy link
Contributor Author

kzrnm commented Mar 23, 2024

シンボリックリンクをファイルのコピーに戻しました。

cp math/addition_of_hex_big_integers/base.hpp math/multiplication_of_hex_big_integers/base.hpp
cp math/addition_of_hex_big_integers/base.hpp math/division_of_hex_big_integers/base.hpp
cp math/addition_of_big_integers/base.hpp math/division_of_big_integers/base.hpp
cp math/addition_of_big_integers/base.hpp math/multiplication_of_big_integers/base.hpp

@maspypy
Copy link
Collaborator

maspypy commented Mar 23, 2024

修正と追加、ありがとうございます!マージします。

@maspypy maspypy merged commit bffd3ee into yosupo06:master Mar 23, 2024
6 checks passed
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.

2 participants