To represent a binary floating-point number as an exact fraction, the number of decimal digits needed depends on the precision of the binary floating-point format. Higher precision formats like double precision may require on the order of 15-17 decimal digits.
To represent a binary floating-point number reversibly so that it can be converted back to the same binary value, the number of decimal digits needed depends on the precision as well as the desired rounding mode. For double precision numbers using round-to-nearest rounding, about 16-17 decimal digits are typically needed.
Betrayal, Distrust, and Rationality: Smart Counter-Collusion Contracts for Ve...Changyu Dong
Cloud computing has become an irreversible trend. Together comes the pressing need for verifiability, to assure the client the correctness of computation outsourced to the cloud. Existing verifiable computation techniques all have a high overhead, thus if being deployed in the clouds, would render cloud computing more expensive than the on-premises counterpart. To achieve verifiability at a reasonable cost, we leverage game theory and propose a smart contract based solution. In a nutshell, a client lets two clouds compute the same task, and uses smart contracts to stimulate tension, betrayal and distrust between the clouds, so that rational clouds will not collude and cheat. In the absence of collusion, verification of correctness can be done easily by crosschecking the results from the two clouds. We provide a formal analysis of the games induced by the contracts, and prove that the contracts will be effective under certain reasonable assumptions. By resorting to game theory and smart contracts, we are able to avoid heavy cryptographic protocols. The client only needs to pay two clouds to compute in the clear, and a small transaction fee to use the smart contracts. We also conducted a feasibility study that involves implementing the contracts in Solidity and running them on the official Ethereum network.
Design and Implementation of Single Precision Pipelined Floating Point Co-Pro...Silicon Mentor
Floating point numbers are used in various applications such as medical imaging, radar, telecommunications Etc. This paper deals with the comparison of various arithmetic modules and the implementation of optimized floating point ALU. For more info download this file or visit us at:
http://www.siliconmentor.com/
Betrayal, Distrust, and Rationality: Smart Counter-Collusion Contracts for Ve...Changyu Dong
Cloud computing has become an irreversible trend. Together comes the pressing need for verifiability, to assure the client the correctness of computation outsourced to the cloud. Existing verifiable computation techniques all have a high overhead, thus if being deployed in the clouds, would render cloud computing more expensive than the on-premises counterpart. To achieve verifiability at a reasonable cost, we leverage game theory and propose a smart contract based solution. In a nutshell, a client lets two clouds compute the same task, and uses smart contracts to stimulate tension, betrayal and distrust between the clouds, so that rational clouds will not collude and cheat. In the absence of collusion, verification of correctness can be done easily by crosschecking the results from the two clouds. We provide a formal analysis of the games induced by the contracts, and prove that the contracts will be effective under certain reasonable assumptions. By resorting to game theory and smart contracts, we are able to avoid heavy cryptographic protocols. The client only needs to pay two clouds to compute in the clear, and a small transaction fee to use the smart contracts. We also conducted a feasibility study that involves implementing the contracts in Solidity and running them on the official Ethereum network.
Design and Implementation of Single Precision Pipelined Floating Point Co-Pro...Silicon Mentor
Floating point numbers are used in various applications such as medical imaging, radar, telecommunications Etc. This paper deals with the comparison of various arithmetic modules and the implementation of optimized floating point ALU. For more info download this file or visit us at:
http://www.siliconmentor.com/
Floating point ALU using VHDL implemented on FPGAAzhar Syed
Description: An arithmetic unit based on IEEE754 single precision standard for floating point numbers has been targeted to implement on Spartan-6 XC6SLX45 FPGA Board. The hardware description language used to program the FPGA chip was VHDL (very high speed integrated circuit hardware description language). The arithmetic unit implemented has a 32- bit processing unit which allowed limited arithmetic operations such as addition, Subtraction, multiplication and division. The overall coding style used was behavioural modelling synthesis and simulations were done and observed in Xilinx 14.7 and modelsim SE 6.4 version respectively. The final outcome of project revealed that proposed arithmetic unit was able to handle maximum frequency of 126.004 MHz (i.e. Minimum period of 7.936ns).
Intro To C++ - Cass 11 - Converting between types, formatting floating point,...Blue Elephant Consulting
This presentation is a part of the COP2272C college level course taught at the Florida Polytechnic University located in Lakeland Florida. The purpose of this course is to introduce students to the C++ language and the fundamentals of object orientated programming..
The course is one semester in length and meets for 2 hours twice a week. The Instructor is Dr. Jim Anderson.
Intro To C++ - Class 11 - Converting between types, formatting floating point...Blue Elephant Consulting
This presentation is a part of the COP2272C college level course taught at the Florida Polytechnic University located in Lakeland Florida. The purpose of this course is to introduce students to the C++ language and the fundamentals of object orientated programming..
The course is one semester in length and meets for 2 hours twice a week. The Instructor is Dr. Jim Anderson.
IEEE-754 standard format to handle Floating-Point calculations in RISC-V CPUs...zeeshanshanzy009
The IEEE Standard for Floating-Point Arithmetic (IEEE 754) is a technical standard for floating-point arithmetic established in 1985 by the Institute of Electrical and Electronics Engineers (IEEE). The standard addressed many problems found in the diverse floating-point implementations that made them difficult to use reliably and portable. RISC-V also uses the IEEE 754 standard.
International Journal of Engineering Research and DevelopmentIJERD Editor
Electrical, Electronics and Computer Engineering,
Information Engineering and Technology,
Mechanical, Industrial and Manufacturing Engineering,
Automation and Mechatronics Engineering,
Material and Chemical Engineering,
Civil and Architecture Engineering,
Biotechnology and Bio Engineering,
Environmental Engineering,
Petroleum and Mining Engineering,
Marine and Agriculture engineering,
Aerospace Engineering.
Problem 7PurposeBreak apart a complicated system.ConstantsC7C13.docxLacieKlineeb
Problem 7Purpose:Break apart a complicated system.Constants:C7:C13Gas-Sparge
System
Pmo794(DI/DT)^4.38DI0.36(DI2N/v)^0.115DT1.22(DIN2/g)^1.96(DI/Dt)N2.8(Q/NDI3)v8.90E-07Right Sideg9.81PM←ANSWERSQ0.00416Computed Pm917The difference between the Computed Pm and Calculated Pm
Problem 8Purpose:Calculate Wind ChillConstants:ParametersWind Speed (km/h)a13.12Air Temp oC1020304050b0.621510c-11.370d0.3965-10-20←ANSWERS-30-40QuestionsThe formula to be used in E5 such that it can be filled down and across to make the table is: ….The name for cell B6 is …To modify this worksheet for Fahrenheit you need to …..
Problem 13Purpose:Calculate square roots using Heron's MethodConstants:N225Sqrt is←ANSWERSGuessN/GuessAverageTestError10
2
Project Topic Proposal
Harita Patel
Professor Dr. Bernard Parenteau
CIS 4498
Date: 11/1/22
Project Topic Proposal
The proposed topic is cyber security. My proposal in this software development project of this class is to develop cyber security software to be a tool that protects systems against malicious attacks and online threats. The software should b able to detect and block threats that can not be detected by antivirus. The technology to be used will be defensive Artificial intelligence. Cybersecurity professional experts can utilize guarded man-made consciousness (simulated intelligence) to distinguish or stop cyberattacks. Sagacious cybercriminals use innovations like hostile computer-based intelligence and ill-disposed AI since they are harder for conventional network protection instruments to identify. Offensive AI incorporates profound fakes, bogus pictures, personas, and recordings that convincingly portray individuals or things that never occurred or don't exist. Noxious entertainers can utilize ill-disposed AI to fool machines into breaking down by giving them mistaken information. Cybersecurity professionals can utilize cautious computer-based intelligence to recognize and prevent hostile man-made intelligence from estimating, testing, and figuring out how the framework or organization's capabilities. Defensive AI can reinforce calculations, making them more challenging to break. Network protection analysts can direct more extreme weakness tests on AI models.
Artificial intelligence cautious apparatuses can precisely anticipate assault vectors, pinpoint the delicate region of the organization and frameworks, and even set it up groups for approaching occasions(Graham, Olson,& Howard, 2016). The progression of computerized data is developing a regular schedule making it progressively challenging to oversee and structure it or even to isolate what is significantly based on what is pointless. Confronted with this test, new encouraging advancement innovations are being created to bring 'information examination's to the following developmental level. Man-made consciousness (man-made intelligence), specifically, is supposed to become huge in many fields. A few types of computer-based inte.
I am Baddie K. I am a C++ Homework Expert at cpphomeworkhelp.com. I hold a Masters in Programming from The University of Queensland. I have been helping students with their homework for the past 9 years. I solve homework related to C++.
Visit cpphomeworkhelp.com or email info@cpphomeworkhelp.com. You can also call on +1 678 648 4277 for any assistance with C++ Homework.
(Slides) Efficient Evaluation Methods of Elementary Functions Suitable for SI...Naoki Shibata
Naoki Shibata : Efficient Evaluation Methods of Elementary Functions Suitable for SIMD Computation, Journal of Computer Science on Research and Development, Proceedings of the International Supercomputing Conference ISC10., Volume 25, Numbers 1-2, pp. 25-32, 2010, DOI: 10.1007/s00450-010-0108-2 (May. 2010).
http://www.springerlink.com/content/340228x165742104/
http://freshmeat.net/projects/sleef
Data-parallel architectures like SIMD (Single Instruction Multiple Data) or SIMT (Single Instruction Multiple Thread) have been adopted in many recent CPU and GPU architectures. Although some SIMD and SIMT instruction sets include double-precision arithmetic and bitwise operations, there are no instructions dedicated to evaluating elementary functions like trigonometric functions in double precision. Thus, these functions have to be evaluated one by one using an FPU or using a software library. However, traditional algorithms for evaluating these elementary functions involve heavy use of conditional branches and/or table look-ups, which are not suitable for SIMD computation. In this paper, efficient methods are proposed for evaluating the sine, cosine, arc tangent, exponential and logarithmic functions in double precision without table look-ups, scattering from, or gathering into SIMD registers, or conditional branches. We implemented these methods using the Intel SSE2 instruction set to evaluate their accuracy and speed. The results showed that the average error was less than 0.67 ulp, and the maximum error was 6 ulps. The computation speed was faster than the FPUs on Intel Core 2 and Core i7 processors.
In a poorly written code you may often see magic numeric constants whose presence is dangerous by itself. When porting code to a 64-bit platform, these constants may make the code inefficient if they participate in address computation, object size computation or bit operations.
2. Contents
• Why increasing emphasis on Decimal
Arithmetic?
• Problems caused by Floating Point?
• Disaster ( Examples)
• How Floating to Decimal?
• Is Hardware supports decimal arithmetic
directly?
3. Why Decimal Arithmetic?
Most computers today support binary floating-
point in hardware.
But for financial, commercial, and human-
centric (such as Web) applications – NOT
suitable.
In many commercial applications, including
financial analysis, banking, tax calculation,
currency conversions, insurance, accounting,
and e-commerce, the errors introduced by
converting between decimal and binary
numbers are unacceptable and may violate
4. What problems are caused by
using binary floating-point?
Binary floating-point cannot exactly represent
decimal fractions.
DECIMAL BINARY
0.9 0.9
0.09 0.089999996
0.009 0.0090
0.0009 9.0E-4
0.00009 9.0E-5
0.000009 9.0E-6
9E-7 9.0000003E-7
9E-8 9.0E-8
9E-9 9.0E-9
9E-10 8.9999996E-10
5. Example
For example, using the Java or C double datatype,
0.1 × 8 (a binary multiple) gives the result
0.800000000000000044408920985006261616945
2667236328125
but 0.1 added to itself 8 times gives the different
answer
0.799999999999999933386618522490607574582
09991455078125.
The two results would not compare equal, and
further, if these values are multiplied by ten and
rounded to the nearest integer below (the „floor‟
function), the result will be 8 in one case and 7 in
the other.
6. Similarly, the result of 1.30 x 1.05 using binary is
1.3650000000000002131628207280300557613
372802734375; this would be rounded up to
$1.37. However, the result should have been
1.365 – which would be rounded down to $1.36
(using “Banker‟s rounding”).
Taken over a million transactions of this kind, as
in the „telco‟ benchmark, these systematic errors
add up to an overcharge of more than $20. For a
large company, the million calls might be two-
minutes-worth; over a whole year the error then
7. for (double d = 0.1; d <= 0.5; d += 0.1)
System.out.println(d);
for (double d = 1.1; d <= 1.5; d += 0.1)
System.out.println(d);
9. The Patriot Missile Failure
On February 25, 1991, during the Gulf War, an American Patriot Missile
battery in Dharan, Saudi Arabia, failed to track and intercept an incoming
Iraqi Scud missile.
A report of the General Accounting office, GAO/IMTEC-92-26,
entitled Patriot Missile Defense: Software Problem Led to System Failure
at Dhahran, Saudi Arabia reported on the cause of the failure.
The cause was an inaccurate calculation of the time since boot due to
computer arithmetic errors.
Specifically, the time in tenths of second as
measured by the system's internal clock was
multiplied by 1/10 to produce the time in
seconds.
10. Explosion of the Ariane 5
On June 4, 1996 an unmanned Ariane 5 rocket launched by the European
Space Agency exploded just forty seconds after lift-off (918K QuickTime
movie).
The cause of the failure was a software error in the inertial reference
system.
Specifically a 64 bit floating point number relating to
the horizontal velocity of the rocket with respect to the
platform was converted to a 16 bit signed integer. The
number was larger than 32,768, the largest integer
storeable in a 16 bit signed integer, and thus the conversion
failed.
11. The applications actually use
decimal data
Airline systems, Banking, Financial Analysis,
Insurance, Inventory control, Management
reporting, Marketing services, Order entry,
Order processing, Pharmaceutical
applications, and Retail sales.
12. How much precision and range is
needed for decimal arithmetic?
This depends, of course, on the application.
13. What rounding modes are needed
for decimal arithmetic?
The three most important are
Round-half-even
Round-half-up
Round-half-up
14. What disadvantages are there in
using decimal arithmetic?
Decimal numbers are traditionally held in a
binary coded decimal form which uses about
20% more storage than a purely binary
representation.
Some properties that hold for binary do not hold
for any other base. For example, (d ÷ 2) × 2
gives d in binary (unless there is an underflow),
but with base 10 it might not if d is full precision
and d ÷ 2 is Inexact.
15. The first division illustrates dividing 2.1 into 123.4 . Since we are working
with integers, this is equivalent to dividing 21 into 1234. The result is 58
and contains no decimal point. This will not give us the precision we
demand in the quotient. In the second division, by shifting the dividend to
the left by one digit (bringing in a 0 on the right), we are effectively dividing
21 into 12340, and producing a quotient of 587 which could be edited to
58.7 for printing.
16. for (i=0.1; i<0.5; i=i+0.1) printf
("%fn",100000000*i);
will print out:
100000001.490116
200000002.980232
300000011.920929
400000005.960464
18. Why doesn’t hardware support
decimal arithmetic directly?
Most computer architectures other than „pure
RISC‟ machines do, in fact, provide some form
of decimal arithmetic instructions or support.
The native (hardware) decimal floating-point
arithmetic now available in the IBM Power6
processor and expected in the z6
microprocessor makes programming far
simpler and more robust, and with much better
performance than software
22. Why is decimal arithmetic
unnormalized?
Unnormalized arithmetic is compatible with
existing languages and applications.
The arithmetic of all existing decimal datatypes
can be derived by constraining the
unnormalized arithmetic.
Unnormalized arithmetic often permits
performance improvements.
Gradual underflow is „free‟.
23. Why is decimal arithmetic
unnormalized?
Zeros are not special cases.
Conversions to and from existing decimal
datatypes are faster.
Unnormalized arithmetic results match human
expectations.
Application design is simpler.
24. How are decimal numbers
encoded?
Plimit, the maximum precision of the coefficient. This is the
maximum length of the coefficient, in digits. Any result from an
operation which needs more digits than this will be rounded to fit.
If this rounding caused non-zero digits to be removed, the result
is Inexact.
Elimit, the maximum encoded exponent. The encoded exponent is
a non-negative number, in the range 0 through Elimit, from which
the exponent parameter is calculated by subtracting a bias. (This
use of a bias makes it easier to compare exponents in a hardware
implementation.)
25. How is the exponent bias
chosen?
A balanced range of exponents is defined by the parameters,
Emax and Emin, which determine the overflow threshold
(10×10Emax) and the underflow threshold (1×10Emin) respectively.
In addition to the normal numbers, it must also be possible to
encode a further range of numbers of lower precision which are
smaller than the underflow precision. These numbers are
called subnormal numbers. The smallest subnormal number
must be 1×10Etiny, where Etiny is given by Emin - (Plimit - 1). In our
example format, the range of subnormal numbers is
1×10Etiny through 999999×10Etiny (which is
26. How is the exponent bias
chosen?(cont..)
In a redundant encoding, more than one coefficient
(with an appropriate exponent) can be used to
represent a given numerical value (for example, the
underflow threshold could be represented as either
1000000×10Etiny or 1×10Emin).
In a non-redundant encoding, only one coefficient is
used for a given numerical value. (The coefficient
chosen usually depends on the scale – when the scale
is 0 the smallest coefficient is preferred).
28. Conversion
How many decimal digits are needed to
represent a binary floating-point number as an
exact fraction?
How many decimal digits are needed to
represent a binary floating-point number
reversibly?