Perdon, la cita quedo mal, es esta:

> Just like Python floats, the printed form of a BigFloat shows only a decimal 
> approximation to the exact stored value, for the benefit of human readers.




El 20/03/13 13:00, joe di castro escribió:
> Dentro de la documentación del paquete BigFloat
> (http://pythonhosted.org/bigfloat/#trigonometric-functions) dice algo
> muy interesante:
> 
>> Just like Python floats, the printed form of a BigFloat shows only a >
> decimal approximation to the exact stored value, for the benefit of > >
> human readers.
> 
> Puede que por ahí vayan los tiros en este asunto.
> 
> 
> El 20/03/13 12:00, Chema Cortes escribió:
>> Supongo que habrá una explicación. Si realizo el siguiente cálculo:
>>
>> In [13]: import math
>>
>> In [14]: math.tan(math.pi/2)
>> Out[14]: 1.633123935319537e+16
>>
>> Aunque no esperaba que me diese la solución correcta de
>> float("+inf")/float("-inf"), me resulta muy corto para el tamaño
>> máximo que podría tener un double:
>>
>> In [16]: sys.float_info.max
>> Out[16]: 1.7976931348623157e+308
>>
>> He comprobado que pasa lo mismo con scala e, incluso, en el buscador
>> de google (tal vez sea que google usa también python):
>>
>> https://www.google.com/search?q=tan(pi%2F2)
>>
>> ¿Existe alguna explicación?¿Algún modo de ajustar más el resultado a
>> infinito (sin ser la solución trivial de comprobar los parámetros de
>> entrada)?
>>
>>
>>
>> --
>> Hyperreals *R: http://ch3m4.org/blog
>> Quarks, bits y otras criaturas infinitesimales
>> _______________________________________________
>> Python-es mailing list
>> Python-es@python.org
>> http://mail.python.org/mailman/listinfo/python-es
>> FAQ: http://python-es-faq.wikidot.com/
>>
> 
> 


-- 
joe di castro
http://joedicastro.com
_______________________________________________
Python-es mailing list
Python-es@python.org
http://mail.python.org/mailman/listinfo/python-es
FAQ: http://python-es-faq.wikidot.com/

Responder a