Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Question
you are asked to test the log10 function (double log10(double a)) in Java Math library. You do not have the source code for the function however the specifications of the function are available. The specifications of the function as follows:
- Function returns the base 10 logarithm of the given double value.
- If the argument is equal to 10n for integer n, then the result is n.
- If the argument is NaN or less than zero, then the result is NaN.
- If the argument is positive infinity, then the result is positive infinity.
- If the argument is positive zero or negative zero, then the result is negative infinity.
*NaN is a numeric data type value which stands for “not a number” (e.g. Double.NaN)
1. Explain why performing exhaustive testing (testing with all possible inputs) on this method might not be considered efficient testing and propose an efficient testing strategy.
2. Explain how the proposed testing strategy is performed and list the minimum amount of test inputs required to perform it.
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by stepSolved in 3 steps
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- Write a Python3 function sqr(n) that returns the square of its numeric parameter narrow_forwardWrite a program named stars.py that has two functions for generating star polygons. One function should be implemented using an iteration (a for loop), and another function should be a recursion. It is optional to fill in your shapes. The functions for generating stars should be named star (size, n, d=2) and star_recursive (size, n, level, d=2), where size is the size of the polygon side (edge), n is the number of sides (or angles), d is a density or winding number that should be set to default value 2, and level is the level of recursion initially equal to n.arrow_forwardWrite a program that generates random numbers between -25 and 25 by using the randint function. The program will add up the numbers and terminate when the sum of the values becomes zero. The program should contain the following functions: add() : add up the values main(): the function where the program execution should begin and end. randomgen(): a function that returns a number between -25 and 25 A global variable subsetsum that keeps track of the sum The program should output the count of the number of values generated before exiting saying that the subset sum was zero.arrow_forward
- Computer Science please in java. must use while loop.arrow_forwardGiven the following pseudocode: function fun(n) { var outer_count=0; var inner_count=0; var sum = 0; for (var i=0; i 0, as an expression of normal arithmetic and n, what is the value of outer_count that counts the number of times the outer loop executes? Enter an expression Fun.1.inner: Assuming n EN and n > 0, as an expression of normal arithmetic and n, what is the value of inner_count that counts the number of times the inner loop executes? Enter an expressionarrow_forwardpython with a function “harmonic(n)” that computes the n-th harmonic number, write a function “harmonic_all(n)” that returns the number of values generated until all values are obtained as a function of the range of possible values n, then write a function “harmonic_sim(n)” that repeats “harmonic_all(n)” a total of n_sim = 100 times. function harmonic(n) is written: def harmonic(n) : harmonic = 1.00 for i in range(2, n + 1) : harmonic += 1 / i return round(harmonic,2) please help with harmonic_all and harmonic_simarrow_forward
- So long as ptr is a reference to an integer, what happens if we add 4 to it?arrow_forwardDescription A mathmatician Goldbach's conjecture: any even number(larger than 2) can divide into two prime number’s sum.But some even numbers can divide into many pairs of two prime numbers’ sum. Example:10 =3+7, 10=5+5, 10 can divide into two pairs of two prime number. Input Input consist a positive even number n(4<=n<=32766). Output Print the value of how many pairs are this even number can be divided into. Sample Input 1 1234 Sample Output 1 25arrow_forwardWrite a recursive function that takes as a parameter a nonnegative integer and generates the following pattern of stars. If the nonnegative integer is 4, the pattern generated is as follows: **** *** ** * * ** *** **** Also, write a program that prompts the user to enter the number of lines in the pattern and uses the recursive function to generate the pattern. For example, specifying 4 as the number of lines generates the preceding pattern.arrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education