Is RPN still relevant?
|
12-19-2023, 03:14 AM
Post: #37
|
|||
|
|||
RE: Is RPN still relevant?
(12-18-2023 01:50 PM)dm319 Wrote: I know some numbers - 60km to get home, the car is running at around 30kwh/100km at the moment (yes I know not good!), 15% of a 64.7kwh battery left, and the app says I'm charging at 11kW. As I walked up to my office, I pulled out my phone with free42, and had a timer running for 55 mins before I got there. \[ \frac{\frac{30 \text{kWh}}{100 \text{km}} 60 \text{km} - \frac{15}{100} 64.7 \text{kWh}}{11 \text{kW}} \approx 0.75409 \text{h} \] I would enter this as: (30/100*60-15/100*64.7)/11 Not too many parentheses, I guess. However if I want to use a fancy Lisp like Clojure I'd use: (/ (- (* (/ 30 100) 60) (* (/ 15 100) 64.7)) 11) 0.754090909090909 Don't be imitated by the many parentheses. In the Replete app the results are stored in *1, *2, *3. So you can do it a bit similar to how you would do that with RPN: (* (/ 30 100) 60) 18 (* (/ 15 100) 64.7) 9.705 (- *2 *1) 8.295 (/ *1 11) 0.754090909090909 First I wondered how you ended up with 55 minutes because my result is only 45' 15". But then I noticed that you wrote: (12-18-2023 01:50 PM)dm319 Wrote: I knew I needed a bit of a top up to get back home (…) Thus I assume that our results agree. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 5 Guest(s)