Skip to content

Convert floating-point types from double to single precision - #62

Open
certik wants to merge 3 commits into
BerkeleyLab:mainfrom
certik:single1
Open

Convert floating-point types from double to single precision#62
certik wants to merge 3 commits into
BerkeleyLab:mainfrom
certik:single1

Conversation

@certik

@certik certik commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Replace double precision with default real and D-exponent literals with E-exponent literals so Formal can run on hardware without f64 support, such as Apple GPU. Relax test tolerances and use coarser 2x grids for order-of-accuracy checks dominated by roundoff.

All tests pass with:

$ fpm test --compiler=flang
...
_____ 31 of 31 tests passed. 0 tests were skipped _____

Replace double precision with default real and D-exponent literals
with E-exponent literals so Formal can run on hardware without f64
support, such as Apple GPU. Relax test tolerances and use coarser
2x grids for order-of-accuracy checks dominated by roundoff.
@certik
certik marked this pull request as draft August 29, 2026 20:37
Linux flang and lfortran report slightly different observed orders
and roundoff than macOS. Widen the 4th-order gradient and laplacian
convergence windows and the 2D vector-scalar product absolute
tolerance so the suite passes across platforms.

@rouson rouson left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rouson
rouson requested a review from bonachea August 31, 2026 23:20
@rouson

rouson commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

@certik this can be merged this once we figure out how to fix the failing checks. I'm adding @bonachea as a reviewer to ask for his suggestions regarding the failures.

@rouson
rouson marked this pull request as ready for review August 31, 2026 23:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants