Missing math.MinFloat64

640 views
Skip to first unread message

Amarjeet Anand

unread,
Apr 23, 2020, 11:48:12 AM4/23/20
to golan...@googlegroups.com
Hi

Like math.MaxFloat64, Why don't math.MinFloat64 exist?

Ian Lance Taylor

unread,
Apr 23, 2020, 12:15:49 PM4/23/20
to Amarjeet Anand, golang-nuts
On Thu, Apr 23, 2020 at 8:48 AM Amarjeet Anand <sarvm...@gmail.com> wrote:
>
> Like math.MaxFloat64, Why don't math.MinFloat64 exist?

Unlike integers, for floating point numbers MinFloat64 == -
MaxFloat64. So adding MinFloat64 doesn't seem necessary.

Of course this assumes that you are aware of that fact. Maybe we
should add a sentence to the doc.

Ian
Reply all
Reply to author
Forward
0 new messages