User Tools

Site Tools


Sidebar

Home



G-Code


About

  Order of execution
  Parameters

G-Codes

M-Codes

Other Codes

O-Words

Comments

Functions

  abs[]
  acos[]
  active[]
  and[]
  asin[]
  atan2[]
  atan[]
  bin[]
  ceil[]
  chr[]
  cos[]
  datetime[]
  day[]
  dec[]
  defnz[]
  def[]
  deg2rad[]
  exists[]
  exp10[]
  exp2[]
  expr[][]
  exp[]
  e[]
  fix[]
  floor[]
  froms16[]
  froms32[]
  fromu16[]
  fromu32[]
  fup[]
  hex[]
  hour[]
  inc[]
  land[]
  lnand[]
  lnor[]
  lnot[]
  log10[]
  log2[]
  log[]
  lor[]
  lxnor[]
  lxor[]
  max3[]
  max[]
  millisec[]
  min3[]
  minute[]
  min[]
  mmtounit[]
  month[]
  nand[]
  nan[]
  nop[][]
  nor[]
  notexists[]
  not[]
  or[]
  pi[]
  pow[]
  rad2deg[]
  rand[]
  rounddec[]
  roundup[]
  round[]
  s16[]
  s32[]
  s8[]
  second[]
  shl[]
  shr[]
  sin[]
  sqrt[]
  sqr[]
  tan[]
  tomachine[]
  tos16[]
  tos32[]
  tou16[]
  tou32[]
  towork[]
  trunc[]
  u16[]
  u32[]
  u8[]
  unittomm[]
  xnor[]
  xor[]
  year[]

Operators

Macros

gcode:functions:func-log10

log10[]

Compute common logarithm.

Returns the common (base-10) logarithm of x.

The log10[] function is a function that returns the base-10 logarithm of a number. The base-10 logarithm is the logarithm to the base 10. It is the inverse of the power of 10 function. The input to the function is a number and the output will be a float.

For example, log10[100] would return 2.0 and log10[1000] would return 3.0

The log10() function is commonly used in mathematics, physics, engineering and other fields, such as solving equations involving base-10 logarithms, as well as in various algorithms and data analysis. It's also used in many areas of science and engineering, such as probability and statistics, finance, and physics.

It's also worth noting that the inverse of log10[] is exp10[] or 10 raised to the power of x. exp10[2] and pow[10,2] would return 100.

Syntax

log10[x]

Parameters

x Value whose logarithm is calculated.
Return Value Common logarithm of x.

Examples

#<result> = log10[1000]
(print,#<result>)

result: 8

See also

gcode/functions/func-log10.txt · Last modified: 2023/01/26 19:03 by 127.0.0.1

Page Tools