(a) A fundamental property of real numbers is given by the distributive law (x + y)2 = x2 + y2. (2) In this question, yo

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

(a) A fundamental property of real numbers is given by the distributive law (x + y)2 = x2 + y2. (2) In this question, yo

Post by answerhappygod »

A A Fundamental Property Of Real Numbers Is Given By The Distributive Law X Y 2 X2 Y2 2 In This Question Yo 1
A A Fundamental Property Of Real Numbers Is Given By The Distributive Law X Y 2 X2 Y2 2 In This Question Yo 1 (50.36 KiB) Viewed 53 times
(a) A fundamental property of real numbers is given by the distributive law (x + y)2 = x2 + y2. (2) In this question, you are going to check whether floating point numbers obey this law. To do this, you are going to write a Python program that runs through a loop 10,000 times and each time draws three random numbers in the interval (0,1) and then checks whether the law holds (whether the two sides of Equation 2 are equal) for these numbers. Count down how many times the law fails, and at the end, print percentage of times that it failed. Print also a set of three numbers for which the law failed. 2 (b) Repeat (a), but test the associative law (x + y) + 2 = 1 +(y+z) instead. (c) Repeat (a), but test the commutative law 1 + y = y + r instead. (d) Repeat (a) and (b), but test the associative and commutative laws for multiplication instead
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply