Forum     

Go Back   Digit Technology Discussion Forum > Software > Programming
Register FAQ Calendar Mark Forums Read

Programming The destination for developers - C, C++, Java, Python and the lot


Closed Thread
 
LinkBack Thread Tools Display Modes
Old 15-06-2008, 04:14 PM   #1 (permalink)
In The Zone
 
Sridhar_Rao's Avatar
 
Join Date: Feb 2007
Posts: 353
Default multiplication of floating number in php


Multiplication of floating numbers in php is giving unacceptable result. For example, multiplication of 0.023* 0.0034 * 0.11 is yielding 0.
I have an array containing 48 floating numbers less than 1. I want the product of all 48 numbers, any way to achieve this in PHP?
__________________
Want to study M.Sc in any medical subjects? Read this www.microrao.com/msc.htm
Microx, a diagnostic microbiology laboratory software application www.labmicrox.com
Sridhar_Rao is offline  
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Old 15-06-2008, 05:02 PM   #2 (permalink)
हॉर्न ओके प्लीज़
 
victor_rambo's Avatar
 
Join Date: Sep 2007
Posts: 1,493
Default Re: multiplication of floating number in php

http://in2.php.net/manual/en/languag...nteger.casting

As for a wordaround, since you are multiplyting, I will suggest that you multiple all numbers with powers of ten first and then again divide the output accordingly!
__________________
विक्टर रॅंबो - चाणकया प्रभावित व्यक्ति

गीक होना माँगता

Last edited by victor_rambo; 15-06-2008 at 05:09 PM.
victor_rambo is offline  
Closed Thread

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
my screen is floating hidayath7 Hardware Q&A 15 21-05-2008 12:38 AM
Matrix multiplication in java Tushar.bar Programming 6 07-05-2008 02:30 PM
just floating helpless in japan subraj Software Q&A 1 30-03-2006 04:49 PM
How to identify Local sms number and National sms number? casual_gamer Mobiles and Tablets 2 04-12-2005 02:31 PM
Speed Multiplication on Dial-Up? How's it possible? DKant QnA (read only) 4 14-04-2005 12:47 PM

 
Latest Threads
- by Sujeet
- by clmlbx
- by Sujeet
- by icebags

Advertisement




All times are GMT +5.5. The time now is 11:03 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.

Search Engine Optimization by vBSEO 3.3.2