Texas Instruments TI-86 Calculator Logo
Posted on Sep 29, 2008
Answered by a Fixya Expert

Trustworthy Expert Solutions

At Fixya.com, our trusted experts are meticulously vetted and possess extensive experience in their respective fields. Backed by a community of knowledgeable professionals, our platform ensures that the solutions provided are thoroughly researched and validated.

View Our Top Experts

Multiplication error(?) with repeating decimal place fractions.

When I enter 7*(-1/7)+1
I get a return of 2E-14

BUT
When I enter 7*-1/7+1
I get the expected return of 0

It is a problem with fractions that have repeating decimals and does not exist with fractions that terminate.

i.e.
6*(-1/6)+1
answer comes in as expected, at zero

What gives?

1 Answer

k24674

Level 3:

An expert who has achieved level 3 by getting 1000 points

Superstar:

An expert that got 20 achievements.

All-Star:

An expert that got 10 achievements.

MVP:

An expert that got 5 achievements.

  • Texas Instru... Master 8,093 Answers
  • Posted on Sep 23, 2009
k24674
Texas Instru... Master
Level 3:

An expert who has achieved level 3 by getting 1000 points

Superstar:

An expert that got 20 achievements.

All-Star:

An expert that got 10 achievements.

MVP:

An expert that got 5 achievements.

Joined: Aug 17, 2009
Answers
8093
Questions
0
Helped
4761499
Points
21601

Hello,
You may have guessed right. The presence of the parentheses makes the content of the parentheses evaluated first. So there is a loss of precision.
On the Ti92 I do 7*(-1/7)+1 and find 0.
But with Floating mode set at 12 decimal digits I get
1/7.=.142857142857.
Then .142857142857.*(-7) + 1 gives 2E-14.
Try to calculate pi*(-1/pi) +1 or e*(1/e)+1.
Hope it answers your question.

Add Your Answer

×

Uploading: 0%

my-video-file.mp4

Complete. Click "Add" to insert your video. Add

×

Loading...
Loading...

206 views

Ask a Question

Usually answered in minutes!

Top Texas Instruments Office Equipment & Supplies Experts

Rommel Balcita

Level 3 Expert

754 Answers

Paul Bade

Level 3 Expert

1849 Answers

Sudeep Chatterjee
Sudeep Chatterjee

Level 3 Expert

3269 Answers

Are you a Texas Instruments Office Equipment and Supply Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...