feat(math): add logb function

Closes #12112
This commit is contained in:
PowerUser64
2025-11-27 00:31:33 -08:00
committed by Johannes Altmanninger
parent 2d29749eae
commit 47c773300a
4 changed files with 22 additions and 0 deletions

View File

@@ -276,6 +276,21 @@ echo $status
math 'log2(8)'
# CHECK: 3
math 'logb(2, 8)'
# CHECK: 3
math 'logb(67, 406067677556641)'
# CHECK: 8
math 'logb(42, 230539333248)'
# CHECK: 7
math 'logb(12, 8916100448256)'
# CHECK: 12
math 'logb(3, 5559060566555523)'
# CHECK: 33
math 'logb(5, 2384185791015625)'
# CHECK: 22
math 'logb(7, 343)'
# CHECK: 3
# same as sin(cos(2 x pi))
math sin cos 2 x pi
# CHECK: 0.841471