Subject: Simple question about calculation using Maxima
From: Mario Rodriguez
Date: Wed, 20 May 2009 22:35:35 +0200
>> Hello,
>> sorry for writing this very simple question.
>> I am new to Maxima and all mathematics computation environments.
>> I wanted to do a simple calculation, like this:
>>
>> (%i39) 3+4;
>> (%o39) 7
>>
>> it works perfectly
>>
>> but then I want to do something like this:
>> (%i40) 3+4+log(10);
>> (%o40) log(10)+7
float(%);
transforms into floating point Maxima's last result.
>> I wanted to get the result as a number, and not an expression. Is it possible?
>>
>> I have another example:
>>
>> (%i23) b=2;
I think you mean
b:2;
>> m(p) := 0.5*b^(1-p);
>> f(x,vr,p) := -[0.3+log(m(p)+(abs(vr-x))/abs(x))];
>> (%o23) b=2
>> (%o24) m(p):=0.5*b^(1-p)
>> (%o25) f(x,vr,p):=-[0.3+log(m(p)+abs(vr-x)/abs(x))]
>>
>> (%i29) f(1,1,32);
>> (%o29) [-log(0.5/b^31)-0.3]
>>
>> I wanted to get the result (this is the digse calculation with some
>> dummy input data)
>>
>> How could I force Maxima to give me the result as a number?
>>
>> thank you,
>> Oscar