Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

moving math to core #1293

Closed
wants to merge 3 commits into from
Closed

moving math to core #1293

wants to merge 3 commits into from

Conversation

boggle
Copy link
Contributor

@boggle boggle commented Dec 14, 2011

should do for now, more to come later: all C99 calls, little details, (complex numbers when sensible),
more test code.

- merges math and float into core::float
- Splits core::ctypes into core::ctypes and core::mtypes
- cmath is not exported
- stdtest::math passes
@boggle
Copy link
Contributor Author

boggle commented Dec 14, 2011

Please squash into one commit

@marijnh
Copy link
Contributor

marijnh commented Dec 14, 2011

Doesn't pass:

failures:
    [run-pass] ./src/test/run-pass/triv-cast-be.rs
    [run-pass] ./src/test/run-pass/triv-cast-const.rs

$ rustc src/test/run-pass/triv-cast-be.rs

src/test/run-pass/triv-cast-be.rs:5:26: 5:26 error: unresolved typename: m_float
src/test/run-pass/triv-cast-be.rs:5 fn foo_float() -> m_float { ret 0.0 as m_float; }
                                                              ^
src/test/run-pass/triv-cast-be.rs:8:22: 8:22 error: unresolved typename: m_int
src/test/run-pass/triv-cast-be.rs:8 fn foo_int() -> m_int { ret 0 as m_int; }
                                                          ^
src/test/run-pass/triv-cast-be.rs:11:24: 11:24 error: unresolved typename: m_uint
src/test/run-pass/triv-cast-be.rs:11 fn foo_uint() -> m_uint { ret 0u as m_uint; }

@marijnh marijnh closed this Dec 14, 2011
@marijnh marijnh reopened this Dec 14, 2011
@boggle
Copy link
Contributor Author

boggle commented Dec 14, 2011

Ah, forgot about those two, only ran check-*-std. Name-clash resolution mistake between ctypes/mtypes.

Concerning tail calls: Thanks for saying, I thought they are just unimplemented right now. I am strongly against not having them, the whole actor model kind-of rests on tail calls, could also be a nice basis for task migration in the future (be tailcall() at site xyz, no need to maintain "result back channel"), not to mention sane uses of functional programming.

In math I used them as an idiom for "really this function should just be reexported with another type", don't know how to do that differently (except perhaps by introducing export .. as ..)

@graydon
Copy link
Contributor

graydon commented Dec 14, 2011

Integrated, thanks.

@graydon graydon closed this Dec 14, 2011
bjorn3 pushed a commit to bjorn3/rust that referenced this pull request Dec 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants