Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Roots and powers playing nicely together...
#29
Pete, what you gave as an example is an Excel function. Or am I wrong?
"You can use the Excel LOG10 function to find the base 10 logarithm of a number. For example, =LOG10(100) returns 2 and =LOG10(1000) returns 3." - That is correct.

Oh, now I can't see through it anymore. This is mayhem!  Cry

And this is the result with the Log-Function in QBasic64:

Code: (Select All)
'Logarithmusuebung mit "Log" - 1. Okt. 2022

Option _Explicit

Declare Function LogX(wert As Double) As Long

Dim As Double wert
Dim As Integer i

Input "Log(i): ", i

For i = 1 To i
  wert = Log(i)
  Print Using "####.#####"; wert
Next

Print
'Log(100)
Print Using "Log: ####.##### -- From: MS QBasic - Programmer's Guide"; Log(100)

End 'Programm

Function LogX (value As Double) Static

  Dim ergebnis As Double

  ergebnis = Log(value) / Log(10)
  LogX = ergebnis
End Function
Reply


Messages In This Thread
RE: Roots and powers playing nicely together... - by Kernelpanic - 10-01-2022, 10:16 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  I advanced my AI to a black jack playing robot. Pete 1 578 04-17-2024, 12:46 AM
Last Post: PhilOfPerth
  Pascal's Triangle and nth roots. Pete 2 864 09-26-2022, 04:15 PM
Last Post: Pete
  Newton had a fun way to approximate general roots... Pete 35 6,252 09-22-2022, 12:38 AM
Last Post: Kernelpanic
  String math: Whole # powers easy, decimal powers!!! Pete 0 509 09-12-2022, 08:58 PM
Last Post: Pete

Forum Jump:


Users browsing this thread: 1 Guest(s)