版博士V2.0程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

37 lines
836 B

  1. /**
  2. * Adapted from https://github.com/purescript/purescript-prelude/blob/master/src/Data/Field.purs
  3. *
  4. * @since 2.0.0
  5. */
  6. import { Ring } from './Ring'
  7. import { Eq } from './Eq'
  8. /**
  9. * @category model
  10. * @since 2.0.0
  11. */
  12. export interface Field<A> extends Ring<A> {
  13. readonly degree: (a: A) => number
  14. readonly div: (x: A, y: A) => A
  15. readonly mod: (x: A, y: A) => A
  16. }
  17. /**
  18. * The *greatest common divisor* of two values
  19. *
  20. * @since 2.0.0
  21. */
  22. export declare function gcd<A>(E: Eq<A>, field: Field<A>): (x: A, y: A) => A
  23. /**
  24. * The *least common multiple* of two values
  25. *
  26. * @since 2.0.0
  27. */
  28. export declare function lcm<A>(E: Eq<A>, F: Field<A>): (x: A, y: A) => A
  29. /**
  30. * Use [`Field`](./number.ts.html#field) instead.
  31. *
  32. * @category zone of death
  33. * @since 2.0.0
  34. * @deprecated
  35. */
  36. export declare const fieldNumber: Field<number>