HP 15C and INT(1/√(1x),0,1)

01092018, 06:59 PM
Post: #21




RE: HP 15C and INT(1/√(1x),0,1)  
01102018, 01:33 PM
Post: #22




RE: HP 15C and INT(1/√(1x),0,1)
Tested on a wp34s (with the last version of the integration routine):
Regards. 

01102018, 01:43 PM
Post: #23




RE: HP 15C and INT(1/√(1x),0,1)
(01092018 06:59 PM)Dieter Wrote: OK, but at which program line did this error occur and for which xvalue (take a look at the other stack registers)? Definitely I must take again the experiment, timing and then control the line. I'll do it asap. (01102018 01:33 PM)emece67 Wrote: Tested on a wp34s (with the last version of the integration routine): so, are you saying I should also buy a WP34? Yes, I should do it (I need some other many to spend in collection...) Salvo ∫aL√0mic (IT9CLU) :: HP Prime 50g 41CX 71b 42s 39s 35s 12C 15C  DM42, DM41X  WP34s Prime Soft. Lib 

01102018, 01:54 PM
Post: #24




RE: HP 15C and INT(1/√(1x),0,1)
(01092018 06:19 PM)Dieter Wrote:(01092018 04:53 PM)Didier Lachieze Wrote: Are you using the decimal or the binary version of Free32? I recommend getting the latest version; there was a bug in the INTEG termination condition before 2.0.5 that would make it return inaccurate results in some cases. Even the latest code doesn't do very well on 1/sqrt(1x), though. 

01102018, 03:20 PM
Post: #25




