Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #50742

Re: Floating point minimum and maximum exponent values

From Christian Heimes <christian@python.org>
Subject Re: Floating point minimum and maximum exponent values
Date 2013-07-16 14:46 +0200
References <ks3bl6$g8o$1@speranza.aioe.org> <CAPTjJmqzAvXr2t71M5SnEXp8-Axsy-SPQrGiHU7nD-c2FqVqXw@mail.gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.4770.1373978811.3114.python-list@python.org> (permalink)

Show all headers | View raw


Am 16.07.2013 14:04, schrieb Chris Angelico:
> Piece of extreme oddity, this.
> 
>>>> help(sys.float_info)
> .... lots of other info ...
>  |  max_exp
>  |      DBL_MAX_EXP -- maximum int e such that radix**(e-1) is representable
>  |
>  |  min_exp
>  |      DBL_MIN_EXP -- minimum int e such that radix**(e-1) is a
> normalized float
> ....
> 
> So it's technically correct. Followup question: Why is it off by one?

Because float.h defines DBL_MAX_EXP like that.

Why? I can't tell, too.

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Floating point minimum and maximum exponent values Marco <m.b@gmail.com> - 2013-07-16 13:43 +0200
  Re: Floating point minimum and maximum exponent values Chris Angelico <rosuav@gmail.com> - 2013-07-16 22:04 +1000
  Re: Floating point minimum and maximum exponent values Christian Heimes <christian@python.org> - 2013-07-16 14:46 +0200
  Re: Floating point minimum and maximum exponent values Serhiy Storchaka <storchaka@gmail.com> - 2013-07-16 20:21 +0300

csiph-web