HP 49G: Challenge - Truncate a Long Real
|
07-07-2015, 06:33 AM
Post: #2
|
|||
|
|||
RE: HP 49G: Challenge - Truncate a Long Real
Hi Gerald,
you may use strings for truncating a long real, e.g: 5.12345678901 ENTER ->STR this converts your real into the string "5.12345678901" now enter: 1 ENTER 5 ENTER SUB ENTER this truncates your string after the 5th charachter: "5.123" The last step is to convert the string back to a real: STR-> ENTER This leaves 5.123 on Level 1 of the stack. The only problem is that you need to know the number of charachters to the left of the decimal point because the SUB command strictly counts from left to right. Hope this helps Best regards Karl |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
HP 49G: Challenge - Truncate a Long Real - Gerald H - 07-06-2015, 07:49 PM
RE: HP 49G: Challenge - Truncate a Long Real - Karl-Ludwig Butte - 07-07-2015 06:33 AM
RE: HP 49G: Challenge - Truncate a Long Real - Gerald H - 07-07-2015, 06:38 AM
RE: HP 49G: Challenge - Truncate a Long Real - Karl-Ludwig Butte - 07-07-2015, 12:25 PM
RE: HP 49G: Challenge - Truncate a Long Real - Gerald H - 07-07-2015, 12:35 PM
RE: HP 49G: Challenge - Truncate a Long Real - Claudio L. - 07-07-2015, 01:17 PM
RE: HP 49G: Challenge - Truncate a Long Real - Gerald H - 07-07-2015, 01:54 PM
RE: HP 49G: Challenge - Truncate a Long Real - Claudio L. - 07-07-2015, 03:53 PM
RE: HP 49G: Challenge - Truncate a Long Real - Gerald H - 07-07-2015, 04:48 PM
RE: HP 49G: Challenge - Truncate a Long Real - Claudio L. - 07-07-2015, 05:48 PM
RE: HP 49G: Challenge - Truncate a Long Real - Gerald H - 07-17-2015, 07:58 AM
|
User(s) browsing this thread: 2 Guest(s)