We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using just LMS numerics, the following code emits errors:
N is of type Rep[Int] xs is of type Vector[Double]
Rep[Int]
Vector[Double]
val xbar = 1.0/N * sum(xs)
I am trying to compute the average here. 1.0 is of type Double, but 1.0/N throws an error, since it does not know how to divide a Double by Rep[Int].
1.0
Double
1.0/N
When i try unit(1.0)/N, it says it can't divide Const[Double].
unit(1.0)/N
Const[Double]
The text was updated successfully, but these errors were encountered:
Merge pull request #1 from julienrf/fix/emitsource-use-remap
bd48062
Use remap in emitSource
See also #22:
val a = unit(1.0) val b = unit(1) val c = a + b // c has type Rep[Double]
Sorry, something went wrong.
Maybe we should just add explicit arithmetic for all primitive types instead of relying on Numeric.
Numeric
TiarkRompf#1 Allow more heterogenous types in numeric operations
a806f1d
See also #36
Merge pull request TiarkRompf#1 from Lewix/booster-develop-0.3
f194eb4
String interpolators for codegens
No branches or pull requests
Using just LMS numerics, the following code emits errors:
N is of type
Rep[Int]
xs is of type
Vector[Double]
val xbar = 1.0/N * sum(xs)
I am trying to compute the average here.
1.0
is of typeDouble
, but1.0/N
throws an error, since it does not know how to divide aDouble
byRep[Int]
.When i try
unit(1.0)/N
, it says it can't divideConst[Double]
.The text was updated successfully, but these errors were encountered: