[BangPypers] Exponential : warning overflow

Santosh Chiniwar santosh.chini at gmail.com
Wed Mar 30 03:16:27 EDT 2016


Thanks for kind reply. I am new to this python coding. Could you please
tell me how use bigfloat to fix this overflow problem

I am getting overflow for following values

     v = numpy.linspace(0, 100, 10)
     j= numpy.exp(v/1.3806488e-23)



I have tried to use   In [30]: from bigfloat import *

---------------------------------------------------------------------------

ImportError                               Traceback (most recent call last)

<ipython-input-30-45ecbac7174b> in <module>()

----> 1 from bigfloat import *


ImportError: No module named 'bigfloat'






*Santosh P. Chiniwar*

*----------------------------------Research Scholar, Thin Film Measurement
Lab *
*Department of Electronics Engineering*
*Chang Gung University, Taiwan (ROC)*
*259 Wenhua 1st Rd., Guishan Dist., Taoyuan, *
*33302, **Taiwan (ROC), **Tel.: +886-3211-8800*
*-ext.535 **Mob: +886-905667324*

The first principle is that you must not fool yourself-and you are the
easiest person to fool..... Richard Feynman



On 29 March 2016 at 21:34, Gora Mohanty <gora at mimirtech.com> wrote:

> On 29 March 2016 at 17:14, Santosh Chiniwar <santosh.chini at gmail.com>
> wrote:
> > Dear BangPypers,
> >   Please find my code and I get Overflow warning. I am unable to continue
> > further. Any support or help is appreciated.
>
> Somewhere you are getting too large a number for the range of type in
> the array that you are using: probably because you are dividing by the
> very small Boltzmann constant.
>
> You either need to use a type with a bigger range, say bigfloat for
> arbitrary precision floating-point arithmetic, or if the errors only
> occur for values that can be ignored, see
> http://docs.scipy.org/doc/numpy/reference/generated/numpy.seterr.html
> for how to ignore errors.
>
> Incidentally, all this information is available from an easy Google search.
>
> Regards,
> Gora
> _______________________________________________
> BangPypers mailing list
> BangPypers at python.org
> https://mail.python.org/mailman/listinfo/bangpypers
>


More information about the BangPypers mailing list