Code: Select all
Msgbox % 1 / (2 ** 10) ; gives 0.000977
Code: Select all
Msgbox % 1 / (2 ** 10) ; gives 0.000977
Code: Select all
Msgbox % Format("{:.10f}", 1/2**10)
Code: Select all
a1:=111111111*111111111 ;- 12345678987654321
a2:=1/2**10 ;- .000977
r2:=Format("{:.10f}",A2) ;- .0009765625
a3:=a1+r2 ;- 12345678987654320.000000 > should be 12345678987654321.0009765625
ep:=12345678987654321.0009765625 ;- expected
msgbox,A1=%a1%`nA2=%a2%`nR2=%r2%`nA3=%a3%`nEP=%ep%
return
I think so. I have used it very occasionally, but try with Maths.ahk:
Code: Select all
#Include D:\Aplications\Maths.ahk ; Replace with your copy of Maths.ahk
a1:=111111111*111111111 ;- 12345678987654321
a2:=1/2**10 ;- .000977
MsgBox, % SM_Add(a1, a2) ; 12345678987654321.000977
return
Code: Select all
#Include <maths>
;-"C:\Program Files\AutoHotkey\LIB" > here is Maths.ahk
;-
a1:=111111111*111111111 ;- 12345678987654321
a2:=1/2**10 ;- .000977
MsgBox, % SM_Add(a1, a2) ;- 12345678987654321.000977
return
/*
- https://raw.githubusercontent.com/aviaryan/autohotkey-scripts/master/Functions/Maths.ahk
Scientific MATHS LIBRARY ( Filename = Maths.ahk ) by Avi Aryan v3.43
------------------------------------------------------------------------------
Thanks to hd0202, smorgasbord, Uberi and sinkfaze
Special thanks to smorgasbord for the factorial function
------------------------------------------------------------------------------
DOCUMENTATION - http://avi-aryan.github.io/ahk/functions/smaths.html
Math-Functions.ahk - https://github.com/avi-aryan/Avis-Autohotkey-Repo/blob/master/Functions/Math-Functions.ahk
*/
Code: Select all
Msgbox % Format("{:.100f}", 0.1024 * 16)