Arithmeticに対数とべき乗のコマンドを追加しました。#895
Open
Faceless192x wants to merge 7 commits into
Open
Conversation
Member
|
BCDiceでは小数を取り扱わないので、もっぱら小数になる対数を使うのは厳しいかなと思います。記法も 冪乗については結合方向を変更した方が良さそうです。 |
Contributor
Author
|
ありがとうございます。 結論からすると「今まで実装されていない理由がちゃんとある」という感じですね。 対数は元々の要望が「数字の桁数を簡単に数えたい」ということだったので常用対数のみでも良いかなぁとは思いましたが、とりあえずはナシの方向で行こうと思います。 べき乗は改修してみます。 |
Contributor
Author
|
そして、べき乗の処理ですがテストを追加してみたところ、結合順は問題なさそうです。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
公式Discordサーバにて、「べき乗」と「対数」のコマンドがほしい旨要望があったので、試しに実装してみました。
・べき乗 「x^n」で(x**nではない)
ex. c(2^3) > 8
・xLOGn で「Logx(n)」を処理します。
ex. c(10LOG100) > 2
CoC6での実行を望まれていたので、CoC6にテストを書いてみました。
実際にどの程度活用するか不明ではありますが、参考までに。