LOG(x,y) function doesn't seem to work in LibreOffice Basic

The following function in a LibreOffice Basic module returns the value 4.60517018598809, instead of a value of log 100 base 10, or 2. I’m new to LibreOffice macros, so do they have a separate set of functions from those available in Calc?

Function TEST()
	TEST = LOG(100,10)
End Function

Doc for this function:

https://help.libreoffice.org/6.4/en-US/text/sbasic/shared/03080202.html?DbPAR=BASIC#bm_id3149416

Yes, spreadsheet functions and BASIC functions are absolutely unrelated; it’s inevitable that some names coincide - especially when they have a natural name for the function. You may see the difference of BASIC function documentation (provided by mauricio) vs spreadsheet function.

See also tdf#131382.

If you want to use a Calc function inside a BASIC program you must use an LibreOffice API call.

Example: Calling Calc functions in Basic:

Function Test(x, y)
    Dim oService As Object
    oService = createUnoService("com.sun.star.sheet.FunctionAccess")
    REM Always use the function English name
   Test = oService.callFunction("LOG",Array(x,y))
End Function

https://help.libreoffice.org/7.0/en-US/text/sbasic/shared/03131600.html?DbPAR=BASIC#bm_id731561653332192