On Friday, April 21, 2017 at 5:12:47 PM UTC-6, Doug Telford wrote:
>
>
>
> On Friday, April 21, 2017 at 5:01:54 PM UTC-6, Doug Telford wrote:
>>
>>
>>
>> On Friday, April 21, 2017 at 3:38:11 PM UTC-6, Ralf Hemmecke wrote:
>>>
>>> On 04/21/2017 09:04 PM, Doug Telford wrote: 
>>> > 1. Is there documentaion about using aldor under fricas? 
>>>
>>> Unfortunately, the answer is more or less: no. 
>>>
>>> > How much of the aldor user's guide is applicable? 
>>>
>>> Aldor is a programming language. It comes with basically 3 libraries. 
>>>
>>> 1) axllib 
>>> 2) libaldor 
>>> 3) libalgebra 
>>>
>>> where actually libalgebra is built on top of libaldor. 
>>>
>>> When you use Aldor under FriCAS, then it basically is as if you use yet 
>>> another library (which is called "axiom" -- maybe we should rename that 
>>> to "fricas") 
>>>
>>> In this sense, everything in the Aldor User Guide that is not referring 
>>> to a library, is applicable, i.e., the language description itself. 
>>>
>>> When you use Aldor with FriCAS, you can look at 
>>>
>>>   http://fricas.github.io/api/index.html 
>>>
>>> to find out about the function/domains/categories/packages that are 
>>> available. 
>>>
>>> However, there is one big difference: you can use Aldor only to "extend" 
>>> what is already in FriCAS and you can use your programs only in a FriCAS 
>>> session but never as standalone programs. 
>>>
>>> > 2. I tried to run the example program sieve.as under fricas.  The 
>>> > program contains the function sieve and calls to sieve.  Not clear 
>>> > how to execute the progam. Is aldor under fricas only applicable to 
>>> > functions? 
>>>
>>> Simply type inside a fricas session: 
>>>
>>> )compile sieve.as 
>>>
>>> for i in 1..6 repeat ( _ 
>>>         n := 10^i; _ 
>>>         outputList ["There are ", sieve n, " primes <= ", n] _ 
>>>     ) 
>>>
>>> The following site needs some update... :-( 
>>>
>>> http://axiom-wiki.newsynthesis.org/SandBoxAldorSieve 
>>>
>>> Maybe more tomorrow... 
>>>
>>> Ralf 
>>>
>>
>>
>>
>> Thanks for the valuable information.  The only thing I noticed was that 
>> the function sieve conflicts with FriCas, so renaming it sieve2 works ok.  
>> Could you comment on when to use the include files
>>   aldor
>>   aldorio
>>   axiom
>>   axiom.as  ?
>>
>
>      also, the sieve function uses isprime, which is not a FriCAS 
> function.  Where does it find this function, since my understanding is that 
> it does not search the Aldor libraries? 
>
>>
>> --Doug 
>>
>
I tried another example from the Aldor user's guide:

1 #include "aldor"
  2 -- Compute a square root by six steps of Newton’s method.
  3 -- This gives 17 correct digits for numbers between 1 and 10.
  4 
  5 DF ==> DoubleFloat;
  6 miniSqrt(x: DF): DF == {
  7   r := x;
  8   r := (r*r + x)/(2.0*r);
  9   r := (r*r + x)/(2.0*r);
 10   r := (r*r + x)/(2.0*r);
 11   r := (r*r + x)/(2.0*r);
 12   r := (r*r + x)/(2.0*r);
 13   r := (r*r + x)/(2.0*r);
 14   r
 15 } (8) -> )co minisqrt.as
   Compiling FriCAS source code from file /home/doug/friald/minisqrt.as
      using AXIOM-XL compiler and options 
-O -Fasy -Fao -Flsp -laxiom -Mno-ALDOR_W_WillObsolete -DAxiom -Y 
$AXIOM/algebra -I $AXIOM/algebra
      Use the system command )set compiler args to change these 
      options.
   Compiling Lisp source code from file ./minisqrt.lsp
   Issuing )library command for minisqrt
   Reading /home/doug/friald/minisqrt.asy
(8) -> miniSqrt (10.0)
 
   >> System error:
   The value
  10.0
is not of type
  LIST




 

>  
>

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to