How to Maximize the Variable within given bounds

How would one go about finding the largest number x (one significant digit is enough) such that the numerical evaluation of expression (1 + x) − 1 equals to zero.
I need to show that MatLab gives strange answers sometimes (thanks to Floating-point arithmetic).

답변 (1개)

Walter Roberson
Walter Roberson 2015년 8월 30일

0 개 추천

x = eps(1/2)

댓글 수: 1

Thank you, but is there anyway to have MATLAB spit out this infinitesimal amount while solving for the linear function above?

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Numeric Types에 대해 자세히 알아보기

질문:

2015년 8월 30일

댓글:

2015년 8월 30일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by