Log10.htm 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <html>
  2. <head>
  3. <title>Blitz3D Docs</title>
  4. <link rel=stylesheet href=../css/commands.css type=text/css>
  5. </head>
  6. <body>
  7. <h1>Log# ( x# )</h1>
  8. <h1>Parameters</h1>
  9. <table>
  10. <tr>
  11. <td>
  12. x = any positive number.
  13. </td>
  14. </tr>
  15. </table>
  16. <h1>Description</h1>
  17. <table>
  18. <tr>
  19. <td>
  20. Common logarithm of x. This is the inverse of raising 10 to a power. <br />
  21. <br />
  22. y = Log10( x ) means y satifies x = 10 ^ y.
  23. </td>
  24. </tr>
  25. </table>
  26. <h1><a href=../2d_examples/Log10.bb>Example</a></h1>
  27. <table>
  28. <tr>
  29. <td>
  30. ; Log10 example <br />
  31. <br />
  32. ; NaN means "Not a Number", the numerical result is invalid. <br />
  33. <br />
  34. HidePointer <br />
  35. <br />
  36. ; First, what happens with non-positive numbers... <br />
  37. <br />
  38. Print "Log10( -1 ) = " + Log10( -1 ) <br />
  39. Print "Log10( 0 ) = " + Log10( 0 ) <br />
  40. Print <br />
  41. <br />
  42. ; ... and now some well behaved numbers... <br />
  43. <br />
  44. x# = 1.0 / 4096.0 ; small positive number <br />
  45. <br />
  46. For n = 1 To 15 <br />
  47. <br />
  48. Print "Log10( " + LSet( x, 13 ) + " ) = " + Log10( x ) <br />
  49. x = 8 * x <br />
  50. <br />
  51. Next <br />
  52. <br />
  53. WaitKey() : End
  54. </td>
  55. </tr>
  56. </table>
  57. <br>
  58. <a target=_top href=../index.htm>Index</a><br>
  59. <br>
  60. Click <a href=http://www.blitzbasic.co.nz/b3ddocs/command.php?name=Log10&ref=comments target=_blank>here</a> to view the latest version of this page online</body>
  61. </html>