Computer Arithmetic for Double Precision Numbers

Click For Summary

Discussion Overview

The discussion revolves around the evaluation of the expression (1-a)(1+a) in the context of double precision arithmetic. Participants explore the values of 'a' for which this expression evaluates to 1, considering both fixed point and floating point representations.

Discussion Character

  • Homework-related
  • Technical explanation
  • Debate/contested

Main Points Raised

  • Some participants note that the expression evaluates to 1 when a is equal to 0 and also for values of a equal to 1/n, where n is a positive number.
  • One participant questions the appropriate data representation for the problem, suggesting a focus on fixed point rather than floating point.
  • Another participant clarifies that the problem specifies "double precision," indicating it refers to the binary64 implementation of IEEE754, which is a floating point representation.
  • A participant requests clarification on a related question regarding when 1 - a evaluates to 1 in double precision.

Areas of Agreement / Disagreement

Participants express differing views on whether the problem pertains to fixed point or floating point representation, indicating a lack of consensus on the appropriate context for the evaluation.

Contextual Notes

There is uncertainty regarding the assumptions about data representation, as some participants have not covered certain concepts like one's complement or two's complement in their coursework.

ver_mathstats
Messages
258
Reaction score
21
Homework Statement
In double precision for what values of a does this expression evaluate to 1?

The expression is (1-a)(1+a).
Relevant Equations
(1-a)(1+a)
I know that this expression evaluates to 1 when a is equal to 0. Also for when a is equal to 1/n when n is a positive number, but I'm confused about how to go about this in double precision?
 
Physics news on Phys.org
ver_mathstats said:
Homework Statement:: In double precision for what values of a does this expression evaluate to 1?

The expression is (1-a)(1+a).
Relevant Equations:: (1-a)(1+a)

I know that this expression evaluates to 1 when a is equal to 0. Also for when a is equal to 1/n when n is a positive number, but I'm confused about how to go about this in double precision?
Assuming you mean Fixed Point and not Floating Point, what data representation are you supposed to use for this problem?

https://www.mathworks.com/help/fixedpoint/ug/fixed-point-data-types_btb4ld0-1.html

1664118270438.png
 
berkeman said:
Assuming you mean Fixed Point and not Floating Point, what data representation are you supposed to use for this problem?
The problem states "double precision" which is floating point, specifically it is the binary64 implementation of IEEE754: https://en.wikipedia.org/wiki/Double-precision_floating-point_format.

@ver_mathstats can you answer the similar question "In double precision for what values of a does ## 1 - a ## evaluate to 1?"
 

Similar threads

  • · Replies 17 ·
Replies
17
Views
3K
Replies
1
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 7 ·
Replies
7
Views
3K
Replies
28
Views
1K
  • · Replies 19 ·
Replies
19
Views
3K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 32 ·
2
Replies
32
Views
5K
  • · Replies 5 ·
Replies
5
Views
2K