(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!