The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 795 - File: showthread.php PHP 7.4.33 (FreeBSD)
File Line Function
/showthread.php 795 errorHandler->error





Post Reply 
HP 50G: Long Reals Run Faster than Reals?
08-15-2015, 04:35 PM (This post was last modified: 08-15-2015 04:36 PM by Gerald H.)
Post: #1
HP 50G: Long Reals Run Faster than Reals?
Below are two programmes to find the number of prime integers up to the input limit.

The programme using long reals requires less time than the one with reals.

Why?

Code:

::
  CK1&Dispatch
  BINT1
  ::
    DUP
    %LN
    DUPUNROT
    %/
    DUPUNROT
    OVER
    %IP
    %3
    %-
    COERCE
    ONE_DO
    INDEX@
    UNCOERCE
    %*
    OVER
    %/
    ROTOVER
    %+
    3UNROLL
    LOOP
    2DROP
  ;
;

::
  CK1&Dispatch
  BINT1
  ::
    %>%%
    DUP
    %%LN
    DUPUNROT
    %%/
    DUPUNROT
    OVER
    %%INT
    %%3
    %%-
    %%>%
    COERCE
    ONE_DO
    INDEX@
    UNCOERCE%%
    %%*
    OVER
    %%/
    ROTOVER
    %%+
    3UNROLL
    LOOP
    2DROP
    %%>%
  ;
;
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
HP 50G: Long Reals Run Faster than Reals? - Gerald H - 08-15-2015 04:35 PM



User(s) browsing this thread: 1 Guest(s)