15,968,824 members
Home / Discussions / Algorithms

Algorithms

 Re: Can comparisons be done without If statements in C Luc Pattyn11-Dec-06 3:19 Luc Pattyn 11-Dec-06 3:19
 Re: Can comparisons be done without If statements in C Stephen Hewitt11-Dec-06 15:54 Stephen Hewitt 11-Dec-06 15:54
 Re: Can comparisons be done without If statements in C Luc Pattyn12-Dec-06 4:27 Luc Pattyn 12-Dec-06 4:27
 Re: Can comparisons be done without If statements in C Guffa11-Dec-06 4:18 Guffa 11-Dec-06 4:18
 Re: Can comparisons be done without If statements in C Maximilien11-Dec-06 4:49 Maximilien 11-Dec-06 4:49
 Re: Can comparisons be done without If statements in C Stephen Hewitt11-Dec-06 15:56 Stephen Hewitt 11-Dec-06 15:56
 Re: Can comparisons be done without If statements in C ShermansLagoon8-Jan-07 3:09 ShermansLagoon 8-Jan-07 3:09
 Re: Can comparisons be done without If statements in C Rilhas30-Jan-07 12:57 Rilhas 30-Jan-07 12:57
 Try this: #define MISTERY(x,v) (((x)<(v))? 1 : 0 ) #define SECRET(x,a,b) ( ! ( MISTERY(x,a) || MISTERY(-x,-b) ) ) Then, in your function: return SECRET(x,0.5,1.0) Not only I avoided using the dreaded if statement, but I also succeeded in making the code more dificult to predict. A genuine 2 in 1. Anyway, the only reason I see to avoid using the if statement is to look good when answering a teacher's question! :-P Rogério Rilhas PS: I sincerely hope there is no hidden bug in this code!!
 how to read outlook express file inbox.dbx to simple english naveen padiyar10-Dec-06 19:06 naveen padiyar 10-Dec-06 19:06
 Re: Control generation of my own public & private key pairs using C# edchan10-Dec-06 18:53 edchan 10-Dec-06 18:53
 convert Metric to English and English to Metric using pseudocod xcom20018-Dec-06 21:15 xcom2001 8-Dec-06 21:15
 Re: convert Metric to English and English to Metric using pseudocod El Corazon9-Dec-06 6:15 El Corazon 9-Dec-06 6:15
 Re: convert Metric to English and English to Metric using pseudocod #1239-Dec-06 21:53 #123 9-Dec-06 21:53
 Re: convert Metric to English and English to Metric using pseudocod toxcct10-Dec-06 4:57 toxcct 10-Dec-06 4:57
 Re: convert Metric to English and English to Metric using pseudocod Chris Maunder10-Dec-06 9:46 Chris Maunder 10-Dec-06 9:46
 Re: convert Metric to English and English to Metric using pseudocod #12310-Dec-06 10:34 #123 10-Dec-06 10:34
 Re: convert Metric to English and English to Metric using pseudocod Chris Maunder10-Dec-06 10:50 Chris Maunder 10-Dec-06 10:50
 Re: convert Metric to English and English to Metric using pseudocod #12310-Dec-06 12:11 #123 10-Dec-06 12:11
 Re: convert Metric to English and English to Metric using pseudocod toxcct10-Dec-06 22:30 toxcct 10-Dec-06 22:30
 Re: convert Metric to English and English to Metric using pseudocod Paul Conrad11-Dec-06 4:23 Paul Conrad 11-Dec-06 4:23
 Re: convert Metric to English and English to Metric using pseudocod Paul Conrad10-Dec-06 15:40 Paul Conrad 10-Dec-06 15:40
 Re: convert Metric to English and English to Metric using pseudocod Stephen Hewitt10-Dec-06 14:37 Stephen Hewitt 10-Dec-06 14:37
 Re: convert Metric to English and English to Metric using pseudocod #12310-Dec-06 15:09 #123 10-Dec-06 15:09
 Re: convert Metric to English and English to Metric using pseudocod Paul Conrad10-Dec-06 15:45 Paul Conrad 10-Dec-06 15:45
 Re: convert Metric to English and English to Metric using pseudocod Shog911-Dec-06 13:54 Shog9 11-Dec-06 13:54
 Last Visit: 31-Dec-99 18:00     Last Update: 15-Aug-24 6:21 Refresh ᐊ Prev1...270271272273274275276277278279 Next ᐅ

General    News    Suggestion    Question    Bug    Answer    Joke    Praise    Rant    Admin

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.