HP-16C Programing



#8

In programing the 16-C in DECIMAL mode, is there any work-around to obtain either the INT or the FRAC function?

tm


#9

Hello, Trent;

back to some years ago, I remembered Nenad Vulic gave us a brilliant solution for this matter. Follow this thread and you'll see a very good approach from him.

Best regards.

Luiz (Brazil)


#10

Luiz,

Vulic's program works! Thank you so much.

tm


#11

If you can afford the program storage and the convenience of sign preservation is helpful, you could add a few steps to Vulic's program:

LBL A
X<0?
SF 0
ABS
ENTER
ENTER
EEX
[9]
[+]
LSTx
[-]
x>y?
[1]
[0]
ENTER
[1]
[0]
[/]
[-]
F? 0
CHS
CF 0
RTN
Unfortunately this solution won't work on my simulator because I'm using the IEEE FPU. The design of my BCD FP simulator is well advanced so this limitation will go away in the future.

Cameron

#12

Thanks for the link, Luiz. I'd missed that thread the first time 'round.

Cameron


#13

You're welcome, Cameron.

Cheers.

Luiz (Brazil)

#14

INT:

f RR f RL

FRAC:

ENTER f RR f RL -

(If you want INT to work with negative arguments, change it to this:

ENTER g ABS / g LSTx g ABS f RR f RL * )


Try them and tell me if they work.

Regards,

Gerson


#15

Gerson,

Your keystrokes don't seen to work on by machine.

tm


#16

Thanks for the feedback.

I've tested it on Emmet Gray's WRPN (HP16C Simulator). Maybe that's not an exact simulator.

In fact, on another simulator

http://www.flounder.com/hp16c.htm

rotation instructions don't seem to work in float mode, what I suppose is the behavior of the real 16C. Sorry.

Gerson.


Edited: 5 Apr 2005, 8:50 p.m.


#17

Hi Gerson, guys;

Except for the four arithmetic basic ones (+, -, × and ÷), the only arithmetic functions that work in floating point mode (actual HP16C) are square root and reciprocal (1/x). Also, number entry, stack manipulation and programming work as well. All of the integer-number related functions (bit manipulation, boolean operators, double-precision, etc.) are disabled in floating-point mode. If I am not worng, the only function disabled in integer mode operation is the reciprocal.

Cheers.

Luiz (Brazil)

Edited: 6 Apr 2005, 6:15 a.m.


Possibly Related Threads...
Thread Author Replies Views Last Post
  Bought a 16C to compensate a little Eelco Rouw 23 2,035 12-07-2013, 01:26 PM
Last Post: Eelco Rouw
  HP PRIME - APP Programing question dg1969 2 347 10-27-2013, 10:23 AM
Last Post: dg1969
  Shiny new 16C! Keith Midson 7 687 10-27-2013, 02:22 AM
Last Post: Keith Midson
  Joys of eBay: HP-32S, HP-32SII, HP-42S, HP-16C, ... Sasu Mattila 7 673 09-23-2013, 04:39 PM
Last Post: Julián Miranda (Spain)
  HP-16C simulator fhub 12 960 06-30-2013, 10:14 PM
Last Post: Robert Prosperi
  Program for HP-16c... Leonid 9 790 06-07-2013, 08:51 PM
Last Post: David Hayden
  HP 11C/12C/15C/16C case Philippe Cairic 4 607 11-06-2012, 06:04 PM
Last Post: Matt Agajanian
  Understanding HP-16C integer division Jimi 18 1,326 10-16-2012, 09:13 PM
Last Post: Eddie W. Shore
  Hack a 15C-le into a 16C? David Griffith 20 1,476 12-23-2011, 07:00 AM
Last Post: robert rozee
  has 16C memory increased? designnut 4 465 09-06-2011, 05:32 PM
Last Post: uhmgawa

Forum Jump: