@@ -893,8 +893,15 @@ extension Perceptron {
893
893
894
894
### ` @differentiable ` function types
895
895
896
- A subtype of normal function types with a different runtime representation,
897
- which stores metadata that allows their values to be differentiated anywhere.
896
+ Differentiable functions are first-class values, identified by a
897
+ ` @differentiable ` attribute in the function type. A ` @differentiable ` function
898
+ type is a subtype of its corresponding normal function type (i.e. without a
899
+ ` @differentiable ` attribute) with an extended ABI, which stores metadata that
900
+ allows their values to be differentiated anywhere the function is passed. A
901
+ ` @differentiable(linear) ` function type is a subtype of its corresponding
902
+ ` @differentiable ` function type. A normal function can be implicitly converted
903
+ to a ` @differentiable ` or ` @differentiable(linear) ` function with appropriate
904
+ compile-time checks.
898
905
899
906
``` swift
900
907
func addOne (_ x : Float ) -> Float { x + 1 }
@@ -920,8 +927,9 @@ func _(_ x: Float) -> (value: Float,
920
927
921
928
### Differential operators
922
929
923
- Standard library differentiation APIs that take ` @differentiable ` functions and
924
- return derivative functions or compute derivative values.
930
+ Differential operators are APIs defined in the standard library that take
931
+ ` @differentiable ` functions and return derivative functions or compute
932
+ derivative values.
925
933
926
934
``` swift
927
935
// In the standard library:
@@ -2318,7 +2326,7 @@ As shown in the
2318
2326
subsection, a ` @differentiable ` function value's runtime representation contains
2319
2327
the original function along with extra information that allows the function to
2320
2328
be differentiated (or transposed, if it is ` @differentiable(linear) ` ). A
2321
- @differentiable or ` @differentiable(linear) ` function value can be called like a
2329
+ ` @differentiable ` or ` @differentiable(linear) ` function value can be called like a
2322
2330
non-` @differentiable ` function. A ` @differentiable(linear) ` function value can
2323
2331
be implicitly converted to a ` @differentiable ` one, which can be implicitly
2324
2332
converted to a non-` @differentiable ` one.
0 commit comments