RE: HP 15C and INT(1/√(1x),0,1)
(01092018 06:59 PM)Dieter Wrote: OK, but at which program line did this error occur and for which xvalue (take a look at the other stack registers)? In "Limited edition" with accuracy 1E6 the error 0 occurs after 47 minutes. The program ends in line "006 15", that's 1/x and the x is equal to 1, so the problem is the division by 0: 1/0. That doesn't occur with 1E5 (in 23 minutes) and 1E4 (in 2'30'') nor 1E3 or 1E2, in witch the result is immediate or about immediate. ∫aL√0mic (IT9CLU) :: HP Prime 50g 41CX 71b 42s 39s 35s 12C 15C  DM42, DM41X  WP34s Prime Soft. Lib 

01102018, 08:57 PM
Post: #26




RE: HP 15C and INT(1/√(1x),0,1)
(01102018 01:33 PM)emece67 Wrote: Tested on a wp34s (with the last version of the integration routine): Actually this integral isn't quite as difficul as it seems when using purely numeric (not CAS) methods, it's just a matter of using some numerical quadrature method suited to the task at hand. Just for instance my very own implementation of one such method for the barebones HP71B does return 2.000000000000 (i.e.: exactly 2 to twelve digits) in just 4 seconds when run in JF Garnier's Emu71 (about 15 min. in a real machine) using an accuracy as low as 1e4. Also, the fact that CAS can give the exact value almost instantly is completely irrelevant, most integrals cannot be managed by CAS and even slight changes to this one woul be intractable V. . All My Articles & other Materials here: Valentin Albillo's HP Collection 

01102018, 09:43 PM
Post: #27




RE: HP 15C and INT(1/√(1x),0,1)
(01102018 08:57 PM)Valentin Albillo Wrote: Also, the fact that CAS can give the exact value almost instantly is completely irrelevant, most integrals cannot be managed by CAS (...) Why do you think this is completely irrelevant? If I want to solve an integral the first step is trying to solve it symbolically and get an exact result. Either "by hand" or with a CAS. If this is not possible – and you don't know unless you tried – a numeric approach (for a definite integral) is the second option that gives at least a more or less exact approximation. Dieter 

01102018, 10:29 PM
(This post was last modified: 01102018 10:30 PM by salvomic.)
Post: #28




RE: HP 15C and INT(1/√(1x),0,1)
(01102018 09:43 PM)Dieter Wrote: If I want to solve an integral the first step is trying to solve it symbolically and get an exact result. Either "by hand" or with a CAS. If this is not possible – and you don't know unless you tried – a numeric approach (for a definite integral) is the second option that gives at least a more or less exact approximation. I agree. Actually I wanted to test numerical integral in some calculators that hasn't symbolic integration, but if I need to know the value of an integral for working purpose I search for it in a CAS machine (49, 50g, Prime...) if possible... Said that, if one doesn't remember by hearth the antiderivative (to do it by hand) and has got in that moment only a calculator like HP15 or HP41 or HP42s and so on, better trying numerical integration than nothing... Anyway, this particular integral was for me a way to test the behaviour and potentiality of some beloved calculators of ours. Salvo ∫aL√0mic (IT9CLU) :: HP Prime 50g 41CX 71b 42s 39s 35s 12C 15C  DM42, DM41X  WP34s Prime Soft. Lib 

01112018, 04:48 PM
Post: #29




RE: HP 15C and INT(1/√(1x),0,1)
A test with HP41CX and Advantage (Advanced Solutions Pac).
FX1: function Code:
Then: 0 ENTER 1, ALPHA_FX1_ALPHA, XEQ ALPHA_INTEG_ALPHA 0 in Y, 1 in X, FX1 in Alpha register, then execute INTEG (function in the module). Accuracy and times: 1E2 (FIX2) 1min 1.99 1E3 (FIX3) 13 min 1.999 1E4 (FIX4) 1h41m 1.9999 (I don't want to try 1E5 just now ...;) ) Salvo ∫aL√0mic (IT9CLU) :: HP Prime 50g 41CX 71b 42s 39s 35s 12C 15C  DM42, DM41X  WP34s Prime Soft. Lib 

01112018, 06:53 PM
Post: #30




RE: HP 15C and INT(1/√(1x),0,1)
(01112018 06:35 PM)Mike (Stgt) Wrote: Then try something else. You remember hint ii) in here: http://www.hpmuseum.org/forum/thread957...l#pid88198 ? Well, thanks a lot, Mike, I've not MoHP stuff here, but a copy is on the way to get here and it should arrive tomorrow or Monday... Please, in the meantime, if you have spare time send me via PM the V41 working link ;) I'll try asap your hint. ciao Salvo ∫aL√0mic (IT9CLU) :: HP Prime 50g 41CX 71b 42s 39s 35s 12C 15C  DM42, DM41X  WP34s Prime Soft. Lib 

01112018, 07:57 PM
Post: #31




RE: HP 15C and INT(1/√(1x),0,1)
(01112018 07:12 PM)Mike (Stgt) Wrote:(01112018 06:53 PM)salvomic Wrote: V41 working link ;) QSL! ∫aL√0mic (IT9CLU) :: HP Prime 50g 41CX 71b 42s 39s 35s 12C 15C  DM42, DM41X  WP34s Prime Soft. Lib 

01112018, 09:42 PM
(This post was last modified: 01112018 09:43 PM by Dieter.)
Post: #32




RE: HP 15C and INT(1/√(1x),0,1)
(01112018 06:35 PM)Mike (Stgt) Wrote: Do you have the MoHP CD? Did you find the PPC ROM Users's Manual there? Did you read what's written about routine IG  Integrate? I neither own a physical Advantage ROM nor the PPC ROM, but I have V41 here, which is set to a speed that very closely matches that of a real '41.  With FIX 2 set, the Advantage Pac's INTEG routine returns 1,99 after 1:34 minutes.  The PPC ROM's IG routine (which shows successive approcimations) arrives at this point after about 3 minutes.  The PPC ROM stops after two successive approximations with the same result, rounded to display precision. This requires 9:20 minutes with a final result of 2,00. BTW both ROMs have different integration algorithms. The PPC ROM's IG program is a classic Romberg method while the Advantage ROM's INTEG routine seems to implement the same (or at least a similar) method as the 34C or 15C. While no details have been officially published it was said that this is "a Romberg method" with a modified way of sampling the function values. Dieter 

