/g/ - Technology

What's your setup?


New Reply[×]
Name
Sage
Subject
Message
Files Max 5 files47.7MB total
Tegaki
Password
[New Reply]


afa7dce806f18167dbcce881a25cf386e9d9cc366c8c08ab1f0c10a5c4f59127.jpg
[Hide] (80.4KB, 500x314) Reverse
I just learned about the cool indirection feature of my SwissMicros DM-15L (HP-15C), but there was no calculator thread here and I do not want to patronize 4cuck /g/ (full of tim apple cucks).

I have a gift: a polynomial subroutine in which x (as in f(x)) is on the stack and coefficients a_0 .. a_k are registers 0 .. k, k being degree stored in the Index "I" register [and not the index "(i)" register].  I know there's a longstanding practical algorithm for the HP-15C, I just wrote this mainly to play with the Index "I" register and it's exactly 6 registers of instruction code:

6 Registers of Instruction
Polynomial Degree in Index Register
Polynomial Co-efficients in Registers 0 .. Degree
Ensure DM-15L memory is set: input Degree value, then do f Dim (i)

001- 42,21,0 "LBL 0" 
002- 45,25 "RCL I" 
003- 43,44 "INT" 
004- 1 "1" 
005- 26 "EEX" 
006- 3 "3" 
007- 10 "/" 
008- 1 "1" 
009- 36 "ENTER"
010- 1 "1" 
011- 26 "EEX" 
012- 5 "5" 
013- 16 "CHS" 
014- 40 "+" 
015- 40 "+" 
016- 44,25 "STO I" 
017- 34 "X<>Y" 
018- 45,0 "RCL 0" 
019- 42,21,.0 "LBL .0" 
020- 34 "X<>Y" 
021- 36 "ENTER" 
022- 36 "ENTER" 
023- 33 "R↓" 
024- 33 "R↓" 
025- 45,25 "RCL I" 
026- 43,44 "INT" 
027- 14 "yˣ" 
028- 45,24 "RCL (i)" 
029- 20 "*" 
030- 40 "+" 
031- 42,6,25 "ISG I" 
032- 22,.0 "GTO .0" 
033- 45,25 "RCL I" 
034- 43,44 "INT" 
035- 1 "1" 
036- 30 "-" 
037- 44,25 "STO I" 
038- 43,35 "CLx" 
039- 40 "+" 
040- 43,32 "RTN" 
Replies: >>171
6a26a2b8b585dd3cbacf72cca601d0c9d8574d3b7ee8f886485c840b9273f00a.jpg
[Hide] (298.8KB, 1024x1024) Reverse
>>170 (OP) 
Setting registers 0-9 is setting coefficients 0-9, registers .0-.9 sets coefficients 10-19, then to set coefficients 20+ one needs to use the indirection register "(i)" by setting the Index register "I" to the coefficient (register) number then setting "(i)" to the desired coefficient value.  Finally, set the Index "I" to the highest coefficient (should be already if you entered them starting lowest order first), then put a value in on the screen and press GSB 0.  Result is the value ef the polynomial at the input.

To encode x²² - 2 x²⁰ + 1, do:
f CLEAR REGS
f CLEAR Σ
1 STO 0
20 STO "I"
2 CHS STO "(i)"
22 STO "I"
1 STO "(i)"

Then input an x-value (say 1.5) and press GSB, then 0.
1.5 GSB 0

One should get 832.314183...
This calculator will teach you to think in assembly, nice choice OP!  I grew up with a TI in school, but have come to appreciate HP-style (ironically after being gifted a modern HP15C collectors edition).  RPN entry is the absolute GOAT for expression entry, and I do like seeing where the DB48X project is going with symbolic pretty-print RPN entry on SwissMicros platform...
watch?v=993dmoDdybs.00:04:36.843.jpg
[Hide] (156.6KB, 1920x1080) Reverse
M-x calc in Emacs is really capable and fun even.

“Calc” is an advanced calculator and mathematical tool that runs as part
of the GNU Emacs environment.  Very roughly based on the HP-28/48 series
of calculators, its many features include:

   • Choice of algebraic or Reverse Polish notation (RPN), i.e.
     stack-based, entry of calculations.

   • Arbitrary precision integers and floating-point numbers.

   • Arithmetic on rational numbers, complex numbers (rectangular and
     polar), error forms with standard deviations, open and closed
     intervals, vectors and matrices, dates and times, infinities, sets,
     quantities with units, and algebraic formulas.

   • Mathematical operations such as logarithms and trigonometric
     functions.

   • Programmer’s features (bitwise operations, non-decimal numbers).

   • Financial functions such as future value and internal rate of
     return.

   • Number theoretical features such as prime factorization and
     arithmetic modulo M for any M.

   • Algebraic manipulation features, including symbolic calculus.

   • Moving data to and from regular editing buffers.

   • Embedded mode for manipulating Calc formulas and data directly
     inside any editing buffer.

   • Graphics using GNUPLOT, a versatile (and free) plotting program.

   • Easy programming using keyboard macros, algebraic formulas,
     algebraic rewrite rules, or extended Emacs Lisp.

   Calc tries to include a little something for everyone; as a result it
is large and might be intimidating to the first-time user.  If you plan
to use Calc only as a traditional desk calculator, all you really need
to read is the “Getting Started” chapter of this manual and possibly the
first few sections of the tutorial.  As you become more comfortable with
the program you can learn its additional features.  Calc does not have
the scope and depth of a fully-functional symbolic math package, but
Calc has the advantages of convenience, portability, and freedom.

https://www.youtube.com/watch?v=993dmoDdybs
[New Reply]
3 replies | 3 files | 3 UIDs
Connecting...
Show Post Actions

Actions:

Captcha:

- news - rules - faq - contact -
- telegram - simplex - irc -
jschan 1.7.3