Post Reply 
WP 34S solve an integral
04-25-2015, 06:59 PM (This post was last modified: 04-25-2015 07:35 PM by BarryMead.)
Post: #30
RE: WP 34S solve an integral
(04-25-2015 10:48 AM)Dieter Wrote:  
(04-24-2015 06:37 PM)I Wrote:  Please note that x≈0? is useless in display modes other than FIX. So don't use SCI,

Well, here's a solution using x≈? Y which will work in all display modes. FIX is only required if the value in R00 or the integral is zero.

Code:
LBL 00
 0
x<> Y
∫ 01      // ∫ from 0 to x
RCL 00    // compare with value in R00
x≈? Y     // if both are approximately equal
ENTER     // then set Y = X so that...
 -        //  ...the following subtraction yields zero
RTN       // else return ∫ - R00
LBL 01
 x²
RTN

10 STO 00
SCI 3
2 ENTER 4   SLV 00
=> 3,107 E+0   in < 8 s, |error| < 1E–7

Dieter
Thanks Dieter: By testing convergence precision far away from zero you were able to preserve the relationship between displayed digits and error significance. Normally as a number approaches zero Scientific Notation display modes just reduce the power of 10 and keep the number of significant digits constant. So typically in these modes rounding near zero doesn't help. But by comparing the target value with the integral away from zero you were able to still use rounding to shorten the run time even in SCI, ENG, and ALL display modes. Nice work!
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
WP 34S solve an integral - lrdheat - 04-23-2015, 07:27 PM
RE: WP 34S solve an integral - lrdheat - 04-23-2015, 08:43 PM
RE: WP 34S solve an integral - BarryMead - 04-23-2015, 08:50 PM
RE: WP 34S solve an integral - BarryMead - 04-23-2015, 09:05 PM
RE: WP 34S solve an integral - Dieter - 04-24-2015, 12:34 PM
RE: WP 34S solve an integral - BarryMead - 04-24-2015, 02:46 PM
RE: WP 34S solve an integral - CR Haeger - 04-23-2015, 10:28 PM
RE: WP 34S solve an integral - BarryMead - 04-23-2015, 10:34 PM
RE: WP 34S solve an integral - Dieter - 04-23-2015, 10:46 PM
RE: WP 34S solve an integral - walter b - 04-24-2015, 08:57 AM
RE: WP 34S solve an integral - CR Haeger - 04-24-2015, 01:24 PM
RE: WP 34S solve an integral - Dieter - 04-24-2015, 12:16 PM
RE: WP 34S solve an integral - CR Haeger - 04-24-2015, 01:01 PM
RE: WP 34S solve an integral - Dieter - 04-24-2015, 01:09 PM
RE: WP 34S solve an integral - rprosperi - 04-24-2015, 05:53 PM
RE: WP 34S solve an integral - Thomas_Sch - 04-24-2015, 06:22 PM
RE: WP 34S solve an integral - Dieter - 04-24-2015, 06:37 PM
RE: WP 34S solve an integral - Dieter - 04-25-2015, 10:48 AM
RE: WP 34S solve an integral - BarryMead - 04-25-2015 06:59 PM
RE: WP 34S solve an integral - Dieter - 04-25-2015, 08:54 PM
RE: WP 34S solve an integral - lrdheat - 04-24-2015, 02:11 AM
RE: WP 34S solve an integral - Thomas_Sch - 04-24-2015, 06:19 AM
RE: WP 34S solve an integral - CR Haeger - 04-24-2015, 01:20 PM
RE: WP 34S solve an integral - Thomas_Sch - 04-24-2015, 07:07 PM
RE: WP 34S solve an integral - Dieter - 04-24-2015, 07:17 PM
RE: WP 34S solve an integral - Thomas_Sch - 04-24-2015, 07:30 PM
RE: WP 34S solve an integral - walter b - 04-24-2015, 10:12 PM
RE: WP 34S solve an integral - Thomas_Sch - 04-24-2015, 10:27 PM
RE: WP 34S solve an integral - lrdheat - 04-25-2015, 09:09 PM



User(s) browsing this thread: 1 Guest(s)