Discussion Overview
The discussion centers around the limitations of numerical precision in MATLAB, specifically regarding the use of higher precision for computations. Participants explore methods to achieve greater precision beyond the default double precision, including the use of symbolic math and potential workarounds.
Discussion Character
- Exploratory
- Technical explanation
- Homework-related
- Debate/contested
Main Points Raised
- Some participants note that MATLAB's default precision is approximately 2*10^(-16) and inquire about methods to perform calculations with higher precision.
- One participant suggests that while the symbolic toolbox can provide higher precision using functions like vpa, the results are returned as symbols rather than numerical values, which may not meet the user's needs.
- Another participant mentions that the machine's constraints limit the precision of calculations, particularly with constants like pi, which cannot be accurately represented in binary.
- Some argue that creating a custom floating-point class in a lower-level language may be more suitable for arbitrary precision, while others highlight the challenges of implementing such a solution in MATLAB.
- There is a discussion about the feasibility of using two double precision variables to achieve higher precision, with some participants asserting that this approach is not effective in MATLAB.
- One participant points out that the symbolic math toolbox supports arbitrary precision arithmetic but emphasizes that all terms in a calculation must maintain that precision to avoid losing accuracy.
- A participant shares a resource related to computing pi, suggesting it may help in implementing variable precision commands in MATLAB.
Areas of Agreement / Disagreement
Participants express differing views on the effectiveness of using two doubles for higher precision, with some asserting it does not work in MATLAB. There is no consensus on a definitive method to achieve higher precision in MATLAB computations, and the discussion remains unresolved regarding the best approach.
Contextual Notes
Participants acknowledge the limitations of MATLAB in supporting higher precision natively and the challenges associated with creating user-defined data types. The discussion highlights the need for all components of a calculation to maintain consistent precision to avoid loss of accuracy.