4 16935
On Nov 20, 12:35*am, srinivasan srinivas <sri_anna...@yahoo.co.in>
wrote:
<null>
| >>import math
| >>num = 123.4567
| >>math.modf(num)
| (0.45669999999999789, 123.0)
On Nov 19, 1:44*pm, John Machin <sjmac...@lexicon.netwrote:
On Nov 20, 12:35*am, srinivasan srinivas <sri_anna...@yahoo.co.in>
wrote:
<null>
| >>import math
| >>num = 123.4567
| >>math.modf(num)
| (0.45669999999999789, 123.0)
def frac(n):
return n - int(n)
"MRAB" <go****@mrabarnett.plus.comwrote in message
news:27**********************************@w1g2000p rk.googlegroups.com...
On Nov 19, 1:44 pm, John Machin <sjmac...@lexicon.netwrote:
On Nov 20, 12:35 am, srinivasan srinivas <sri_anna...@yahoo.co.in>
wrote:
<null>
| >>import math
| >>num = 123.4567
| >>math.modf(num)
| (0.45669999999999789, 123.0)
def frac(n):
return n - int(n)
n % 1.0
On Nov 20, 3:38*am, "Blind Anagram" <nob...@nowhere.orgwrote:
"MRAB" <goo...@mrabarnett.plus.comwrote in message
news:27**********************************@w1g2000p rk.googlegroups.com...
On Nov 19, 1:44 pm, John Machin <sjmac...@lexicon.netwrote:
On Nov 20, 12:35 am, srinivasan srinivas <sri_anna...@yahoo.co.in>
wrote:
<null>
| >>import math
| >>num = 123.4567
| >>math.modf(num)
| (0.45669999999999789, 123.0)
def frac(n):
* * return n - int(n)
n % 1.0
| >>n= -123.4567
| >>n % 1.0
| 0.54330000000000211 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: mike420 |
last post by:
In the context of LATEX, some Pythonista asked what the big
successes of Lisp were. I think there were at least three *big*
successes.
a. orbitz.com web site uses Lisp for algorithms, etc.
b....
|
by: maadhuu |
last post by:
hello ,
i would like to know as to why double is more efficient than float .
thanking you,
ranjan.
|
by: Michael Søndergaard |
last post by:
I Pascal there are a function for retriving the fractional part of a real
number (Frac), I can't find any in the dotnet framework. The function needs
to remove the integer part and keep only the...
|
by: ME |
last post by:
What is the fastest way of getting the fraction part of a floating point
number?
So, if I have a float 10.3 I want to get a float with value 0.3 fast.
Thanks
|
by: Erick-> |
last post by:
hi all...
I've readed some lines about the difference between float and double
data types... but, in the real world, which is the best? when should we
use float or double??
thanks
Erick
|
by: djzbor |
last post by:
Any who can help!!
let i have a number 16.0230045
i want to count the fractional part of this number means i want to get the number of digits of the fractional part of this number and store each...
|
by: Bob |
last post by:
Greetings All,
Is there a simple way of suppressing the fractional part of a timespan
At the moment I use one time span to populate another minus the fractional
part .. this is a bit clunky.
...
|
by: schaefer.mp |
last post by:
Does anyone know of an approximation to raising a negative base to a
fractional exponent? For example, (-3)^-4.11111 since this cannot be
computed without using imaginary numbers. Any help is...
|
by: bsabiston |
last post by:
Hi, I'm trying to get the fractional part of a floating point
number. I've tried fmod() and modf(), and while both do work, they
also occasionally return 1.0 for the fractional part of the number...
|
by: Chris Rebert |
last post by:
On Wed, Nov 19, 2008 at 10:01 PM, srinivasan srinivas
<sri_annauni@yahoo.co.inwrote:
Since you really care about significant figures here, have you
considered using decimal rather than float as,...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
| |