Check on mathematical identity Namir Unregistered Posts: 2,247 Threads: 200 Joined: Jun 2005 08-23-2012, 09:28 PM Hi All, Is the following identity correct? Log(1+x) = x / AGM(1, x) Log could be either ln(x) or log10(x). AGM is the average-geometric mean function (see here for definition). Namir Gerson W. Barbosa Unregistered Posts: 2,761 Threads: 100 Joined: Jul 2005 08-23-2012, 10:03 PM If the identity were true then AGM(1, x) = x/Log(1+x) Now, if x=1 then AGM(1, 1) = 1/Log(1+x) 1 = 1/Log(2) --> Log(2) = 1 But either ln(2) or log102 are different than 1. Therefore the identity does not hold. Crawl Unregistered Posts: 306 Threads: 3 Joined: Sep 2009 08-23-2012, 10:29 PM Why would you guess that was the case? In any case, the Wikipedia article itself mentions that AGM can be expressed in terms of an elliptic integral, which itself cannot be expressed as an elementary function, so there is no hope of it simplifying to log. Paul Dale Unregistered Posts: 3,229 Threads: 42 Joined: Jul 2006 08-24-2012, 12:10 AM AGM is one method that is used to calculate log to high accuracy. The 34S used this algorithm for a while. The 34S also has an AGM function built in. - Pauli Namir Unregistered Posts: 2,247 Threads: 200 Joined: Jun 2005 08-24-2012, 08:25 AM Pauli, Yep ... that equation sure works!! I set m to 16 and got very good results. Thanks! Namir Edited: 24 Aug 2012, 8:45 a.m. Namir Unregistered Posts: 2,247 Threads: 200 Joined: Jun 2005 08-24-2012, 10:52 AM What algorithm does the WP32S currently use? Namir Walter B Unregistered Posts: 4,587 Threads: 105 Joined: Jul 2005 08-24-2012, 12:54 PM Quote: What algorithm does the WP32S currently use? Dunno ;-) Namir Unregistered Posts: 2,247 Threads: 200 Joined: Jun 2005 08-24-2012, 04:31 PM Shammas Polynomials???????????!!!!!!!!!!!! Walter B Unregistered Posts: 4,587 Threads: 105 Joined: Jul 2005 08-24-2012, 05:27 PM No idea. I simply don't know a WP32S ;-) Paul Dale Unregistered Posts: 3,229 Threads: 42 Joined: Jul 2006 08-24-2012, 07:32 PM I had to set m much higher to get accurate enough results for single precision. I don't remember exactly what I set it to though. - Pauli Paul Dale Unregistered Posts: 3,229 Threads: 42 Joined: Jul 2006 08-24-2012, 07:38 PM The comment before the natural logarithm function from the 34S source code is: ```/* Natural logarithm. * * Take advantage of the fact that we store our numbers in the form: m * 10^e * so log(m * 10^e) = log(m) + e * log(10) * do this so that m is always in the range 0.1 <= m < 2. However if the number * is already in the range 0.5 .. 1.5, this step is skipped. * * Then use the fact that ln(x^2) = 2 * ln(x) to range reduce the mantissa * into 1/sqrt(2) <= m < 2. * * Finally, apply the series expansion: * ln(x) = 2(a+a^3/3+a^5/5+...) where a=(x-1)/(x+1) * which converges quickly for an argument near unity. */ ``` I don't remember making any any other refinements but might have. This is around line 750 of decn.c if you want to look at the actual code. The native decNumber library uses Newton's method after an initial estimate and this proved very slow. I then switched to the AGM code which was faster but quite a bit less accurate. I later moved to the current code which is both faster again and accurate. Even so, our code for the natural logarithm is on the slow side and a faster method would be appreciated. Unfortunately, I can't justify the use of tables of piecewise polynomial or rational approximations which seem to be the typical way to implement this function. - Pauli Les Koller Unregistered Posts: 253 Threads: 20 Joined: Jun 2012 08-25-2012, 06:23 PM On the advice of several of you users a couple weeks ago. in response to a query I posed, I purchased An Atlas of Functions, 2nd Edition, by Oldham, Myland, and Spanier. I just began to peruse the book last night (did I say I got a BRAND NEW COPY from Alibris.com for just 99 cents + s&h!!) and within 15 pages came upon a mean I had never heard of...the arithmeticogeometric mean. The text does not go a lot in to detail for the mean. Is this the same mean as the AGM? If so what a major coincidence! I am really enjoying this text. Whomever told me it is "imminently more readable" than other texts was exactly right. Question, my copy came with Equator, the Atlas Function Calculator software on CD. I will probably never need it, but decided to install it anyway. Would not work with my machine (Windows 7 Home Premium 64-bit). Has anyone successfully installed Equator on Windows 7? Paul Dale Unregistered Posts: 3,229 Threads: 42 Joined: Jul 2006 08-25-2012, 07:17 PM Yes, this is the same as the AGM. I've no ideas about the software CD, I've not yet used it and doubt I ever will. - Pauli Les Koller Unregistered Posts: 253 Threads: 20 Joined: Jun 2012 08-25-2012, 08:42 PM Hey Pauli, yea, you told me that in an email. Thanks for suggesting the book and being sure I got the right one. It is an amazing reference as well as being a very beautifully done product. I usually install the software that comes with texts like these, play with them for 1/2, maybe a whole hour, then delete the file and archive the CD. Just bothered me that this one would not install, in spite of being fairly recent (2008 I believe it was?). LHH Unregistered Posts: 91 Threads: 13 Joined: May 2012 08-25-2012, 09:50 PM Windows 7 is starting to scare me and I don't even have it yet! I still run XP on all my systems and they have been and still are absolutely trouble-free. Still I am ordering a laptop and have no choice but to get it with Win7 already installed. Many friends and business aquaintances have mentioned all sorts of troubles with Win7 so I'm a bit apprehensive about it. Does Win7 have some (backward) compatibility settings when running programs? 2008 doesn't sound that long ago but, thanks to Moore's Law and Microsoft programmers creating bloated code in the same style as our deficit spending, it's almost ancient history! Les Koller Unregistered Posts: 253 Threads: 20 Joined: Jun 2012 08-25-2012, 10:05 PM Windows 7 has the full complement of Run in Windows XXX Compatibility Modes and, as with the Compatibility function of every Windows edition ever written, NONE of them work. Ever. LHH Unregistered Posts: 91 Threads: 13 Joined: May 2012 08-25-2012, 10:34 PM That's part of the reason I keep my old machines. I have a DOS/Win 3.1-based 486 system with 5.25"/3.5" floppy drives and a couple of Pentium Win 98 machines. All still work and have come in handy. I recently extracted some old CAD drawings in .dxf from the old DOS machine and was able to import them into very current CAD programs with few problems. I also have a copy of this book coming so I'll see what happens in XP. I suppose you have checked online for a possible patch or updated version (not that we really need this calc anyway though I suppose)? Les Koller Unregistered Posts: 253 Threads: 20 Joined: Jun 2012 08-26-2012, 12:19 AM Yes, I have completed a fairly thorough google search to no avail. I will keep looking, for a day or two. Pete Wilson Unregistered Posts: 74 Threads: 1 Joined: Nov 2011 08-26-2012, 12:25 AM I find it works fine, and there is always XP Mode if you have Pro... In any case, without compatibility mode I wouldn't have been able to program my WP-34s using a serial cable. LHH Unregistered Posts: 91 Threads: 13 Joined: May 2012 08-26-2012, 01:04 AM How XP-like is it? One big problem my company has had involves Win7 problems with MIDI files and the Audio control panel in general (or should I say the lack thereof). We have firmware updates distributed as MIDI SYSEX files and they work perfectly in XP. Unfortunately they stopped working at all in Win7 (even when using some of the workarounds we've found on the Internet). It's hard to believe all the problems these version changes can cause. I spent almost a year with a brand new Dell and Windows ME trying to get some audio recording software to work. I finally installed Win 2000 and it all worked perfectly. No one could ever explain why and ME was pretty quickly abandoned. Unfortunately I happened to be one of the early adopters (and paid the price for it too!). Les Koller Unregistered Posts: 253 Threads: 20 Joined: Jun 2012 08-26-2012, 09:50 AM Pete, glad the compatibility mode worked for you. I have several, probably thousands, of files laying around here that I would love to use. When they do not run natively on a newer version of Windows, I have NEVER gotten them to work in compatibility mode. That's why, this weekend, with 650GB free space on my HDD, I am installing a dual-boot system with 7 and XP. Quickest way I know to have both. Les Koller Unregistered Posts: 253 Threads: 20 Joined: Jun 2012 08-26-2012, 11:21 AM OK, setting up a dual boot system with 7 and XP is just not worth the effort. Windows 7 Pro upgrade is about 100 bucks. I have two older systems in the house that are XP machines, missing various parts. Now, looks like I'll cobble together one machine from the two. I have tried VMWare before and had it eat a lot of data for dinner, not messing with that crap again. If didn't find 6 or 8 files a week I want to run, that will not run outside XP, I wouldn't bother. « Next Oldest | Next Newest »

 Possibly Related Threads… Thread Author Replies Views Last Post Prime Version Check Thomas Chrapkiewicz 1 1,137 10-21-2013, 10:12 AM Last Post: Han Trig Identity question Namir 13 3,519 03-04-2013, 07:45 PM Last Post: Eric Smith The answer to the second semi-mathematical puzzle Mike Reed 3 1,458 02-18-2013, 02:40 AM Last Post: Derek Walker (UK) Answer to Mathematical Puzzle Mike Reed 2 1,242 02-08-2013, 12:11 AM Last Post: LHH How to check / repair a HP 82106A module for HP41C calculator ? Eduardo Mingo 13 4,464 01-07-2013, 11:05 AM Last Post: Diego Diaz Including mathematical symbols in forum postings Nick_S 15 4,725 10-18-2012, 03:54 PM Last Post: Marcus von Cube, Germany Horrible mathematical pun Dave Shaffer (Arizona) 4 1,779 10-09-2012, 07:43 PM Last Post: Bob Patton HP-28S Mathematical Applications manual errata Tom Sauntry 2 1,388 07-25-2012, 09:54 AM Last Post: Tom Sauntry [WP 34S] Final documentation check Walter B 18 5,440 07-06-2012, 02:10 AM Last Post: Walter B The most abused phrase "Check Back Soon" Michael de Estrada 8 2,688 10-11-2011, 10:25 PM Last Post: hpnut

Forum Jump: