Skip to content

Commit c4235b7

Browse files
authored
Rely on automatic promotion instead of explicit conversion
1 parent 0cd335d commit c4235b7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/integral.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,14 @@ function _integral(
7171
nodes = Iterators.product(ntuple(Returns(xs), N)...)
7272

7373
# Domain transformation: x [-1,1] ↦ t [0,1]
74-
t(x) = FP(1 // 2) * x + FP(1 // 2)
74+
t(x) = (1 // 2) * x + (1 // 2)
7575

7676
function integrand((weights, nodes))
7777
ts = t.(nodes)
7878
prod(weights) * f(geometry(ts...)) * differential(geometry, ts, diff_method)
7979
end
8080

81-
return FP(1 // (2^N)) .* sum(integrand, zip(weights, nodes))
81+
return (1 // (2^N)) .* sum(integrand, zip(weights, nodes))
8282
end
8383

8484
# HAdaptiveCubature

0 commit comments

Comments
 (0)