Skip to content

Commit

Permalink
Remove misleading zero(::DateTime) example
Browse files Browse the repository at this point in the history
- following JuliaLang/julia#35554
  which agrees with the point made here, but shows the
  given code to be misleading.
  • Loading branch information
nickrobinson251 authored Apr 27, 2020
1 parent c3dfd3c commit c75e909
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/src/design/many_differentials.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Beyond being a vector space, differentials need to be able to be added to a prim
Or roughly equivalently a differential is a difference between two primal values.

One thing to note in this example is that the primal does not have to be a vector.
As an example, consider `DateTime`. A `DateTime` is not a vector space: there is no `zero(::DateTime)`, and `DateTime`s cannot be added to each other. The corresponding differential type is any subtype of `Period`, such as `Millisecond`, `Hour`, `Day` etc.
As an example, consider `DateTime`. A `DateTime` is not a vector space: there is no origin point, and `DateTime`s cannot be added to each other. The corresponding differential type is any subtype of `Period`, such as `Millisecond`, `Hour`, `Day` etc.

## Natural differential

Expand Down

0 comments on commit c75e909

Please sign in to comment.