954,498 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Input Value range for testing simple program.

The program takes 10 numbers of type float, which are entered by the user, and outputs the average ( also of type float ) of those 10 numbers. If I am going to test a range of values for those ten number, am I correct to test the highest values at 3.7E+38 / 10. If each number entered by the user is 3.7E+38 / 10, then the average of those ten numbers should never exceed 3.7E+38 correct?

I'm basically trying to find the upper and lower ranges for my test inputs.

P.S. All numbers input are positive.

FWD

FutureWebDev
Light Poster
33 posts since Dec 2010
Reputation Points: 10
Solved Threads: 0
 

>>If each number entered by the user is 3.7E+38 / 10, then the average of those ten numbers should never exceed 3.7E+38 correct?

Yes, it is correct. Could you elaborate a little more? What problem are you facing?

myk45
Posting Whiz
319 posts since Sep 2010
Reputation Points: 57
Solved Threads: 40
 

>>If each number entered by the user is 3.7E+38 / 10, then the average of those ten numbers should never exceed 3.7E+38 correct?

Yes, it is correct. Could you elaborate a little more? What problem are you facing?

I am trying to find the upper range of numbers to use for testing the programs input from the user.

The maximum value of a float variable is 3.7E+10. I'm using type float for the variables ( actually an array ) that hold the values entered by the user ( 10 numbers ), and those numbers are summed and placed in another variable of type float. Am I correct to assume that the maximum value I should test the values entered by the user is 3.7E+38 / 10 ?

FWD

FutureWebDev
Light Poster
33 posts since Dec 2010
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: