sign function

Please support our C# advertiser: Intel Parallel Studio Home
Reply

Join Date: Jul 2009
Posts: 13
Reputation: umair125 has a little shameless behaviour in the past 
Solved Threads: 0
umair125 umair125 is offline Offline
Newbie Poster

sign function

 
0
  #1
Oct 13th, 2009
i want to write a function of sign function without using system.math library in c#.
plz help me how can i write this code???
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 2,044
Reputation: ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of 
Solved Threads: 309
ddanbe's Avatar
ddanbe ddanbe is offline Offline
Postaholic
 
0
  #2
Oct 13th, 2009
The sign function returns 1 if the number is positive, 0 if it's zero and -1 if it is negative. You can implement that using the if statement.
Today is a gift, that's why it is called "The Present".
Make love, no war. Cave ab homine unius libri.
Danny
Reply With Quote Quick reply to this message  
Reply

Tags
function, math

Message:




Views: 615 | Replies: 1
Thread Tools Search this Thread



Tag cloud for function, math
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC