Click here to Skip to main content
15,915,823 members
Home / Discussions / Algorithms
   

Algorithms

 
GeneralRe: convert Metric to English and English to Metric using pseudocod Pin
El Corazon11-Dec-06 16:55
El Corazon11-Dec-06 16:55 
GeneralRe: convert Metric to English and English to Metric using pseudocode Pin
#12311-Dec-06 18:43
#12311-Dec-06 18:43 
GeneralRe: convert Metric to English and English to Metric using pseudocod Pin
El Corazon11-Dec-06 18:50
El Corazon11-Dec-06 18:50 
GeneralRe: convert Metric to English and English to Metric using pseudocode Pin
Paul Conrad11-Dec-06 19:39
professionalPaul Conrad11-Dec-06 19:39 
GeneralRe: convert Metric to English and English to Metric using pseudocod Pin
Paul Conrad11-Dec-06 19:39
professionalPaul Conrad11-Dec-06 19:39 
GeneralRe: convert Metric to English and English to Metric using pseudocod Pin
Dave Kreskowiak15-Dec-06 8:06
mveDave Kreskowiak15-Dec-06 8:06 
AnswerRe: convert Metric to English and English to Metric using pseudocod Pin
El Corazon10-Dec-06 14:03
El Corazon10-Dec-06 14:03 
QuestionTwo become one... Pin
Kevnar8-Dec-06 11:54
Kevnar8-Dec-06 11:54 
Okay! I give up! I can't figure this one out for the life of me. Please help.

I have a program that needs to convert two numbers to a single number and somehow still be able to figure out what the original two numbers were that the new digit came from. The catch is the single number has to be the same byte size as the original two numbers. 127 and 65 becoming ?? for example. I thought of just changing it to 127065, but that doesn't work. I also thought of using a seeded rand call somehow, but I'm not sure how.

If anyone has any ideas, or some sort of explanation as to why it actually is impossible, please let me know. I've been going mad over this for weeks.

The closest I've come is parsing the two digits into a string ("127065"), converting it back to a long and dividing it by an arbitrary number that brings it down to byte size. Trouble with that is, it returns a decimal value with is stored in 4 bytes, not one.

So yeah. I'm going mental. Please help, if you can.

"Go to, I’ll no more on’t; it hath made me mad." - Hamlet

AnswerRe: Two become one... Pin
Luc Pattyn8-Dec-06 13:50
sitebuilderLuc Pattyn8-Dec-06 13:50 
GeneralRe: Two become one... Pin
Kevnar8-Dec-06 15:36
Kevnar8-Dec-06 15:36 
GeneralRe: Two become one... Pin
Luc Pattyn9-Dec-06 2:30
sitebuilderLuc Pattyn9-Dec-06 2:30 
AnswerRe: Two become one... Pin
#1238-Dec-06 14:25
#1238-Dec-06 14:25 
GeneralRe: Two become one... Pin
Kevnar8-Dec-06 15:38
Kevnar8-Dec-06 15:38 
GeneralRe: Two become one... Pin
#1238-Dec-06 16:22
#1238-Dec-06 16:22 
AnswerRe: Two become one... Pin
Bassam Abdul-Baki8-Dec-06 17:00
professionalBassam Abdul-Baki8-Dec-06 17:00 
GeneralRe: Two become one... Pin
Kevnar8-Dec-06 17:28
Kevnar8-Dec-06 17:28 
GeneralRe: Two become one... Pin
Bassam Abdul-Baki9-Dec-06 15:36
professionalBassam Abdul-Baki9-Dec-06 15:36 
AnswerRe: Two become one... Pin
Michael Dunn8-Dec-06 19:58
sitebuilderMichael Dunn8-Dec-06 19:58 
GeneralRe: Two become one... Pin
Kevnar9-Dec-06 2:21
Kevnar9-Dec-06 2:21 
GeneralRe: Two become one... Pin
Michael Dunn9-Dec-06 15:57
sitebuilderMichael Dunn9-Dec-06 15:57 
GeneralRe: Two become one... Pin
Kevnar9-Dec-06 16:20
Kevnar9-Dec-06 16:20 
AnswerRe: Two become one... Pin
Chris Maunder10-Dec-06 9:55
cofounderChris Maunder10-Dec-06 9:55 
GeneralRe: Two become one... Pin
Kevnar10-Dec-06 10:13
Kevnar10-Dec-06 10:13 
GeneralRe: Two become one... Pin
Chris Maunder10-Dec-06 10:52
cofounderChris Maunder10-Dec-06 10:52 
GeneralRe: Two become one... Pin
Kevnar10-Dec-06 17:06
Kevnar10-Dec-06 17:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

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