[sage-support] Re: Error in abc.n(digits=5)

2008-12-26 Thread Alex Ghitza
Hello,

I am unable to reproduce the error you obtained.  Here is what I get in
3.2.2:


--
| Sage Version 3.2.2, Release Date: 2008-12-18   |
| Type notebook() for the GUI, and license() for information.|
--
sage: proofStrain,f_y,gamma_ms = 0.002, 250, 1.1499
sage: abc = 3150/(2000*(proofStrain + 5.00e-6*f_y/gamma_ms) + 7)
sage: abc
239.108910891089
sage: abc.n(digits=5)
239.11


Best,
Alex





-- 
Alex Ghitza -- Lecturer in Mathematics -- The University of Melbourne --
Australia -- http://www.ms.unimelb.edu.au/~aghitza/

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Floatting point LLL Revisited

2008-12-26 Thread Paul Zimmermann

   Dear Santanu,

   I am Santanu Sarkar,research fellow, from Indian Statistical
   Institute.
   I use SAGE in my research. Can you please tell me is there any
   function in SAGE by which I can reduce a lattice whose entries are
   floating point? Note that LLL algorithm
   can not be use in this case and Floatting point LLL Revisited by
   Phong Nguyen and
Damien Stehlé can be use here. If you have any soure code for this
   purpose kindly send me.

first the title Floating point LLL Revisited refers to the use of
floating-point numbers *inside* the LLL algorithm, while the inputs are
usually integers.

Now if you have floating-point *inputs*, a simple trick is to convert them to
integers, for example round(C*m[i,j]) where C is a large constant. If all
your m[i,j] are of the same order of magnitude, and of the same precision,
then C=2^k might even perform an exact conversion (don't forget to divide
your reduced vectors by C at the end).

Damien Stehlé (in cc) might add more details.

Paul Zimmermann

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: linking problems due to inconsistent libraries

2008-12-26 Thread mabshoff



On Dec 25, 1:29 pm, gerhard ge01...@yahoo.de wrote:

Hi Gerhard,

 Well, I got myself in trouble again:

 I wanted to consolidate my installation of R
 to avoid maintaining two versions with two sets of libraries:
 I took a current version of R (2.8.0 Patched (2008-11-24 r47019)
 and rpy-1.0.3, patched them to match the patches for 2.6 in the spkg,
 compiled and installed. Seems to work.

 The problem has to do with inconsistent libraries:
 I am using Fedora 10, which has
 g++ (GCC) 4.3.2 20081105 (Red Hat 4.3.2-7).

 1) A problem I would ignore:
 In the sage environment, firefox fails due
 to inconsistent libraries (in fact, the pb is with sqlite3),
 resulting in bookmarks getting lost
 and the page forward/backward keys
 becoming inoperable.
 The R command 'help.start()' therefore fails altogether.

 2) the problem I do want to fix:
 from R, the command
              install.packages('rggobi')
 fails with
              Gtk-Message: Failed to load module gnomebreakpad

 because it attempts to link two inconsistent libraries:
              sage-3.2.2/local/lib/gcc-lib/i686-pc-linux-gnu/4.0.3/
 libgcc_s.so.1
              /usr/lib/libstdc++.so.6

The is a libgcc_s.so.1 picked p from the binary G95 that Sage ships.

 I would love to hear ideas of how to get around this one?
 Maybe get a copy of 4.0.3/libstdc++.so?

Nope, build a copy of Sage that doesn't use the binary G95, but the
system gfortran compiler. From README.txt:

NOTE: If you're using Fortran on a platform without g95 binaries
included
  with Sage, e.g., Itanium, you must use a system-wide gfortran.
You
  have to explicitly tell the build process about the fortran
  compiler and library location.  Do this by typing

  export SAGE_FORTRAN=/exact/path/to/gfortran
  export SAGE_FORTRAN_LIB=/path/to/fortran/libs/libgfortran.so

Deleting the G95 binary and rebuilding the spkgs which use Fortran
will also work, but that is a rather complicated thing to do unless
you know exactly what you are doing :)

Let us know if you run into any trouble.

 thank you all, sage has proved extremely useful!

 -gerhard

Cheers,

Michael
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] How to install sage in Fedora Core 5

2008-12-26 Thread Deba

Which package version and how to install in sage?
Thanks

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: How to install sage in Fedora Core 5

2008-12-26 Thread mabshoff



On Dec 26, 1:57 am, Deba debabrata...@gmail.com wrote:

Hi Deba,

 Which package version and how to install in sage?

I doubt any of the binary packages will work since they are based on
FC9, but gcc seems recent enough in FC5 that you could try building
Sage from source.

 Thanks

Cheers,

Michael
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Error in abc.n(digits=5)

2008-12-26 Thread H . S . Rai

On Fri, Dec 26, 2008 at 3:55 PM, Alex Ghitza aghi...@gmail.com wrote:
 Hello,

 I am unable to reproduce the error you obtained.  Here is what I get in
 3.2.2:

Mine is SAGE Version 3.1.4, Release Date: 2008-10-20

The complete sage code is below signature. I don't think version will
be issue, as I am doing very basic things.

Please see if code below work fine for abc.n(digits=5)

With regards,

-- 
H.S.Rai



