subject

Write a program that calculates pi using the Nilakantha Series. The program should accept a threshold from standard in indicating how close to pi one should calculate. The program should output for each term in the series: the result of the calculation of pi so far (fixed notation and 6 significant figures) and the different between the aproximation and actual pi (scientific notation and 2 significant figures). Once the difference is less than the threshold, cease the program.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 03:00
Data is processed, stored, and transmitted as a series of 1s and 0s. each 1 or 0 is called a(n) . a series of eight 0s and 1s, called a(n) , represents one characterÒ€”a letter, number, or punctuation mark. data becomes when it is presented in a format that people can understand and use. digital signals are represented by two different , such as +5 volts and +.2 volts. digital data can also take the form of light and dark spots etched onto the surface of a cd or the positive and negative orientation of particles on the surface of a hard disk. data consists of numbers that might be used in arithmetic operations. it can be represented digitally using the number system. data is composed of letters, symbols, and numerals that are not used in arithmetic operations. computers represent this type of data using , ebcdic, unicode, or utf-8. data is quantified using terms such as or kibibyte (1024 bytes), and prefixes such as or mebi (1,048,576), and giga or (1,073,741,824). to reduce file size and transmission times, digital data can be compressed. compression provides the means to compress data and reconstitute it into its original state. compression throws away some of the original data during the compression process. compressed files usually have at the end of the file name and are represented with special icons. these files have to be or unzipped before you can view the data they contain.
Answers: 1
question
Computers and Technology, 23.06.2019 17:30
When making changes to optimize part of a processor, it is often the case that speeding up one type of instruction comes at the cost of slowing down something else. for example, if we put in a complicated fast floating-point unit, that takes space, and something might have to be moved farther away from the middle to accommodate it, adding an extra cycle in delay to reach that unit. the basic amdahl's law equation does not take into account this trade-off. a. if the new fast floating-point unit speeds up floating-point operations by, on average, 2Δƒβ€”, and floating-point operations take 20% of the original program's execution time, what is the overall speedup (ignoring the penalty to any other instructions)? b. now assume that speeding up the floating-point unit slowed down data cache accesses, resulting in a 1.5Δƒβ€” slowdown (or 2/3 speedup). data cache accesses consume 10% of the execution time. what is the overall speedup now? c. after implementing the new floating-point operations, what percentage of execution time is spent on floating-point operations? what percentage is spent on data cache accesses?
Answers: 2
question
Computers and Technology, 23.06.2019 21:30
Write a fragment of code that reads in strings from standard input, until end-of-file and prints to standard output the largest value. you may assume there is at least one value. (cascading/streaming logic, basic string processing)
Answers: 3
question
Computers and Technology, 23.06.2019 22:30
The output voltage of a power supply is assumed to be normally distributed. sixteen observations are taken at random on voltage are as follows: 10.35, 9.30, 10.00, 9.96, 11.65, 12.00, 11.25, 9.58, 11.54, 9.95, 10.28, 8.37, 10.44, 9.25, 9.38, and 10.85
Answers: 1
You know the right answer?
Write a program that calculates pi using the Nilakantha Series. The program should accept a threshol...
Questions
question
Mathematics, 19.07.2019 18:00
Questions on the website: 13722359