Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8213467
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T11:07:42+00:00 2026-06-07T11:07:42+00:00

What do you think Float.MIN_VALUE equals to? The next code explains where my last

  • 0

What do you think Float.MIN_VALUE equals to?

The next code explains where my last 5 hours went to, trying solving a bug.

public static void main(String[] args) {
    compareToZero(Float.MIN_VALUE); // Out = true false false
    compareToZero(Float.MAX_VALUE); // Out = true false false

    System.out.println("Float minimum " + Float.MIN_VALUE); // Out = 1.4E-45
    System.out.println("Float maximum " + Float.MAX_VALUE); // Out = 3.4028235E38
}

private static void compareToZero(float value1) {
    System.out.print((value1 > 0) + " ");
    System.out.print((value1 < 0) + " ");
    System.out.print((value1 == 0) + "\n");
}

I didn’t imagined that minimum value of float will be a positive value… Can’t find any use for it.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T11:07:44+00:00Added an answer on June 7, 2026 at 11:07 am

    Per the documentation for Float.MIN_VALUE:

    A constant holding the smallest positive nonzero value of type float, 2-149. It is equal to the hexadecimal floating-point literal 0x0.000002P-126f and also equal to Float.intBitsToFloat(0x1).

    While the name is debatable as the “true minimum value” of a float is -Float.MAX_VALUE, I suspect MIN_VALUE was chosen for consistency with the other numeric types. Using the names MIN_RANGE_VALUE and MAX_RANGE_VALUE (or similar) might have made the difference more clear.

    To understand why this is the “minimum value” requires understanding a little bit about how Java (or IEEE-754) floating point values work. With this insight, after reading the documentation, it is clear that Float.MIN_VALUE is the minimum non-zero value representable by the mantissa and exponent components of a float. Or, the smallest positive value a float can represent.

    The “true minimum value” is -Float.MAX_VALUE because Float.MAX_VALUE represents the maximum value that the mantissa and exponent components of a float can represent. Since the sign for a float is stored as a discrete bit, this range limit is the same for both positive and negative numbers.

    This differs from how integers work in Java (and on most CPUs): they are encoded using two’s complement. (Some computer systems used a discrete sign bit, which is called “one’s complement”, which then has two integer values of zero: 0 and -0!)

    Happy researching!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So I (think I) understand the difference between Float, Double, and Decimal , but
The data-element is a float-number and no sequence (I think). But I get the
Think my problem is I am trying to sum a count in the same
I think there is a bug in this filter_var or maybe I'm doing something
I'm trying to solve an equation. I'm using MASM32. I think that I'm using
There's code, that uses GPU: __global__ void gpu_process(float* input, float* weights, float* output, int
With 32 bit floats I think there is something like 2^31 - 1 representable
Think about doing this: import matplotlib.pyplot as plt plt.plot(x_A,y_A,'g--') plt.plot(x_B,y_B,'r-o') plt.show() How would you
Think I have an integer array like this: a[0]=60; a[1]=321; a[2]=5; now I want
Think about the following: Your ISP offers you a dynamic ip-address (for example 123.123.123.123).

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.