var('b,D,d,Ast,barTdia,barTno')
var('f_ck,f_y,f_s,epsilon_c,epsilon_s,E_s,proofStrain')
var('dPrimeT,l,w_s,uw_c,P,gamma_ms,gamma_mc,gamma_f')
var('x_u')
var('k_1, k_2')
f_av = k_1*f_ck
epsilon_c = .0035
epsilon_sMin = f_y/gamma_ms/E_s + proofStrain
E_s = RealNumber('200e3')
C = b*x_u*f_av
A_st = pi/Integer(4)*barTdia**Integer(2)*barTno
T = A_st*f_s
eqStrainComp = epsilon_s/(d - x_u) == epsilon_c/x_u
eqStrainCompSol = solve(eqStrainComp,x_u)
epsilon_sMin = f_y/gamma_ms/E_s + proofStrain
eqEquilibH = C == T
eqEquilibHSol = solve(eqEquilibH,x_u)
xuAct = eqEquilibHSol[0].rhs()
b = 250; D = 500; dPrimeT = 50; barTdia = 16; barTno = 4;
l = 6; f_ck = 20; f_y = 250; uw_c = 25; proofStrain = .002;
gamma_ms = 1.15; gamma_mc = 1.5; gamma_f = 1.5;
k_1 = 0.36; k_2 = .42;
f_s = f_y / gamma_ms;
d = D - dPrimeT
epsilon_s = epsilon_sMin
xuActCal = xuAct(f_s=217.39, barTdia=16, barTno=4, b=250, k_1=0.359,f_ck=20)
x_ul = eqStrainCompSol[0].rhs()
x_ulCal = x_ul(d=d,epsilon_s = epsilon_sMin)
abc = x_ulCal

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Error in abc.n(digits=5)

2008-12-26 Thread mabshoff



On Dec 26, 6:22 am, H.S.Rai hardeep@gmail.com wrote:
 On Fri, Dec 26, 2008 at 3:55 PM, Alex Ghitza aghi...@gmail.com wrote:
  Hello,

Hi,

  I am unable to reproduce the error you obtained.  Here is what I get in
  3.2.2:

 Mine is SAGE Version 3.1.4, Release Date: 2008-10-20

 The complete sage code is below signature. I don't think version will
 be issue, as I am doing very basic things.

Well, bugs are fixed all the time, so a two months old version can be
quite outdated.

 Please see if code below work fine for abc.n(digits=5)

It blows up for me in 3.2.2, so this is a bug.

 With regards,

 --
 H.S.Rai

Cheers,

Michael

 

 var('b,D,d,Ast,barTdia,barTno')
 var('f_ck,f_y,f_s,epsilon_c,epsilon_s,E_s,proofStrain')
 var('dPrimeT,l,w_s,uw_c,P,gamma_ms,gamma_mc,gamma_f')
 var('x_u')
 var('k_1, k_2')
 f_av = k_1*f_ck
 epsilon_c = .0035
 epsilon_sMin = f_y/gamma_ms/E_s + proofStrain
 E_s = RealNumber('200e3')
 C = b*x_u*f_av
 A_st = pi/Integer(4)*barTdia**Integer(2)*barTno
 T = A_st*f_s
 eqStrainComp = epsilon_s/(d - x_u) == epsilon_c/x_u
 eqStrainCompSol = solve(eqStrainComp,x_u)
 epsilon_sMin = f_y/gamma_ms/E_s + proofStrain
 eqEquilibH = C == T
 eqEquilibHSol = solve(eqEquilibH,x_u)
 xuAct = eqEquilibHSol[0].rhs()
 b = 250; D = 500; dPrimeT = 50; barTdia = 16; barTno = 4;
 l = 6; f_ck = 20; f_y = 250; uw_c = 25; proofStrain = .002;
 gamma_ms = 1.15; gamma_mc = 1.5; gamma_f = 1.5;
 k_1 = 0.36; k_2 = .42;
 f_s = f_y / gamma_ms;
 d = D - dPrimeT
 epsilon_s = epsilon_sMin
 xuActCal = xuAct(f_s=217.39, barTdia=16, barTno=4, b=250, k_1=0.359,f_ck=20)
 x_ul = eqStrainCompSol[0].rhs()
 x_ulCal = x_ul(d=d,epsilon_s = epsilon_sMin)
 abc = x_ulCal
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: axes label in plot3d

2008-12-26 Thread Jason Grout

pong wrote:
 There is an older post about this issue:
 
 http://groups.google.com/group/sage-support/browse_thread/thread/ecdf6f75295ad76d
 
 however the reply button is missing there (only reply to author is
 available).
 
 There are some problems in using text3d as a solution of adding axes
 labels to a 3d plot:
 
 1) text3d does not seem to aware of latex input (while text does)
 
 2) The labels added by text3d disappear if one use Tachyon to show the
 plot.
 
 I was hoping to get around these by looking at the code for text3d.
 Hum..  I can locate text.py but somehow couldn't find text3d.py (maybe
 it's provided by a file with a different name). Any hint?
 

Generally, you can find the filename in the help for the function.  For 
text3d, typing text3d? gives:


Type:   function
Base Class: type 'function'
String Form:function text3d at 0xaa7eae4
Namespace:  Interactive
File: 
/home/grout/sage/local/lib/python2.5/site-packages/sage/plot/plot3d/shapes2.py
Definition: text3d(txt, (x, y, z), **kwds)
Docstring:

 Display 3d text.



Note the File: part above; that tells you what file the function is 
defined in (plot/plot3d/shapes2.py).

Jason


 
  
 


--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---