मराठी
तामिळनाडू बोर्ड ऑफ सेकेंडरी एज्युकेशनएचएससी विज्ञान इयत्ता ११

If 2 = 1.414, and the square_root() function returns -1.414, does it violate the following specification? -- square_root (x) -- inputs: x is a real number , x ≥ 0 -- outputs: y is a real number - Computer Science

Advertisements
Advertisements

प्रश्न

If `sqrt2` = 1.414, and the square_root() function returns -1.414, does it violate the following specification?

-- square_root (x)
-- inputs: x is a real number , x ≥ 0
-- outputs: y is a real number such that y2 = x

एका वाक्यात उत्तर

उत्तर

No, because (- 1.414)2 = 2, which satisfies input – output relation (y2 = x)

shaalaa.com
Algorithmic Problems
  या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
पाठ 6: Specification and Abstraction - Evaluation - Section - B [पृष्ठ ८६]

APPEARS IN

सामाचीर कलवी Computer Science [English] Class 11 TN Board
पाठ 6 Specification and Abstraction
Evaluation - Section - B | Q 5. | पृष्ठ ८६
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×