Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 1,000 results for
round
- Page 1
Re: Buggy career talk :-P
Programming
4 Weeks Ago
by Salem
… get on with it. Turning off said feature, beers all
round
chaps!
Re: Need currency pound symbol before amount calculation
Programming
Web Development
1 Month Ago
by Biiim
… a simple trick to format currency is times it 100
round
it and divide by 100 eg: `Math…
Re: Selling the house that I grew up
Community Center
Geeks' Lounge
2 Months Ago
by Reverend Jim
…) was just getting to be too much (I did the
round
trip three times that summer to bring stuff home). Also…
Re: Round Robin Time Slicing
Programming
Software Development
20 Years Ago
by Intel
Round
robin(RR) - Are you taking an OS class? This is …
Re: round robin algorithm
Programming
Computer Science
21 Years Ago
by Wiecek5
Round
-Robin Scheduling Algorithm, that is used to prevent starvation. Lets … jobs. Job A Job B Job C and Job D
Round
Robin will give each job the same amount of CPU…
Re: Round Robin Algorithm Simulation
Programming
Software Development
21 Years Ago
by Dani
Round
robin in the sense that the server gives equal time to every job in the queue, and if a job requires more time, it waits its turn all over again?
Re: Round Robin Algorithm Simulation
Programming
Software Development
20 Years Ago
by Venjense
Round
Robin is well documented on the Internet. Why? Because it …
Re: round up
Programming
Software Development
15 Years Ago
by Geekitygeek
… being the number of decimal places you would like to
round
to [/QUOTE] Have you checked this? None of the …/or a NumberStyle. Also, people keep pointing to Math.
Round
() but if you read the article ddanbe linked to you…method most people use. You can specify overload the Math.
Round
method to specify the MidpointRounding method to use. That way…
Re: round
Programming
Software Development
15 Years Ago
by ArkM
…, I don't understand: do you want to
round
zero to zero with 2 decimal positions precision? ;)… Try this code: [code=cplusplus] #include <cmath> double
round
(double x, int n = 0) { bool neg = (x &…0; i < 12; ++i) printf("%.15f\n",
round
(pi,i)); return 0; } /* Output: 3.141592653580000 3.000000000000000…
Re: round up
Programming
Software Development
15 Years Ago
by Geekitygeek
There is a quirk with Math.
Round
. It defaults to rounding to the nearest even number, so 1.5 = 2, 2.5 = 2. If you use [iCODE]Math.
Round
(2.5, MidpointRounding.AwayFromZero)[/iCODE] it will
round
to the nearest whole number.
Re: round
Programming
Software Development
15 Years Ago
by ShawnCplus
With the [icode]math.h[/icode](or cmath someone correct me on this) header you can use the [icode]floor[/icode] and [icode]ceil[/icode] functions if I remember correctly to
round
down and
round
up respectively.
Re: round
Programming
Software Development
15 Years Ago
by tux4life
… [icode]ceil[/icode] functions if I remember correctly to
round
down and
round
up respectively.[/QUOTE] In C++ [ICODE]cmath[/ICODE] is…
Re: round
Programming
Software Development
15 Years Ago
by Akis2000
yeup, this is correct, but if i want to
round
a value before i calculate the value??? for example, i …have value pi1: and i want to
round
this value before i go to the calculation....... [code] double…
Re: round
Programming
Software Development
15 Years Ago
by Akis2000
…\n"; // This case!!! [/code] Therefore it's IMPOSSIBLE to
round
double values to n DECIMAL digits exactly. Think about your… specifications and desired effects...[/QUOTE] so it's possible to
round
a value that it's 0 ??? ;) i mean we have…
Re: round
Programming
Software Development
15 Years Ago
by Akis2000
the truth is that i want
round
zero to zero with 2 decimal positions precision.... before the … to see that..... [code=cpp] printf("%.15f\n",
round
(pi,i)); [/code] but something like this..... [code=cpp] double…
Re: round
Programming
Software Development
15 Years Ago
by Akis2000
… don't understand my code at all. [code=cplusplus] total =
round
(x,3); [/code][/QUOTE] ok let's say the user… can't understand:: ( i used pow because for some reasons
round
doesn't works) i [code=cpp] for (int long n…
Re: round up
Programming
Software Development
15 Years Ago
by RunTimeError
[QUOTE=sidd.;1051675]hi, how to
round
up a number. e.g. 3.4 to 3 and 3.5 to 4 thanx in advance[/QUOTE] Use: [CODE=C#] Math.
Round
(4.4)); [/CODE]
Re: round up
Programming
Software Development
15 Years Ago
by Geekitygeek
[QUOTE=jwcochrane;1135534]
Round
= rounds to the nearest decimal part. (What he is looking for)[/QUOTE] Be careful with Math.
Round
. See my post above to avoid unexpected results.
Re: round up
Programming
Software Development
15 Years Ago
by SharpJohnnyG
This depends on the type but you would need something like [code] Decimal decTmp = 3.5m; Decimal decNewTmp = Decimal.Parse(decTmp, 0); [/code] with the 0 being the number of decimal places you would like to
round
to [QUOTE=sidd.;1051675]hi, how to
round
up a number. e.g. 3.4 to 3 and 3.5 to 4 thanx in advance[/QUOTE]
round
Programming
Software Development
15 Years Ago
by Akis2000
hello, i have a double value=0; and i want before starting the calulation to
round
this value in the numbers that the user add, for example 2... any ideas??? I have despered...........
Re: round
Programming
Software Development
15 Years Ago
by tux4life
[QUOTE=Akis2000;865022]hello, i have a double value=0; and i want before starting the calulation to
round
this value in the numbers that the user add, for example 2... any ideas??? I have despered...........[/QUOTE] I don't understand that, can you give an example ?
Re: round
Programming
Software Development
15 Years Ago
by Akis2000
[code=cpus plus syntax] double pi1=0; for (int long n=1; n<=10000; n++) {//star for loop pi1 += (4*pow(-1.0, n+1))/(2*n - 1); }//end loop [/code] before loop for i want the pi1
round
=number by the user... for example user give 3 the pi1 =3.140
Re: round
Programming
Software Development
15 Years Ago
by tux4life
…); }//end loop [/code] before loop for i want the pi1
round
=number by the user... for example user give 3 the…
Re: round
Programming
Software Development
15 Years Ago
by NathanOliver
if you mean that you want to
round
the number to a specific number of decimal places you …
Re: round
Programming
Software Development
15 Years Ago
by Akis2000
…=31415926535.89793; cout<<"Enter The Number of
round
: "; cin>>num; approximate=approximate/pow(10.0…
Re: round
Programming
Software Development
15 Years Ago
by ArkM
…\n"; // This case!!! [/code] Therefore it's IMPOSSIBLE to
round
double values to n DECIMAL digits exactly. Think about your…
Re: round
Programming
Software Development
15 Years Ago
by ArkM
[code=cplusplus] double x=7839,total=0; total=x/pow(10.0, 3); [/code] Thank you, I have never seen so strange code as it ;) have you ever seen 1000.0 constant? What for total=0 initialization? I see you don't understand my code at all. [code=cplusplus] total =
round
(x,3); [/code]
round up
Programming
Software Development
15 Years Ago
by sidd.
hi, how to
round
up a number. e.g. 3.4 to 3 and 3.5 to 4 thanx in advance
Re: round up
Programming
Software Development
15 Years Ago
by jwcochrane
us the math library in C# Math.Ceiling(ValueToRoundup) [QUOTE=sidd.;1051675]hi, how to
round
up a number. e.g. 3.4 to 3 and 3.5 to 4 thanx in advance[/QUOTE]
Re: round up
Programming
Software Development
15 Years Ago
by jwcochrane
… as RoundUp (to int) Floor = same as RoundDown (to int)
Round
= rounds to the nearest decimal part. (What he is looking…
1
2
3
17
Next
Last
Search
Search
Forums
Forum Index
Hardware/Software
Recommended Topics
Programming
Recommended Topics
Digital Media
Recommended Topics
Community Center
Recommended Topics
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Top Members
Meet People
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
SEO Backlink Checker
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2025 DaniWeb® LLC