[sage-support] Re: Numerical precision
Sorry, I thought the discussion wouldn't appear. I did a more detailed post about the same question, here is the link http://groups.google.com/group/sage-support/browse_thread/thread/ba920658ffcac2d1 I am so sorry, Fidel On May 2, 1:03 pm, Fidel fidel.barr...@gmail.com wrote: Hello, I'm working in sage 3.4.1. I have a variable, x=6.12303176911189e-17, which I got from sage: x=graphs.PetersenGraph().get_pos()[0][0] I would like to ask sage to approximate te value of x up to two decimals, that is, 0.00. This is what I have tried sage: numerical_approx(x,digits=2) 6.1e-17 sage: n(x,digits=2) 6.1e-17 Is there a way of getting 0.00 as output? Thank you very much for your attention. Greetings, Fidel --~--~-~--~~~---~--~~ 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] Numerical approximation
Hello, I think I tried to post this about an hour ago, but the discussion didn't show up. So I'm doing it again, sorry in case it is repeated. I am working in sage 3.4.1 I am trying to define a function to get the LaTeX string of a graph, so I am trying to convert a number to string. I have x=6.1230317691118863e-17, which I got from sage: x=graphs.PetersenGraph().get_pos()[0][0] I would like a two decimal approximation of x, that is 0.00. I have tried sage: numerical_approx(x,digits=2) 6.1e-17 sage: n(x,digits=2) 6.1e-17 Is there a way to get 0.00 as output? Thanks in advance for your attention and help. Greetings, Fidel --~--~-~--~~~---~--~~ 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] Numerical precision
Hello, I'm working in sage 3.4.1. I have a variable, x=6.12303176911189e-17, which I got from sage: x=graphs.PetersenGraph().get_pos()[0][0] I would like to ask sage to approximate te value of x up to two decimals, that is, 0.00. This is what I have tried sage: numerical_approx(x,digits=2) 6.1e-17 sage: n(x,digits=2) 6.1e-17 Is there a way of getting 0.00 as output? Thank you very much for your attention. Greetings, Fidel --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---