Skip to main content
added 1030 characters in body
Source Link

Sort of. In Fortress, a decimal point (or I would rather call it an "integer and real part separator", because Fortress allows number literals in bases other than base-10) is syntactical sugar for a fraction. That is the closest example I can think of (which I freely admit is still pretty far away from what you are asking).

I.e.,

1.234

is syntactical sugar for

1234/1000

and

1.234_16

is syntactical sugar for

1234_16/1000_16

which is equal to

4660/4096

Fortress does not support so-called "scientific notation", instead you would just write something like:

1.234_16 * 10_8^11_2

which is syntactical sugar for

1234_16/1000_16 * 10_8^11_2

and equivalent to

4660/4096 * 8^3

which will be compile-time evaluated to

1165/2

Note that Fortress has three different syntaxes:

  • Fortress syntax
  • Unicode syntax
  • ASCII syntax

The canonical syntax is Fortress syntax, and both ASCII syntax and Unicode syntax are used for editing and file storage, but source code is generally rendered in Fortress syntax. This code in the ASCII syntax:

1234_16/1000_16 * 10_8^11_2

Would be rendered roughly like this in the Fortress syntax:

Fortress syntax example

This is the closest example I know of. This is not treating the decimal point as a binary operator, but it is translating literals containing a decimal point into an expression containing a binary operator.

Fortress was specifically designed for High-Productivity Computing, which is a slightly different take on "HPC" (High-Performance Computing). Traditional HPC optimizes for "fastest time from pushing the button to the result", whereas High-Productivity Computing optimizes for "fastest time from formulating the problem to the result", in other words, this interpretation of HPC takes into account the time it takes to write the program in the first place.

As a result, two of Fortress's main principles were:

  • Make it as easy as possible to translate a problem specification (which is typically written in mathematical language, not pseudo-code) into a program.
  • Make it as easy as possible to write highly-performant, highly-parallel, highly-distributed programs that perform well on a heterogeneous super-computing cluster.

Hence, the almost LaTeX looking syntax and the very high level of abstraction, but also the attention to detail when it comes to specifically numbers, number literals, and algebra.

Sort of. In Fortress, a decimal point (or I would rather call it an "integer and real part separator", because Fortress allows number literals in bases other than base-10) is syntactical sugar for a fraction. That is the closest example I can think of (which I freely admit is still pretty far away from what you are asking).

I.e.,

1.234

is syntactical sugar for

1234/1000

and

1.234_16

is syntactical sugar for

1234_16/1000_16

which is equal to

4660/4096

Fortress does not support so-called "scientific notation", instead you would just write something like:

1.234_16 * 10_8^11_2

which is syntactical sugar for

1234_16/1000_16 * 10_8^11_2

and equivalent to

4660/4096 * 8^3

which will be compile-time evaluated to

1165/2

Note that Fortress has three different syntaxes:

  • Fortress syntax
  • Unicode syntax
  • ASCII syntax

The canonical syntax is Fortress syntax, and both ASCII syntax and Unicode syntax are used for editing and file storage, but source code is generally rendered in Fortress syntax. This code in the ASCII syntax:

1234_16/1000_16 * 10_8^11_2

Would be rendered roughly like this in the Fortress syntax:

Fortress syntax example

This is the closest example I know of. This is not treating the decimal point as a binary operator, but it is translating literals containing a decimal point into an expression containing a binary operator.

Sort of. In Fortress, a decimal point (or I would rather call it an "integer and real part separator", because Fortress allows number literals in bases other than base-10) is syntactical sugar for a fraction. That is the closest example I can think of (which I freely admit is still pretty far away from what you are asking).

I.e.,

1.234

is syntactical sugar for

1234/1000

and

1.234_16

is syntactical sugar for

1234_16/1000_16

which is equal to

4660/4096

Fortress does not support so-called "scientific notation", instead you would just write something like:

1.234_16 * 10_8^11_2

which is syntactical sugar for

1234_16/1000_16 * 10_8^11_2

and equivalent to

4660/4096 * 8^3

which will be compile-time evaluated to

1165/2

Note that Fortress has three different syntaxes:

  • Fortress syntax
  • Unicode syntax
  • ASCII syntax

The canonical syntax is Fortress syntax, and both ASCII syntax and Unicode syntax are used for editing and file storage, but source code is generally rendered in Fortress syntax. This code in the ASCII syntax:

1234_16/1000_16 * 10_8^11_2

Would be rendered roughly like this in the Fortress syntax:

Fortress syntax example

This is the closest example I know of. This is not treating the decimal point as a binary operator, but it is translating literals containing a decimal point into an expression containing a binary operator.

Fortress was specifically designed for High-Productivity Computing, which is a slightly different take on "HPC" (High-Performance Computing). Traditional HPC optimizes for "fastest time from pushing the button to the result", whereas High-Productivity Computing optimizes for "fastest time from formulating the problem to the result", in other words, this interpretation of HPC takes into account the time it takes to write the program in the first place.

As a result, two of Fortress's main principles were:

  • Make it as easy as possible to translate a problem specification (which is typically written in mathematical language, not pseudo-code) into a program.
  • Make it as easy as possible to write highly-performant, highly-parallel, highly-distributed programs that perform well on a heterogeneous super-computing cluster.

Hence, the almost LaTeX looking syntax and the very high level of abstraction, but also the attention to detail when it comes to specifically numbers, number literals, and algebra.

Source Link

Sort of. In Fortress, a decimal point (or I would rather call it an "integer and real part separator", because Fortress allows number literals in bases other than base-10) is syntactical sugar for a fraction. That is the closest example I can think of (which I freely admit is still pretty far away from what you are asking).

I.e.,

1.234

is syntactical sugar for

1234/1000

and

1.234_16

is syntactical sugar for

1234_16/1000_16

which is equal to

4660/4096

Fortress does not support so-called "scientific notation", instead you would just write something like:

1.234_16 * 10_8^11_2

which is syntactical sugar for

1234_16/1000_16 * 10_8^11_2

and equivalent to

4660/4096 * 8^3

which will be compile-time evaluated to

1165/2

Note that Fortress has three different syntaxes:

  • Fortress syntax
  • Unicode syntax
  • ASCII syntax

The canonical syntax is Fortress syntax, and both ASCII syntax and Unicode syntax are used for editing and file storage, but source code is generally rendered in Fortress syntax. This code in the ASCII syntax:

1234_16/1000_16 * 10_8^11_2

Would be rendered roughly like this in the Fortress syntax:

Fortress syntax example

This is the closest example I know of. This is not treating the decimal point as a binary operator, but it is translating literals containing a decimal point into an expression containing a binary operator.