Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

A Python question ! I have no idea how to use np.array() to store 1 million pi's Here is part of my code numpy.float32 (numpy.sin(numpy.pi))

image text in transcribed

A Python question !

I have no idea how to use np.array() to store 1 million pi's

Here is part of my code

numpy.float32 (numpy.sin(numpy.pi))

the output is 1.2246469e-16, but if using 32-bit precision, wouldn't the result be XXXX times 10^(-8) ? Why is it still 10^(-16)?

Part C (2 points) We're insulated from these issues with precision by using 64-bit floating point, but NumPy supports other representations that use small amounts of memory. Use the np, array() function to create another array with 1 million copies of , but this time in 32-bit precision (using data type np. float32 .) You should get a much larger accumulated error

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Professional Visual Basic 6 Databases

Authors: Charles Williams

1st Edition

1861002025, 978-1861002020

More Books

Students also viewed these Databases questions

Question

General Purpose of Your Speech Analyzing Your Audience

Answered: 1 week ago

Question

Ethical Speaking: Taking Responsibility for Your Speech?

Answered: 1 week ago