01112018, 10:25 PM
Post: #33




RE: HP 15C and INT(1/√(1x),0,1)
(01112018 09:42 PM)Dieter Wrote: ... See here. Advanced Pac should use Romberg method as HP 15C, and timing are comparable, actually (I mean with classic 15, not LE). I've both Math and Advantage. The manual of Advantage warns that some functions (complex...) are the same in the module and that would be better not to use both together, however some functions in Math aren't in Advantage (Fourier, hyperbolic...), some other are in Advantage and not in Math (Vectors, TVM...), so I'm trying to use both together or, if possible, one at a time... However, the integration is more easy in Advantage and not in Math, IMHO. I haven't V41, but i41CX in iPhone, so I wonder if there is IG for it, but I think that it is not so easy to set the speed "close to real 41CX" in iPhone or iPad. More, I noted (and I told it to its author) that when it is active, i41CX in my iPhone 6 drains soon the battery... Salvo ∫aL√0mic (IT9CLU) :: HP Prime 50g 41CX 71b 42s 39s 35s 12C 15C  DM42, DM41X  WP34s Prime Soft. Lib 

01122018, 01:45 AM
Post: #34




RE: HP 15C and INT(1/√(1x),0,1)
(01112018 09:42 PM)Dieter Wrote: The PPC ROM's IG program is a classic Romberg method while the Advantage ROM's INTEG routine seems to implement the same (or at least a similar) method as the 34C or 15C. While no details have been officially published it was said that this is "a Romberg method" with a modified way of sampling the function values. In the front of the Advantage ROM manual (p. 2), it states: Quote:The rootfinding and numericalintegration routines in this pac were Probably as close to official as these things get. Bob Prosperi 

01122018, 04:18 AM
Post: #35




RE: HP 15C and INT(1/√(1x),0,1)
(11272017 01:33 AM)Carsen Wrote: I set the HP15C to a fix of 2 and integrated the integral from 0 to 1. In a time of 2 minutes and 42 seconds, I got the answer of 1.99. I tried the DM15 (SwissMicros) with FIX2 and received the 1.99 answer within 30 seconds  clearly faster. Then thought I'd try to split the difference between your tests with FIX3. The machine shut down before it could give an answer, 5 minutes later... On the TI36X Pro, within 1 minute it spat out a "DIVIDE BY 0" error.... 

01122018, 10:37 AM
(This post was last modified: 01122018 10:43 AM by Dieter.)
Post: #36




