Electronics Programming
Linux Posts, Programming Posts, Atmega Posts and others.
Search This Blog
Friday, February 27, 2009
Floating point comparison in linux script
[root@vikas ~]# echo 8.8 == 8.2 | bc
0
[root@vikas ~]# echo 8.8 == 8.8 | bc
1
[root@vikas ~]#
[root@vikas ~]# echo 8 == 2 | bc
0
[root@vikas ~]# echo 8 == 8 | bc
1
[root@vikas ~]#
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment