User Tools

Site Tools


fscale

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
fscale [2018/03/31 14:20] – external edit 127.0.0.1fscale [2024/01/05 00:22] (current) – external edit 127.0.0.1
Line 1: Line 1:
-      rem Expo .... Rev 2.0 +<code bb4w> 
-      rem A J Tooth // October 2015+      REM Expo .... Rev 2.0 
 +      REM A J Tooth // October 2015
  
       *FLOAT64       *FLOAT64
-      mode 14 : off colour 132,50,0,0 : colour 132 : cls+      MODE 14 : OFF COLOUR 132,50,0,0 : COLOUR 132 : CLS
  
-      input tab(5,5);"Enter a value; ";X+      INPUT TAB(5,5);"Enter a value; ";X
  
-      ResB = exp(X)+      ResB = EXP(X)
  
-      print tab(5,5);"BBC version of EXP(";X;")=";ResB+      PRINT TAB(5,5);"BBC version of EXP(";X;")=";ResB
  
-      Res = fn_EXP(1.0*X)+      Res = FN_EXP(1.0*X)
  
-      print tab(5,10);"ASM version of EXP(";X;")= ";Res+      PRINT TAB(5,10);"ASM version of EXP(";X;")= ";Res
  
-      a$=get+      a$=GET
-      quit +      QUIT 
-      rem End of Program =============================================== +      REM End of Program =============================================== 
-      rem ==============================================================+      REM ==============================================================
  
-      rem Exponential routine +      REM Exponential routine 
-      def fn_EXP(X#) +      DEF FN_EXP(X#) 
-      local Res# +      LOCAL Res# 
-      private xpo%,P%,opt&+      PRIVATE xpo%,P%,opt&
  
-      if xpo% = 0 then+      IF xpo% = 0 THEN
      
-        dim xpo% 100+        DIM xpo% 100
      
-        for opt& = 0 to step 2+        FOR opt& = 0 TO STEP 2
          
           P% = xpo%           P% = xpo%
Line 55: Line 56:
           ret           ret
           ]           ]
-        next opt& +        NEXT opt& 
-      endif+      ENDIF
  
-      call xpo%, X#, Res#+      CALL xpo%, X#, Res#
  
       = Res#       = Res#
-      rem ====================================================================+      REM ====================================================================
  
 +</code>
fscale.1522506045.txt.gz · Last modified: 2024/01/05 00:17 (external edit)