RE: HP 15C and INT(1/√(1x),0,1)
(01112018 10:25 PM)salvomic Wrote: See [url=http://www.hpmuseum.org/cgisys/cgiwrap/hpmuseum Romberg is not the same as Romberg. ;) The implementations are different. The IG code is a (slightly modified) "classic" Romberg approach. The HP Integrate code however seems to be a bit more sophisticated as it uses a different sampling method to avoid problems with periodic functions. This was explained in the respective HP Journal Kahan article, cf. August 1980 issue, p. 26: "What method underlies the ∫xy key?": Quote:The HP34C uses a Romberg method; for details consult reference 2. Several refinements were found necessary. In stead of uniformly spaced nodes, which can induce a kind of resonance or aliasing that produces misleading results when the integrand is periodic, the ∫xy key's nodes are spaced nonuniformly. (...) The article continues with further details. (01112018 10:25 PM)salvomic Wrote: and timing are comparable, actually (I mean with classic 15, not LE). The 41C is much faster than the 15C so I'd expect significantly shorter execution times. (01112018 10:25 PM)salvomic Wrote: I've both Math and Advantage. The manual of Advantage warns that some functions (complex...) are the same in the module and that would be better not to use both together, Why? Do they have the same function names so that a calling them can be ambiguous? (01112018 10:25 PM)salvomic Wrote: however some functions in Math aren't in Advantage (Fourier, hyperbolic...), some other are in Advantage and not in Math (Vectors, TVM...), And some are neither in the one nor the other. I would have expected a complete set of complex trig and hyperbolic functions along with their inverses in full precision 13digit MCode routines. (01112018 10:25 PM)salvomic Wrote: However, the integration is more easy in Advantage and not in Math, IMHO. The Math and Math/Stat ROMs include an integration program (INTG) but, as usual, both the chosen algorithm and the implementation leave significant room for improvement: it's simply the standard Simpson method without any improvements (e.g. as in this example) and the program is not coded particularly well. So on the '41 the Advantage ROM's INTEG seems to be the best choice. Dieter 

01122018, 10:57 AM
(This post was last modified: 01122018 10:58 AM by Dieter.)
Post: #37




RE: HP 15C and INT(1/√(1x),0,1)
(11272017 01:33 AM)Carsen Wrote: Then I set the 15C to a fix of 4 and attempted to integrate the integral again. In a time of 16 minutes and 28 seconds, I stopped the 15C and didn't get an answer as a result. In fact you can get the current approximation of the integral during a running calculation. This is described in appendix E of the 15C manual ("Owner's Handbook", p. 257 of the English version): "Obtaining the Current Approximation to an Integral". Dieter 

01122018, 11:12 AM
Post: #38




RE: HP 15C and INT(1/√(1x),0,1)
(01122018 10:37 AM)Dieter Wrote: Why? Do they have the same function names so that a calling them can be ambiguous?Yes, e.g. for complex operations and few other functions. I can try putting Advantage on port 3 and Math in 4 (in Catalog 2 they are listed in that order), to give Advantage the priority (it has some machine coded programs and some RPN routines...), however, if I'm not wrong, for complex it uses the same RPN routines that Math. I need Math only for hyperbolic and Fourier, mostly. (01122018 10:37 AM)Dieter Wrote: The Math and Math/Stat ROMs include an integration program (INTG) but, as usual, both the chosen algorithm and the implementation leave significant room for improvement: ... Right, indeed. Salvo ∫aL√0mic (IT9CLU) :: HP Prime 50g 41CX 71b 42s 39s 35s 12C 15C  DM42, DM41X  WP34s Prime Soft. Lib 

01122018, 06:11 PM
Post: #39




RE: HP 15C and INT(1/√(1x),0,1)
(01122018 04:18 AM)JimP Wrote: I tried the DM15 (SwissMicros) with FIX2 and received the 1.99 answer within 30 seconds  clearly faster. Then thought I'd try to split the difference between your tests with FIX3. The machine shut down before it could give an answer, 5 minutes later... For the record, here are the results for the HP35s Integration routine. Here the function has been entered as an equation. FIX 2 returns 1,98 ±0,02 in about 7 seconds. FIX 3 returns 1,999 ±0,002 in about 1:35 minutes. So the HP35s seems to have an improved algorithm. OK, it is much faster than the original 15C, but I especially like the good error estimates. Dieter 

01122018, 07:35 PM
Post: #40




RE: HP 15C and INT(1/√(1x),0,1)
(01122018 07:10 PM)Mike (Stgt) Wrote:(01122018 10:37 AM)Dieter Wrote: The 41C is much faster than the 15C so I'd expect significantly shorter execution times. Take a look at Carsen's result: (11272017 01:33 AM)Carsen Wrote: I set the HP15C to a fix of 2 and integrated the integral from 0 to 1. In a time of 2 minutes and 42 seconds, I got the answer of 1.99. As noted, the 41C Advantage ROM's INTEG does it in 1:34 minutes. As opposed to 2:42 on the 15C. Also take a look at the 8queens benchmark: HP15C: 1:19'10" HP41C: 0:17'35" So I think it is obvious that the 15C is significantly slower than the 41C. However, how much slower seems to depend on various factors. Dieter 

« Next Oldest  Next Newest »

User(s) browsing this thread: