|
-
Sep 3rd, 2001, 05:10 AM
#1
Thread Starter
Lively Member
Log (base10) conversion - VB6
I need to create a couple of functions in VB. One to return the log(10) of a number and one to do the reverse, convert the ani-log back again.
If anyone can help would be much appreciated.
Thanks.
-
Sep 3rd, 2001, 05:20 AM
#2
Member
ok, here's how to calculate log10 from natural log
Log10 = Log(value) / Log(10)
the opposite way around:
10^value
WIN 2000 Prof. / WIN 98 / WIN 95, IE6.0, Mathematica 4.0
Visual Studio Enterprise 6.0 sp5
-
Sep 3rd, 2001, 05:27 AM
#3
PowerPoster
Damn beat me! 
VB Code:
Private Sub Command1_Click()
x = 100000
Label1 = Log(x) / Log(10)
y = Val(Label1.Caption)
Label2 = 10 ^ y
End Sub
-
Sep 3rd, 2001, 05:30 AM
#4
Thread Starter
Lively Member
-
Sep 3rd, 2001, 09:22 AM
#5
transcendental analytic
replace log(10) with 2.30258509299405
since that's a totally unnessesary computation
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|