Coder Social home page Coder Social logo

c23meta's People

Contributors

fcard avatar

Stargazers

 avatar

Watchers

 avatar

c23meta's Issues

Undefer the cats

For some reason I kept doing this:

DEFER(CAT(X,Y))()

That's unnecessary and just adds scans, save for very specific arguments.
The cats must be freed from their defer prisons.

`FP32_TRUNC` doesn't work for negative numbers

  printf("trunc(-sqrt(32)): %f", FP32_CONVERT(FP32_TRUNC(FP32_NEG(FP32_SQRT(FP32_32)))));
trunc(-sqrt(32)): -6.313708

fweh. prolly just need to get its absolute value and then negate it if it was negative. time to add a FP32_WITH_SIGN as wew.

FP32 functions evaluate arguments multiple times

I should be more careful doing stuff like this:

#define FP32_CLASSIFY(X) CAT_ALL(_FP32_CLASSIFY, FP32_IS_NAN(X), FP32_IS_INF(X), FP32_IS_ZERO(X))

I need to pass the argument into a macro first before having its argument appear more than once.
I should check the other datatypes as well.

  • FP32 cmp
  • FP32 math
  • FP32 bits
  • U32 cmp
  • U32 math
  • U32 bits
  • I32 cmp
  • I32 math
  • I32 bits
  • U32H cmp
  • U32H math
  • U32H bits
  • U64 math
  • U128H cmp
  • U128H math
  • U128H bits
  • TUPLE
  • LIST
  • PAIR
  • BOOL

Separate a generic 'bits' headers

There's already a 'hex' one for hexadecimal digit operations, so there should be one for binary digit operations, instead of me copy pasting them into every binary datatype (or worse, depending on other datatypes being included and making them depend on one another unnecessarily)

add `FP32_FLOOR` and `FP32_CEIL`

those are missing. Can probably base them on trunc and do some equality and sign checking tests to get them to behave as they should. FP32_ROUND is also missing but that will be a separate issue since that one is more complicated.

Actual Testing

Instead of just printing the values of tests, there should be actual testing. Maybe not yet making use of a unit test library but at least checking that the results are correct and exiting/reporting otherwise.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.