This really surprised me.(adsbygoogle = window.adsbygoogle || []).push({});

>> format rat

>> 1/3-1/2+1/6

ans =

-1/36028797018963968

Even school student knows that the answer is 0.

Even format short does not give a correct answer.

>> format short

>> 1/3-1/2+1/6

ans =

-2.7756e-017

**Physics Forums | Science Articles, Homework Help, Discussion**

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Matlab - can't even do a simple arithmatic

Loading...

Similar Threads for Matlab can't simple |
---|

MATLAB MATLAB: forces acting on an object |

MATLAB Matlab histogram |

MATLAB Sovling Bernoulli's differential equation in matlab? |

MATLAB Matlab-like software |

MATLAB Matlab data into bins |

**Physics Forums | Science Articles, Homework Help, Discussion**