This repository has been archived by the owner on Jan 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
173925e
commit 0cf4a5e
Showing
3 changed files
with
18 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#include <cmath> | ||
|
||
#include "catch.hpp" | ||
|
||
extern "C" double __quantum__qis__sqrt__body(double); // NOLINT | ||
|
||
TEST_CASE("QIR: math.sqrt", "[qir.math][qir.math.sqrt]") | ||
{ | ||
REQUIRE(2.0 == __quantum__qis__sqrt__body((double)4.0)); | ||
REQUIRE(3.0 == __quantum__qis__sqrt__body((double)9.0)); | ||
REQUIRE(10.0 == __quantum__qis__sqrt__body((double)100.0)); | ||
|
||
REQUIRE( isnan(__quantum__qis__sqrt__body((double)-5.0)) ); // (double)NAN == sqrt((double)-5.0) | ||
REQUIRE( isnan(__quantum__qis__sqrt__body(nan(""))) ); // (double)NAN == sqrt((double)<quiet NAN>) | ||
REQUIRE( isinf(__quantum__qis__sqrt__body((double)INFINITY)) ); // +-infinity == sqrt((double) +infinity) | ||
} |
0cf4a5e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am very interested, in this . I am very new to Quantum, but thought it would be great to send an encrypted message via a quantum array.
I was just looking for examples, and grabbed a raw copy. will gladly return if necessary. Amazing work !!!