This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Multiplication of two small numbers results in infinity



I'm running floating point calculations in the M3 core of a Concerto F28M36, and certain calculations multiplying two small numbers together results in -Inf as a result.  

I created a simple program that reproduces the issue I'm seeing.  I've included the contents of main.c below.

float test_var;
int main(void) {

    test_var = 4.174816e-36;
    
    test_var *= 0.001;
    
    return 0;
}

The project is using the TI ARM compiler, version 5.2.4.  Is the result -Infinity an expected result, and if so, are there any compiler options available to provide a result of zero instead?  I would expect a result of 0 if this is considered an underflow.