130 likes | 354 Views
Speedy Gonzales Using the HP48G solver and the LongFLoat library for extended precision equation solutions. The Speedy Gonzales problem. Speedy Gonzales wants to get from A to C as fast as possible. Problem: optimal path? minimal time? Challenge: 48 digits accuracy solve on an HP48.
E N D
Speedy Gonzales Using the HP48G solverand the LongFLoat libraryfor extended precisionequation solutions
Speedy Gonzales wants to get from A to C as fast as possible. Problem: • optimal path? • minimal time? Challenge: • 48 digits accuracy • solve on an HP48
Observation • Analogy with beam travelling through planparallel media with different propagation speeds • Relationship between incidence angles: Snell’s law
Constraint: arrive in C • Project field lengths using incidence angles • Eliminate a1 & a2 using Snell’s law
Solver Equation • Using transform variable for computation speed • No LongFloat trigonometric function calls!
Travelling time • Even for non-optimal incidence angles • Wide sa3 validity range
The LongFLoat library • Numbers stored as string objects • Specific commands
Using LongFloats with the Solver • Standard BCD reals for variables • Use real component variableswith non-overlapping mantissa ranges:
Using LongFloats with the Solver • Function output must be BCD real • Use subtractive cancellation as advantage:
Using the Multiple Equations Solver • Define set of equations with increasing number of component variables:
The MES solution • LNGSLVprogram initialises the MES: