Floating Point Numbers in c shell!

I have started using bash but this script which I am working on it, is in c chell. So here is my simple problem:

set x = 0.4124\0.234
echo $x 
0.4124.0.234

Same operation in Bash gives me correct result in my terminal. So there is something with my c shell that is causing this behaviour. Is there solution to this problem?

bash doesn't support float either, so I'm not sure what you did or what you were expecting.

Yes, You are absolutely correct that this kind of operation doesn't work in bash also.

xxx@linux1% command --i input [option]
o/p
0.48828125\0.48828125 
What I tried was:
xxx@linux1% set x = `command --i input [option]`
echo $x
o/p
0.48828125.0.48828125 

Is there a way around my above problem?

I'm not sure what you're even trying to do yet. I think \ is used for modulous sometimes but in a shell it's usually used as an escape.

What output do you actually want here?

Example:
linux1% command input
Correct o/p:
0.48828125\0.48828125
But I want to save this variable using set in c shell and I am doing:
set x = `command input`
echo $x
Incorrect o/p: 
0.48828125.0.48828125 

Is there a way that second option (that is set x = `command input`) can yield correct output?

Oh, is that all?

Double up the \.

% set x = 0.4124\\0.234

% echo $x

0.4124\0.234

%

The "double \\" works with floating point numbers which are greater than 1 but doesn't work for numbers between 0 and 1. Try:

set x = 0.314\2.314
echo $x
0.3142.314

I think I have to accept this ouput. Is there a way I can check for second decimal in output and if found than use a backslash before one digit that is in the above case backslash before 2 to get 0.314\2.314.

Of course it didn't work -- you didn't actually do it... You need two \'s to get one.

It's nothing to do with math. It's just how \ works.

set x = 0.314\\2.314
echo $x
0.314\2.314

Thanks, It works now. Infact I had to use sed to insert one more back slash that is replace "\" by "\\" to make it look like set x = 0.314\\0.314.

set x = `command input | sed 's/\\/\\\\/g'`

Thanks oncee again.