Revision: 1455
Author: jsuijs
Date: Mon Nov  2 12:55:22 2009
Log: removed sqrt.jal
http://code.google.com/p/jallib/source/detail?r=1455

Deleted:
  /trunk/include/jal/sqrt.jal

=======================================
--- /trunk/include/jal/sqrt.jal Sat Oct 31 15:34:12 2009
+++ /dev/null
@@ -1,75 +0,0 @@
--- Title: sqrt.jal
--- Author: Kyle York, Copyright (c) 2009, all rights reserved.
--- Adapted-by: Joep Suijs
--- Compiler: >=2.4i
---
--- This file is part of jallib (http://jallib.googlecode.com)
--- Released under the ZLIB license  
(http://www.opensource.org/licenses/zlib-license.html)
---
--- Description: this library provides sqrt for 16 and 32 bit vars, result  
is 8 or 16 bits.
---
--- Sources:
---
-
-
-function sqrt(dword in invalue) return word is
-   var dword xest
-
-   if (invalue == 0) then return 0 end if
-
-   if (invalue < 10_000) then
-      xest = 31
-   elsif (invalue < 5_000_000) then
-      xest = 600
-   elsif (invalue < 200_000_000) then
-      xest = 8000
-   else
-      xest = 40000
-   end if
-
-
-   for 4 loop
-      xest = (xest + invalue / xest) / 2
-   end loop
-
-   return word(xest)
-
-end function
-
-function sqrt16(word in x) return byte is
- var word m, y
-
- m = 0x4000
- y = 0
- while (m != 0) loop
-   var word b
-
-   b = y | m
-   y = y >> 1
-   if (x >= b) then
-     x = x - b
-     y = y | m
-   end if
-   m = m >> 2
- end loop
- return byte(y)
-end function
-
-function sqrt32(dword in x) return word is
- var dword m, y
-
- m = 0x40000000
- y = 0
- while (m != 0) loop
-   var dword b
-
-   b = y | m
-   y = y >> 1
-   if (x >= b) then
-     x = x - b
-     y = y | m
-   end if
-   m = m >> 2
- end loop
- return word(y)
-end function

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jallib" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/jallib?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to