The following warnings occurred:
Warning [2] Undefined array key 235701 - Line: 275 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 275 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined variable $thread - Line: 295 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 295 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Trying to access array offset on value of type null - Line: 295 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 295 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined variable $fid - Line: 295 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 295 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined array key 235701 - Line: 331 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 331 errorHandler->error_callback
/inc/plugins/threaded_mode.php 304 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined variable $theme - Line: 3 - File: inc/plugins/threaded_mode.php(305) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php(305) : eval()'d code 3 errorHandler->error_callback
/inc/plugins/threaded_mode.php 305 eval
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Trying to access array offset on value of type null - Line: 3 - File: inc/plugins/threaded_mode.php(305) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php(305) : eval()'d code 3 errorHandler->error_callback
/inc/plugins/threaded_mode.php 305 eval
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined variable $theme - Line: 3 - File: inc/plugins/threaded_mode.php(305) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php(305) : eval()'d code 3 errorHandler->error_callback
/inc/plugins/threaded_mode.php 305 eval
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Trying to access array offset on value of type null - Line: 3 - File: inc/plugins/threaded_mode.php(305) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php(305) : eval()'d code 3 errorHandler->error_callback
/inc/plugins/threaded_mode.php 305 eval
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined variable $lang - Line: 5 - File: inc/plugins/threaded_mode.php(305) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php(305) : eval()'d code 5 errorHandler->error_callback
/inc/plugins/threaded_mode.php 305 eval
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Attempt to read property "messages_in_thread" on null - Line: 5 - File: inc/plugins/threaded_mode.php(305) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php(305) : eval()'d code 5 errorHandler->error_callback
/inc/plugins/threaded_mode.php 305 eval
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks





New empirical fit for ln(x)



#2

Hello All,

I used my latest best polynomial program to determine the best empirical-polynomial model to fit ln(x) for 1 <= x <= 10. The Excel VBA program performs power-value transformations on x and y (= ln(x)) before using these transformed values in polynomial fits. Thus, the program goes through a large number of transformed-polynomial models. The result is an 8th order polynomial:

ln(x) = a0 + a1*y + a2*y^2 + ... + a8*y^8

Where y = sqrt(x).

Here is the pseudo code with the values for the coefficients a0 through a8. The maximum absolute error for the fit I obtained is 1.54E-5. I took the values of x using the sequence 1, 1.01, 1.02, 1.03, ..., 9.99, 10.0.

function ln(x)

if x<=0 then raise error and exit

if x=1 then return 0

ln10 = 2.302585093
if x=10 then return ln10

n=0
if x>10
do while x>10
x=x/10
n=n+1
loop
elseif x<1
do while x<1
x=10*x
n=n-1
loop
end

y = sqrt(x)
z = -1.17472578289386e-03
z = z * y + 2.23235477256564e-02
z = z * y - 0.186434305125544
z = z * y + 0.899792871812638
z = z * y - 2.77773142836752
z = z * y + 5.74716024426924
z = z * y - 8.20298398274567
z = z * y + 8.74732523658923
z = z * y - 4.2482580027248

return z + n*ln10

end function

Enjoy!

Namir


Edited: 12 Dec 2012, 6:09 a.m.


Possibly Related Threads…
Thread Author Replies Views Last Post
  Best statistical fit Richard Berler 8 2,460 10-30-2013, 11:25 PM
Last Post: Walter B
  HP15c continued fraction for Ln(Gamma) Tom Grydeland 0 1,082 09-30-2013, 05:48 AM
Last Post: Tom Grydeland
  WP34s program submission: Quadratic fit Andrew Nikitin 2 1,218 06-13-2013, 02:44 AM
Last Post: Paul Dale
  e^pi - pi + 9/10^4 + 1/(10^4*ln(2) + sqrt(10)/6)^2 Gerson W. Barbosa 47 11,466 08-08-2012, 10:58 PM
Last Post: Les Koller
  Where does the 17B-II fit in? Matt Agajanian 22 5,351 03-25-2012, 10:52 AM
Last Post: Don Shepherd
  Where does the 38G fit in? Matt Agajanian 5 1,648 03-10-2012, 01:08 PM
Last Post: Marcus von Cube, Germany
  HP35 exp(ln(x)) bug, a new number found. Kiwi Geoff 4 1,471 08-27-2010, 08:45 AM
Last Post: Dieter
  Will a micro sd card fit Hp 50g? ferroburak 6 2,015 11-24-2009, 10:17 AM
Last Post: Brian Walsh
  LOG function or ln CaribbeanHP12c 21 4,768 04-09-2008, 05:47 PM
Last Post: CaribbeanHP12c
  HP-50G CASE FIT designnut 3 1,352 03-17-2008, 11:28 AM
Last Post: Namir

Forum Jump: