This document discusses numerical inaccuracies that can occur when representing real numbers in computers using floating point types. It then describes some ways to avoid errors, such as using double precision instead of float. The document also covers arithmetic overflow and underflow issues. Furthermore, it introduces common mathematical functions in C like trigonometric, logarithmic and exponential functions. It provides examples of using the printf() and scanf() functions to output and input data in C programs.
This topic-based on Compiler Design Subject, III B.Tech-CSE Students, Intermediate Code Generation is the 3rd module of compiler design subject, these topics totally related to the second subjective assignment of Academic Writing in Swayam online course.
A presentation on Intermediate Code generation in Compiler System. Provides introduction, types of intermediate code representation and commonly used intermediate code representation.
This topic-based on Compiler Design Subject, III B.Tech-CSE Students, Intermediate Code Generation is the 3rd module of compiler design subject, these topics totally related to the second subjective assignment of Academic Writing in Swayam online course.
A presentation on Intermediate Code generation in Compiler System. Provides introduction, types of intermediate code representation and commonly used intermediate code representation.
Digital communication lab lectures
Engineering + education purpose
This series of LAB lectures was prepared for the third class of computer networks department IN AL-Bani University College / Baghdad / Iraq.
This series of lectures is not finished yet; I will complete it and update the PDF as soon as possible.
You will find the theory and tutorial lectures in the same website
Forgive me for any wrong by mistake.
My regards
Marwa Moutaz/ M.Sc. studies of Communication Engineering / University of Technology/ Bagdad / Iraq
Arrays
Array Creation , Accessing Elements
Sub Arrays, Representation, Operations
Maximum and Minimum values in Matrix
Potential Energy-Spring Problem
SUMMARY
Digital communication lab lectures
Engineering + education purpose
This series of LAB lectures was prepared for the third class of computer networks department IN AL-Bani University College / Baghdad / Iraq.
This series of lectures is not finished yet; I will complete it and update the PDF as soon as possible.
You will find the theory and tutorial lectures in the same website
Forgive me for any wrong by mistake.
My regards
Marwa Moutaz/ M.Sc. studies of Communication Engineering / University of Technology/ Bagdad / Iraq
Arrays
Array Creation , Accessing Elements
Sub Arrays, Representation, Operations
Maximum and Minimum values in Matrix
Potential Energy-Spring Problem
SUMMARY
talk at Virginia Bioinformatics Institute, December 5, 2013ericupnorth
Extensible domain-specific programming for the sciences
The notion of scientists as programmers begs the question of what sort of programming language would be a good fit. The common answer seems to be both none of them and all of them. Many scientific applications are a combination of general-purpose and domain-specific languages: R for statistical elements, MATLAB for matrix-based computations, Perl-based regular expressions for string matching, C or FORTRAN for high performance parallel computations, and scripting languages such as Python to glue them all together. This clumsy situation demonstrates the need for different domain-specific language features.
Our hypothesis is that programming could be made easier, less error-prone and result in higher-quality code if languages could be easily extended, by the programmer, with the domain-specific features that a programmer or scientists needs for their particular task at hand. This talk demonstrates the meta-language processing tools that support this composition of programmer-selected language features, with several extensions chosen from the previously mentioned list of features.
COM1407: Type Casting, Command Line Arguments and Defining Constants Hemantha Kulathilake
At the end of this lecture students should be able to;
Define type cast and type promotion in C programming language.
Define command line arguments in C Programming language.
Declare constants according to the C programming.
Apply math.h header file for problem solving.
Apply taught concepts for writing programs.
Automated Program Repair, Distinguished lecture at MPI-SWSAbhik Roychoudhury
MPI-SWS Distinguished Lecture 2019. The talk focuses on fuzzing, symbolic execution as background technologies and compares their relative power. Then the use of such technologies for automated program repair is investigated.
E-commerce Application Development Company.pdfHornet Dynamics
Your business can reach new heights with our assistance as we design solutions that are specifically appropriate for your goals and vision. Our eCommerce application solutions can digitally coordinate all retail operations processes to meet the demands of the marketplace while maintaining business continuity.
Graspan: A Big Data System for Big Code AnalysisAftab Hussain
We built a disk-based parallel graph system, Graspan, that uses a novel edge-pair centric computation model to compute dynamic transitive closures on very large program graphs.
We implement context-sensitive pointer/alias and dataflow analyses on Graspan. An evaluation of these analyses on large codebases such as Linux shows that their Graspan implementations scale to millions of lines of code and are much simpler than their original implementations.
These analyses were used to augment the existing checkers; these augmented checkers found 132 new NULL pointer bugs and 1308 unnecessary NULL tests in Linux 4.4.0-rc5, PostgreSQL 8.3.9, and Apache httpd 2.2.18.
- Accepted in ASPLOS ‘17, Xi’an, China.
- Featured in the tutorial, Systemized Program Analyses: A Big Data Perspective on Static Analysis Scalability, ASPLOS ‘17.
- Invited for presentation at SoCal PLS ‘16.
- Invited for poster presentation at PLDI SRC ‘16.
Launch Your Streaming Platforms in MinutesRoshan Dwivedi
The claim of launching a streaming platform in minutes might be a bit of an exaggeration, but there are services that can significantly streamline the process. Here's a breakdown:
Pros of Speedy Streaming Platform Launch Services:
No coding required: These services often use drag-and-drop interfaces or pre-built templates, eliminating the need for programming knowledge.
Faster setup: Compared to building from scratch, these platforms can get you up and running much quicker.
All-in-one solutions: Many services offer features like content management systems (CMS), video players, and monetization tools, reducing the need for multiple integrations.
Things to Consider:
Limited customization: These platforms may offer less flexibility in design and functionality compared to custom-built solutions.
Scalability: As your audience grows, you might need to upgrade to a more robust platform or encounter limitations with the "quick launch" option.
Features: Carefully evaluate which features are included and if they meet your specific needs (e.g., live streaming, subscription options).
Examples of Services for Launching Streaming Platforms:
Muvi [muvi com]
Uscreen [usencreen tv]
Alternatives to Consider:
Existing Streaming platforms: Platforms like YouTube or Twitch might be suitable for basic streaming needs, though monetization options might be limited.
Custom Development: While more time-consuming, custom development offers the most control and flexibility for your platform.
Overall, launching a streaming platform in minutes might not be entirely realistic, but these services can significantly speed up the process compared to building from scratch. Carefully consider your needs and budget when choosing the best option for you.
OpenMetadata Community Meeting - 5th June 2024OpenMetadata
The OpenMetadata Community Meeting was held on June 5th, 2024. In this meeting, we discussed about the data quality capabilities that are integrated with the Incident Manager, providing a complete solution to handle your data observability needs. Watch the end-to-end demo of the data quality features.
* How to run your own data quality framework
* What is the performance impact of running data quality frameworks
* How to run the test cases in your own ETL pipelines
* How the Incident Manager is integrated
* Get notified with alerts when test cases fail
Watch the meeting recording here - https://www.youtube.com/watch?v=UbNOje0kf6E
Software Engineering, Software Consulting, Tech Lead, Spring Boot, Spring Cloud, Spring Core, Spring JDBC, Spring Transaction, Spring MVC, OpenShift Cloud Platform, Kafka, REST, SOAP, LLD & HLD.
GraphSummit Paris - The art of the possible with Graph TechnologyNeo4j
Sudhir Hasbe, Chief Product Officer, Neo4j
Join us as we explore breakthrough innovations enabled by interconnected data and AI. Discover firsthand how organizations use relationships in data to uncover contextual insights and solve our most pressing challenges – from optimizing supply chains, detecting fraud, and improving customer experiences to accelerating drug discoveries.
Artificia Intellicence and XPath Extension FunctionsOctavian Nadolu
The purpose of this presentation is to provide an overview of how you can use AI from XSLT, XQuery, Schematron, or XML Refactoring operations, the potential benefits of using AI, and some of the challenges we face.
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxrickgrimesss22
Discover the essential features to incorporate in your Winzo clone app to boost business growth, enhance user engagement, and drive revenue. Learn how to create a compelling gaming experience that stands out in the competitive market.
Do you want Software for your Business? Visit Deuglo
Deuglo has top Software Developers in India. They are experts in software development and help design and create custom Software solutions.
Deuglo follows seven steps methods for delivering their services to their customers. They called it the Software development life cycle process (SDLC).
Requirement — Collecting the Requirements is the first Phase in the SSLC process.
Feasibility Study — after completing the requirement process they move to the design phase.
Design — in this phase, they start designing the software.
Coding — when designing is completed, the developers start coding for the software.
Testing — in this phase when the coding of the software is done the testing team will start testing.
Installation — after completion of testing, the application opens to the live server and launches!
Maintenance — after completing the software development, customers start using the software.
May Marketo Masterclass, London MUG May 22 2024.pdfAdele Miller
Can't make Adobe Summit in Vegas? No sweat because the EMEA Marketo Engage Champions are coming to London to share their Summit sessions, insights and more!
This is a MUG with a twist you don't want to miss.
Enterprise Resource Planning System includes various modules that reduce any business's workload. Additionally, it organizes the workflows, which drives towards enhancing productivity. Here are a detailed explanation of the ERP modules. Going through the points will help you understand how the software is changing the work dynamics.
To know more details here: https://blogs.nyggs.com/nyggs/enterprise-resource-planning-erp-system-modules/
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteGoogle
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
👉👉 Click Here To Get More Info 👇👇
https://sumonreview.com/ai-pilot-review/
AI Pilot Review: Key Features
✅Deploy AI expert bots in Any Niche With Just A Click
✅With one keyword, generate complete funnels, websites, landing pages, and more.
✅More than 85 AI features are included in the AI pilot.
✅No setup or configuration; use your voice (like Siri) to do whatever you want.
✅You Can Use AI Pilot To Create your version of AI Pilot And Charge People For It…
✅ZERO Manual Work With AI Pilot. Never write, Design, Or Code Again.
✅ZERO Limits On Features Or Usages
✅Use Our AI-powered Traffic To Get Hundreds Of Customers
✅No Complicated Setup: Get Up And Running In 2 Minutes
✅99.99% Up-Time Guaranteed
✅30 Days Money-Back Guarantee
✅ZERO Upfront Cost
See My Other Reviews Article:
(1) TubeTrivia AI Review: https://sumonreview.com/tubetrivia-ai-review
(2) SocioWave Review: https://sumonreview.com/sociowave-review
(3) AI Partner & Profit Review: https://sumonreview.com/ai-partner-profit-review
(4) AI Ebook Suite Review: https://sumonreview.com/ai-ebook-suite-review
AI Genie Review: World’s First Open AI WordPress Website CreatorGoogle
AI Genie Review: World’s First Open AI WordPress Website Creator
👉👉 Click Here To Get More Info 👇👇
https://sumonreview.com/ai-genie-review
AI Genie Review: Key Features
✅Creates Limitless Real-Time Unique Content, auto-publishing Posts, Pages & Images directly from Chat GPT & Open AI on WordPress in any Niche
✅First & Only Google Bard Approved Software That Publishes 100% Original, SEO Friendly Content using Open AI
✅Publish Automated Posts and Pages using AI Genie directly on Your website
✅50 DFY Websites Included Without Adding Any Images, Content Or Doing Anything Yourself
✅Integrated Chat GPT Bot gives Instant Answers on Your Website to Visitors
✅Just Enter the title, and your Content for Pages and Posts will be ready on your website
✅Automatically insert visually appealing images into posts based on keywords and titles.
✅Choose the temperature of the content and control its randomness.
✅Control the length of the content to be generated.
✅Never Worry About Paying Huge Money Monthly To Top Content Creation Platforms
✅100% Easy-to-Use, Newbie-Friendly Technology
✅30-Days Money-Back Guarantee
See My Other Reviews Article:
(1) TubeTrivia AI Review: https://sumonreview.com/tubetrivia-ai-review
(2) SocioWave Review: https://sumonreview.com/sociowave-review
(3) AI Partner & Profit Review: https://sumonreview.com/ai-partner-profit-review
(4) AI Ebook Suite Review: https://sumonreview.com/ai-ebook-suite-review
#AIGenieApp #AIGenieBonus #AIGenieBonuses #AIGenieDemo #AIGenieDownload #AIGenieLegit #AIGenieLiveDemo #AIGenieOTO #AIGeniePreview #AIGenieReview #AIGenieReviewandBonus #AIGenieScamorLegit #AIGenieSoftware #AIGenieUpgrades #AIGenieUpsells #HowDoesAlGenie #HowtoBuyAIGenie #HowtoMakeMoneywithAIGenie #MakeMoneyOnline #MakeMoneywithAIGenie
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppGoogle
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
👉👉 Click Here To Get More Info 👇👇
https://sumonreview.com/ai-fusion-buddy-review
AI Fusion Buddy Review: Key Features
✅Create Stunning AI App Suite Fully Powered By Google's Latest AI technology, Gemini
✅Use Gemini to Build high-converting Converting Sales Video Scripts, ad copies, Trending Articles, blogs, etc.100% unique!
✅Create Ultra-HD graphics with a single keyword or phrase that commands 10x eyeballs!
✅Fully automated AI articles bulk generation!
✅Auto-post or schedule stunning AI content across all your accounts at once—WordPress, Facebook, LinkedIn, Blogger, and more.
✅With one keyword or URL, generate complete websites, landing pages, and more…
✅Automatically create & sell AI content, graphics, websites, landing pages, & all that gets you paid non-stop 24*7.
✅Pre-built High-Converting 100+ website Templates and 2000+ graphic templates logos, banners, and thumbnail images in Trending Niches.
✅Say goodbye to wasting time logging into multiple Chat GPT & AI Apps once & for all!
✅Save over $5000 per year and kick out dependency on third parties completely!
✅Brand New App: Not available anywhere else!
✅ Beginner-friendly!
✅ZERO upfront cost or any extra expenses
✅Risk-Free: 30-Day Money-Back Guarantee!
✅Commercial License included!
See My Other Reviews Article:
(1) AI Genie Review: https://sumonreview.com/ai-genie-review
(2) SocioWave Review: https://sumonreview.com/sociowave-review
(3) AI Partner & Profit Review: https://sumonreview.com/ai-partner-profit-review
(4) AI Ebook Suite Review: https://sumonreview.com/ai-ebook-suite-review
#AIFusionBuddyReview,
#AIFusionBuddyFeatures,
#AIFusionBuddyPricing,
#AIFusionBuddyProsandCons,
#AIFusionBuddyTutorial,
#AIFusionBuddyUserExperience
#AIFusionBuddyforBeginners,
#AIFusionBuddyBenefits,
#AIFusionBuddyComparison,
#AIFusionBuddyInstallation,
#AIFusionBuddyRefundPolicy,
#AIFusionBuddyDemo,
#AIFusionBuddyMaintenanceFees,
#AIFusionBuddyNewbieFriendly,
#WhatIsAIFusionBuddy?,
#HowDoesAIFusionBuddyWorks
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
Math Functions in C Scanf Printf
1. Balochistan University of I.T &
M.S
1
Lecture 5
Mathematical Errors and Functions
input / output functions (scanf, printf)
CS106
Introduction to Programming
Methodology & Abstractions
Spring 20023
Balochistan University
of I.T & M.S
Faculty of System Sciences
Sadique Ahmed Bugti
2. Balochistan University of I.T &
M.S
2
Numerical Inaccuracies
• One of the problems with floating point types is
that sometimes errors occur in representing real
numbers.
• In the decimal number system, the only numbers
which can be represented exactly are those
numbers whose denominators contain only
factors of two (2) and five (5);
e.g. 1/2 = 0.5, 1/5 = 0.2, 7/10 = 0.7, 9/20 = 0.45,
3/25 = 0.12, etc.
3. Balochistan University of I.T &
M.S
3
Avoiding Round-Off Errors
• Use double instead of float.
– This solution provides approximately twice the
accuracy, as well as a greater range
4. Balochistan University of I.T &
M.S
4
Arithmetic Underflow and Overflow
• Arithmetic underflow occurs when a very small
computational result is represented as zero
– e.g. 0.00007 X 0.000005 = 0
• Arithmetic overflow is an error which results
from an attempt to represent a computational
result that is too large
– e.g. 4000 X 4000 (int) = 16,000,000
– 32,767 is the max for type int!
• Results are compiler / machine / OS dependant.
5. Balochistan University of I.T &
M.S
5
Math Functions
The C math library has the header file math.h, and
contains the following useful functions:
acos(d) arc cosine of d (in range 0 to pi)
asin(d) arc sine of d (in range -pi/2 to pi/2)
atan(d) arc tangent of d (in range -pi/2 to pi/2)
atan2(d1,d2) arc tangent of d1/d2 (in range -pi to pi)
cbrt(d) cube root of d
cos(d) cosine of d
cosh(d) hyperbolic cosine of d
exp(d) exponential of d
fabs(d) absolute value of d
hypot(d1,d2) sqrt(d1 * d1 + d2 * d2)
log(d) natural logarithm of d
6. Balochistan University of I.T &
M.S
6
Math Functions
log10(d) logarithm (base 10) of d
pow(d1,d2) 1 raised to the power d2
sin(d) sine of d
sinh(d) hyperbolic sine of d
sqrt(d) square root of d
tan(d) tangent of d
tanh(d) hyperbolic tangent of d
7. Balochistan University of I.T &
M.S
7
Math Functions
• A program that makes use of the C math library
would contain the statement
#include <math.h>
close to its start. In the body of the program, a
statement like
x = cos(y);
would cause the variable x to be assigned a
value which is the cosine of the value of the
variable y (both x and y should be of type
double).
8. Balochistan University of I.T &
M.S
8
Math Functions
• There is no built-in exponentiation operator in C:
– Normally represented by x^y, which implies x
raised to the power of y.
– Instead, there is a library function pow which
carries out this operation:
z = pow(x,y);
would cause the variable z to be assigned a value
which is x raised to the power of y.
Note: x2 is best represented as x * x
9. Balochistan University of I.T &
M.S
9
Math Constants
• The C math library comes with a useful set of
predefined mathematical constants:
M_PI Pi
M_PI_2 Pi divided by two
M_PI_4 Pi divided by four
M_1_PI The reciprocal of pi (1/pi)
M_SQRT2 The square root of two
M_SQRT1_2 The reciprocal of the square root of two
M_E The base of natural logarithms
10. Balochistan University of I.T &
M.S
10
The Output Function: printf()
• The function printf (print-eff) is used for
writing data to standard output (usually, the
terminal).
• A call to this function takes the general form:
printf(format_string, arg1, arg2, …)
– where format_string refers to a character
string containing certain required formatting
information, and arg1, arg2, etc., are
arguments that represent the individual input
data items.
11. Balochistan University of I.T &
M.S
11
The Output Function: printf()
• The format string consists of individual
groups of characters, with one character
group for each data input item.
12. Balochistan University of I.T &
M.S
12
Conversion Specifications
• The percent sign (%) symbol introduces a
conversion specification, or format. A
single conversion specification is a string
that begins with % and ends with a
conversion character.
• Explicit formatting may be included in a
conversion specification.
– Otherwise defaults are used.
13. Balochistan University of I.T &
M.S
13
Conversion Characters
Conversion
character
How the corresponding argument is printed
c as a character
d, i as an integer
u as an unsigned integer
e as a floating-point number, e.g. 3.141590e+00
E as a floating-point number, e.g. 3.141590E+00
f as a floating-point number, e.g. 3.141590
s as a string
% with the format %% a single % is written to
the output stream.
14. Balochistan University of I.T &
M.S
14
printf() Examples: Characters
& Strings
char c=‘M’, s[]=“blue moon”;
15. Balochistan University of I.T &
M.S
15
printf() Examples: Numbers
int i = 123;
double x = 32.17865753173828125
16. Balochistan University of I.T &
M.S
16
The Input Function: scanf()
• The function scanf (scan-eff) is used for reading
data from standard input (usually the terminal).
• A call to this function takes the general form:
scanf(format_string, &arg1, &arg2, …)
– where format_string refers to a character string
containing certain required formatting
information, and arg1, arg2, etc., are arguments
that represent the individual input data items.
17. Balochistan University of I.T &
M.S
17
The Input Function: scanf()
• The format string consists of individual groups of
characters, with one character group for each
data input item.
• In its simplest form, each character group
consists of a percent sign (%), followed by a set
of conversion characters which indicate the type
of the corresponding data item.
• The arguments are a comma-separated list of
addresses.