
BUG: VB4(16 bit) - Int and Fix functions don't work correctly
i found this BUG in "Int" and "Fix" function under VB4 when i use Log10
function found in vb4 help file
Function Log10(X)
Log10 = Log(X) / Log(10#)
End Function
This is the bug
Log10(10)=1
log10(100)=2
Log10(1000)=3
log10(10000)=4
log10(100000)=5
log10(1000000)=6
log10(10000000)=7
and go on obviously.
When i apply int or fix function above i obtain this:
int(Log10(10))=1
int(log10(100))=2
int(Log10(1000))=2
int(log10(10000))=4
int(log10(100000))=5
int(log10(1000000))=5
int(log10(10000000))=7
and go on. One error every 1000^n
Nice;)
i resolve it add an effimery number (0.00000000000000000001) to number
inside int function.
BYE
------------------------------------------------------------
Bruni Emiliano - nick "Emi_B"
My curriculum: http://www.*-*-*.com/ ~ebruni/curriculum.html
------------------------------------------------------------
"Il file di testo per la RFC854 contiene esattamente 854 ri-
ghe. Ritenete che ci sia qualche 'significato cosmico' in
questo numero?"
Tratto dagli esercizi sul protocollo TELNET
Internetworking con TCP/IP
Douglas E. Comer